on 06-06-2012 6:33 PM
Hi All,
I am having one requirement where the XML file will come from legacy system and the same needs to be updated simultaneously to SAP ECC and synchronous Web service. So the flow wil be:
File -> PI -> ECC(Idoc) + Web Service (Synchronous)
We are planning to call the web service from enhance Idoc itself and update the record from there only, but i am not sure how enhanced Idoc will call the web service?
Is there any other approach to do the same? Please help.
Thanks!!
You could use one mapping and handle the web service portion with a UDF. If the webservice failed you can raise an exception so that the IDOC is not generated either. This would make it close to synchronous because IDOC adapter is naturally asynch.
Here is an example for a User Defined Function webservice call:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Aaron,
Apologies, but I have to disagree.:) Since the mode of the sender is async, the retry mechanism comes into place. If there is an error, the message would persist and the webservice will be unnecessarily called multiple times (via the udf) until it goes into a system error. Although you could set the number of retries in RWB CC (Receiver Only) monitoring, it would be best used in a sync-sync scenario.
Regards,
Mark
Hi All,
Very rightly said by Mark, this is the reason we are not opting for the SOAP UDF design.
I am thinking of having something like this:
1) File -> PI -> ECC(Idoc)
using first interface i will archive the file on some PI location and create the Idoc in ECC. As soon as the file comes under archive location my second interface will pick that file. I will be using Request Response Bean in sender file adapter.
2) Sync File (from archive location) -> PI -> sysnc Web Service.
In the second interface, during the response mapping (between SOAP response and File response) i will do a RFC lookup and update the response in ECC system.
Note: The response is needed from web service and same needs to be updated in ECC because once the web service execution is sucessful, ECC system triggers the response IDOC.
Please suggest whether i am using correct design or not?
Thanks!!
Hi Mark, this aspect of retries comes down to error handling and design vs requirements. For example, if the web service is checking for update before inserting new, then sending the the vendor information multiple times may not matter (master data vs order data)
Vasant, you asked for ideas about making a synchronous interface with adapters that are naturally not synchronous. You might consider eliminating all files and IDOCS and use Proxy or RFC for talking with ECC as already suggested by Baskar.
Good luck!
Aaron
1)Polling to archive folder not a right idea may be you can create one more folder FTP then point there,if your client okay with pointing to archive folder then no issues.
2)Updating response using RFC look up works but if you have more fields then it you might face some issues. but it works.
Based on that i said design not best but your design good.
Hi Raj,
Thanks for your inputs.
Probably one last question, i have only seen RFC lookups where we send some input and expect some output.
But in my case i am using RFC lookup for updating the table with web service response (web service reponse structure will have one field and that field data i am planning to send through RFC lookup). So that wil be possible??
Thanks!!
Yeah very much possible,
Design RFC Lookup:
Request ABAP Team to build one RFC function module it should have one req and response . The request is going to be your web service response and RFC response is going to be a just loike a confirmation like Web servioce response updated., you can supress this response in mapping level.
RFC Lookup always Sync hence we need some dummy response from ECC.
Hope you are clear.
Regards,
Raj
Hi,
Small calrification, I need to update the web service with the same File.
So, File will create the Idoc in ECC and the same file simultaneously needs to call the sysnc web service and update the file.
Once it is done (both ECC and Web service gets updated) i need to trigger a response Idoc from ECC and send it to Sender system.
So, if i split my design how will proxy (in case of Proxy -> SOAP scenario) will have the source file data?
Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
Yes web service needs to be sync because the Web service will send the reponse as "ok" or "nok" (stating the the vendor has been uploaded in legacy system) ..... if both the message ceration is successfull (Cremas Idoc in ECC and web service response ) then response IDoc wil be triggered from SAP ECC
Thanks!!
The problem with File adapter is it wont support Sync communication hence you have to handle this requirement using ccBPM.
1)Instead of IDoc use ABAP Proxy and call Cremas IDoc from Proxy program and Proxy send back status to PI easily beause it supports Async.
2)SOAP adapter supports Sync and Async so no worries.. you can easily get reasponse from Web service and update the same to Sender File system.
If you want ECC reponse not real time then develop indivdual interface to send response back to File and you no need proxy (Point 1 changes not required).
Eventually you need ccBPM for this.
Regards,
Raj
Hi,
The req is file will have some vendor data and that file needs to be uploaded in SAP ECC (CREMAS) and one of the client's web service (so that data in ECC and Web service is in sync - client want in this way).
Now ECC program will check that if Cremas Idoc is successfully created as well as the reponse from the web service is "OK" then it wil trigger one Response Idoc from SAP ECC and updates the same in sender system.
Thanks!!
Hi Raj,
Actually we dont want to use BPM so we thought that enhancement in the idoc will do the trick for us. This enhanced Idoc will call the sync web service and then if the response of this web service is sucessfull then ECC will trigger the response Idoc.
Do you think that this design will work? and how enhaced Idoc will call the web service?
Thanks!!
If you do with your design, you would do partial through PI middleware and rest without PI (i.e from ECC to webservice). I would also recommend to split the requirement into two interfaces.
@Raja
>IDoc wont support Async communication henace i would recommend Proxy.
Idoc supports only async. Might be your typo.
Create two interfaces. FIle to Proxy. and another interface proxy to soap. Since idoc supports only async you might not able to retrieve response from webservice using idoc. So better go for RFC or Proxy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vasant,
Why dont you devide your requirement in to two interfaces
1)File to IDoc
2)Proxy to Web service.
From IDoc call a Proxy program to send data to PI then PI will call web service with request and response will send back to ECC.
IDoc wont support Async communication henace i would recommend Proxy.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.