Request/Response Bean for IDOC_AAE adapter
Hi,
Here is my first blog in SCN.
In SAP PI 7.31, we have the option of using adapter modules for IDOC_AAE adapter. This is a very interesting option. Generally IDOC is Asynchronous. But in this scenario, we will see how it will work as Synchronous.
This is a scenario for Request/Response Bean for IDOC_AAE adapter.
Here I am considering my scenario as test purpose. It is not a real time scenario. My only concentration in this blog is on Request/Response Bean for IDOC_AAE.
My scenario is that I want to take an IDOC from ECC and send it to some RFC which is synchronous one and I place response RFC data into a file in some other location.
My Scenario:
I have Imported IDOC and RFCs from SAP R/3 System and created one Data type, Message Type for File structure.
Here, for this Request/Response Bean the trick is that create one Operation Mapping with only Asynchronous IDOC and RFC thing. Then create the ID part.
In ID Part, create the below steps.
Import Business System from SLD for both IDOC and RFC and create one Business component for FILE.
Create one Sender IDOC Communication Channel and one RFC receiver Channel and one File Receiver Channel.
I am concentrating only on IDOC Communication channel for Request/Response bean. Remaining both RFC and File will be same as it is for other general cases.
Sender IDOC Communication Channel Configuration:
For sender IDOC_AAE, use RFC Parameters as it is. You can use default also for RFC Server parameters.
In Adapter module of IDOC_AAE, add the below steps.
Adapter Namespace: http://sap.com/xi/XI/System.
Adapter Type: File
Otherwise it is throwing CPACachelookup error.
Now Create ICO for this object as it is with Asynchronous Operation Mapping created before.
Coming back to ESR.
Create 1 Synchronous Service for Idoc and response message as follows:
Sender Service Interface:
Here
Category: Outbound.
MODE: Synchronous.
Request Message as: Use your IDOC Message.
Response Message: Use your File Message Type.
Now change the operation mapping for Idoc to RFC used in ICO
a. Remove Idoc interface as sender
b. Enter synchronous interface created above using IDoc and response message types
c. maintain both request and Response Mapping
Testing:
Trigger the IDOC from ECC.
Now go to Communication Channel and check your interface.
Check In Message Monitoring
Here you will get 2 messages one for request and one for response.
Finally, the File has been created in the target Directory.
This is for Request and Response Bean for IDOC_AAE.
Note: If we try to change the ICO now, it will throw error as operation mapping is now synchronous with different sender interface. So if there is a need to change ICO, then first operation mapping needs to point to asynchronous interface again and activate the ICO object. Then again change operation mapping with synchronous interface and activate the operation mapping.
Regards,
Sreenivas Veldanda
Thanks a lot for this..I wanted to have response back as ALEAUD for a no. of scenarios & wanted to avoid BPM...Thank you so much.Could you show it step by step as it is not clear as to how you changed the operation mappings in ICo ...It would be better if you also include screenshots of the ICO
Hi Adarsh,
Do ICO as normal IDOC to rfc (any) scenario. After doing normal ICO change the service interfaces and Operation Mapping in ESR. Otherwise it wont work....
Do the ID part with sample Asynchronous interface.then come to esr and do the necessary synchornous things.
Cheers,
Cnu
Hi Sreenivas
I have created everything as you have said in a POC and it is working fantastic , but the problem is say I have ORDERS.ORDERS01 idoc in my project and the ico object is being reused by other receivers also in which we dont capture and send response , how to do it in those cases , as we are using one single idoc sender channel only.
Please give me a call on 9007764930 as this is an urgent requirement and we are very grateful to you for such a nice blog.Also if you could share me your number.
Hi Arjun,
Sorry for the late response.. As per my knowledge we cant send response in your case. So, Pleasse ask ABAPERS to create custom IDOC in your case. It will solve your problem,...
Thanks,
Sreenivas
Hi Cnu,
Is itpossible to do the same with JDBC Sender in Synchronous Mode using RequestResponseBean?
Regards,
Sreeni.
Yes we can use ....... but for JDBC we can normally do that.... only for the case of IDOC we have todo ID part first den ESR.. Because of namespace confictls.
Cheers,
Cnu
HI Kancham,
Refer to my below blog where u can do RR Beans for JDBC scenario.
http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/12/04/jdbc-to-jdbc-synchronous-scenario-with-rr-beans-and-without-bpm-and-rfc-lookup
Regards,
karthick
Nice blog, very informative
Regards,
Rohini
Hi,
This is a nice start, but what if you have multiple synchronous receivers and want each response to get to a different (file-)location?
Kind regards,
Pascal
Nice info about IDOC using request/response bean.I have already bookmarked this blog.
Clarification: Only possible in SAP PI 7.3 right?
Best regards,
Monikandan
Yes... We can write modules for IDOC in SAP PI 7.31.
Thanks,
Sreenivas Veldanda.
Nice block...
Hi Sreenivas, nice work.
I have 1 question, If my scenario is "SOAP to IDOC_AAE" (PO 7.4):
How works everything? I tried to make something like this, but doesnt work.
regards,
Carlos Andres
Hi,
I am trying to use the same scenario for IDOC - SAP PI - SOAP ( Sync) then map the SOAP response to a separate IDOC.
Have you used this interface in Productive environment. Did you face issues in transport. Let me know the overall stability of this interface.
Thx in advance
Ravijeet
Hi Sreenivas,
I have an issue while creating response IDoc. Could you please check IDoc AAE receiver channel in ResponseOnewayBean
Hi Sreenivas,
I am having IDOC_AAE->SOAP synch web service->File scenario.
I have done exactly same way mentioned above but I am getting sender agreement not found and also receiverServcie is not getting replaced with the given value in adapter module, it's taking sender service from original request like in my case business system as IDOC is sender. Any idea how to resolve this issue?
Regards,
Priyanka