cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP with IDOC scenario

Former Member
0 Kudos

Hi Experts,

Could you help me with the following scenario using XI:

The sender is a webservice client which sends a SOAP request with the order number (over HTTPS). The order number needs to be pased to SAP ECC to return the order details as a SOAP response synchronously. The order details are actually stored in very complex custom idocs in SAP ECC.

Plz let me know how to configure this scenario.

Thanks,

Shobhit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

>>The order details are actually stored in very complex custom idocs in SAP ECC.

Since you can't use IDOC to send back response(they only send acknowledgments),you need to write a proxy which wil internally call this IDOC(or table where Order detail is stored) and send back the response.

Hence your scenario will be SOAp to proxy(synchronous)

Thanx

Aamir

Former Member
0 Kudos

Hi Amir,

Can you please guide me how to write a proxy program to call this idoc internally and send back the order details.

The idoc has a very complex structure and hence I cant use tables to store the data.

Thanks,

Shobhit

Former Member
0 Kudos

Hey

Well i m not really sure about the whole source code for proxy,but you might wanna search/post in ABAP forum and that should definitely help you out.

Thanx

Aamir

Former Member
0 Kudos

Importent thing using proxy is Custom development (Coding) involves.

If you have fully configured Idoc in R/3, better you can go for SOAP - XI - IDoc.

and as well you have standard or configured Outbound in R/3, you can go for IDoc response to the same above XI-BPM.

If you don't have the standarized/ already customized solution, better U go for customization now using Proxy or BAPI/RFC call.

SOAP-XI-Proxy ---> is very simple and performance effective.

invoke proxy in R/3, Map soap structure to proxy (U can maintain same structure as SOAP), in the proxy U have to write coding (Direct Insert/Update or BAPI/FM call or IDoc).

But coding efforts depends upon complexity of inbound message/fields.

Once the data is processed R/3 application. get back the required response (may be as table/bapi/idoc) and send back the proxy to the XI. then the remaining is as usual...

Former Member
0 Kudos

>>you can go for IDoc response to the same above XI-BPM.

Can you please tell me how to get Response from IDOC?

As far as i know,there is no option of getting response from IDOC.

Thanx

Aamir

former_member181962
Active Contributor
0 Kudos

Hi Shobith,

Here is skeleton of the code that you may want to write.

  • Populate the Import parameters for the function module

IDOC_INPUT_<YOUR MESSAGE TYPE> and then

call the function module

IDOC_INPUT_<YOUR MESSAGE TYPE>

inside the execute_synchronous method in the same code given here:

http://help.sap.com/saphelp_nw04/helpdata/en/3e/a35c3cff8ca92be10000000a114084/content.htm

the idoc function module might return some messages, whch you can pass to the response structures of the execute_synchronous method.

REgards,

Ravi

Former Member
0 Kudos

Hi Amar,

I think I missed some thing, some where...

again scenario is here:

(1)SOAP--> (2)XI-BPM--> (3)R/3 Inbound IDoc

^ (4)Internal process in R/3

|

<---- (5)Outbound IDoc from R/3

Response message from the Outbound IDoc...

For example: XI-BPM sending Sales Order (ZIDoc_SALES) and expecting purchase order(ZIDoc_PURCH) as response. Once inbound IDoc reached and saved in DB tables, some other internal scheduling program has to invoke and fill the ZIDoc_PURCH idoc and send to the same BPM.

(4) depends on the functional/technical availability.

now here "ZIDoc_PURCH" is called as required response message in soap message terms(or laymen terms).

as of my knowledge, Idoc doesn't support synchronous communication.

Former Member
0 Kudos

>>(4)Internal process in R/3

And this is called proxy:)

>>as of my knowledge, Idoc doesn't support synchronous communication

Yes,you are correct.

Thanx

Aamir

Former Member
0 Kudos

Hi Xu,

Your solution looks promising. But Im not good at BPM. Would it be possible to explain me in detail the steps? I'll be really really greatful.

SOAP request (order no) to ECC, to get back the order details (from orders idoc)

Thanks!!!!!!!!!!!!!!!!!!!!

Shobhit

Former Member
0 Kudos

(4) - Internal Process...

It may BADI (custom coding using BADI in Transaction or standard report)

It may Scheduling program (Stand alone report).

It may call another transaction code or report for IDoc/BAPI.

[(4) - Internal Process...] is business logic, where you are going to execute some thing and getting response based on pervious action.

In Proxy we can call a method to send message to integration server. here it play deferent role,

Proxy is just a message carrier to intergation server from application system...

Former Member
0 Kudos

Hi Xu,

Do you think that the BPM solution is easier, or its easier to get the idoc to XI using proxy, and then write an RFC to store the mapped message in XI ABAP tables. And then as another XI scenario, wehen the SOAP request comes to XI, the RFC receiver adapter queries the Z tables and fetches all the data and then returns the same to the SOAP response synchronously.

So in effect two scenarios in XI: (2 big RFC developments + Z tables)

1. PROXY --> XI --> RFC (The IDOC is sent to XI and gets saved in XI ABAP tables)

2. SOAP <> XI <> RFC (SOAP queries XI and gets the order details synchronously in the response).

Shobhit

Edited by: Shobhit Swarup Mathur on Jul 18, 2008 10:43 AM

Former Member
0 Kudos

Steps in BPM:

1) Receive Step: (Receive New Order from WebServer)

Message: sales_order1 (Give the appropriate message type)

Start Process: Click on the check box

Mode: Asynchronous

Activate correlation:

Order_number:

2) Send Step: (Send order to SAP R/3)

Mode: Asynchronous

Create New transaction: Do not Click on the check box

Message: sales_order1 (Give the appropriate message type)

Acknowledgement: none

received from : Send Contect

3) Receive Step: (receive purchase Order from R/3)

Message: Purchase_order1

use correlations: Order_number

4) Send Step: (Send order response to WebService)

Mode: Asynchronous

Create New transaction: Do not Click on the check box

Message: Purchase_order1 (Give the appropriate message type)

Acknowledgement: none

received from : Send Contect

These are basic steps, depends on your requirement(Error Handling or response time limitations) the design may change.

The ID Configuration is same...

Receiver determination:

1) Service_is_Sender_WS - Sender_Interface_Sales_Ord (Party is optional)

2) Service_is_IP - Interface_is_request_abs

3) Service_is_IP - Interface_is_response_abs

4) Service_is_SAP - Interface_is_IDoc_PURCH_Ord

Same as Interface determination....

Former Member
0 Kudos

Hi,

I already mentioned, if the IDocs are already configured and Functional consultants are familier with the mappings, better go for IDocs. (It may be painful while designing the BPM-but this is for better tracking of messages and less coding efforts).

If the IDocs are available, I don't suggest you Proxies. IDocs gives you better functional support, tracking and all.

U can use IDocs in inbound Proxy call. but that will be very difficult development. (xi scenario + calling IDoc program in Proxy)

or if you have IDocs ready with you, go for:

Asynch Scenario 1: WS_Req_SOAP - XI - IDoc_sales_ord

Asynch Scenario 2: IDoc_purch_order - XI - WS_Resp_SOAP

my suggition is don't go for custom development. What ever business process logic requires just do in BPM.

This may be a learning oppurtunity to you(BPM).

former_member181962
Active Contributor
0 Kudos

Hi Shobit,

Can we know what is the Idoc that we are taking about?

REgards,

Ravi

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

You can find "how to configure SOAP & IDoc adapters" and ECC(R/3) configuration as following...

[IDoc Steps|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/idoc%2bsteps]

[SOAP Configuration|;

[How to use SOAP adapter|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40611dd6-e66e-2910-f383-e80fb44f9cd4]

But really you need to think about "How to use BPM..." since IDoc adaper doesn't support acknowledgements, you have to design BPM for getting back the response from R/3

(Request & Response in same message...).

step 1: send IDoc using send step in BPM

step 2: Configure Inbound IDoc

step 3: Configure Outbound IDoc(Response message)

step 4: Trigger IDoc scheduling program in R/3.

step 5: receive IDoc in BPM receiver step

step 6: Map IDoc to SOAP message and send to SOAP adapter

remaining CC, Webservice configuration & testing is as usual

Good luck 4 Ur complicated scenario...

Former Member
0 Kudos

Hi Shobhit Swarup Mathur,

For the sender side WS you can follow this web blog.

Cheers

Edited by: Craig Cmehil on Jul 21, 2008 11:12 AM

Former Member
0 Kudos

Hi,

Check this

Regards

Seshagiri