This post demonstrated an example of ASync/Sync bridge using adapter module.
High level overview:
An input file send asynchronous request to SAP PI, SAP PI route the request to synchronous RFC to return synchronous RFC result. SAP PI route the synchronous RFC result to asynchronous response and create output file.
Detailed overview:
2 main trick that make this Async/Sync bridge happened:
a) Sender file adapter CC_FILE_SND configured with module RequestResponseBean and RequestOnewayBean.
b) Outbound Async Service Interface SI_FNAME_LNAME_OUT_ASYNC contain both Request and Response message type. This is different because normally Async SI only contain Request message type.
Explanation on above flow with focus on CC_FILE_SND:
a) BC_Sender send input message to CC_FILE_SND
b) First module RequestResponseBean change the message type from asynchronous to synchronous by changing the message header.
c) The ReqRespBean parameter “passThrough” value “true” will pass the message to next module chain, which is CallSapAdapter.
d) After CallSapAdapter processed, the processing flow will route to OMFILE2RFC2FILE, go through Outbound SI, request message mapping, Inbound SI, call CC_RFC_ER1_RCV synchronously to return RFC response message.
e) RFC response message go through response message mapping, mapped to response MT_FULLNAME, and go all the way back to original caller module at CC_FILE_SND.
f) Third module ResponseOnewayBean change the message type from synchronous back to asynchronous.
g) Receiver system and receiver channel were determined from parameter “receiverSystem” and “receiverChannel” respectively.
h) Finally, the message delivered to receiver system via receiver channel in asynchronous way.
Module configuration at CC_FILE_SND:
AF_Modules/RequestResponseBean | passThrough
AF_Modules/ResponseOnewayBean | adapterNamespace, adapterType, receiverChannel, receiverService
Done! Above highlighted the “different” stuff that need to be done, for this Async/Sync bridge configuration. The rest configuration and setup will be normal standard way.
Below long list show screen capture of various ESR, ID and RWB message monitoring, for the sake of completeness. Check the last part message log of RWB message monitoring, there show useful processing trace on what actually happened at certain steps, useful for understanding as well.
List of ESR objects:
Imported RFC function module:
List of ID objects:
Enterprise Service Repository Objects:
Operation Mapping:
SI Outbound:
SI Inbound:
Mapping(Request):
Mapping(Response):
RFC Message:
Integration Directory Objects:
CC_FILE_SND:
CC_FILE_RCV:
Sender Agreement:
Receiver Determination:
Interface Determination:
Receiver Agreement:
Message monitoring:
CC_FILE_SND
CC_RFC_ER1_RCV:
The message log for CC_FILE_SND and CC_RFC_ER1_RCV is same:
CC_FILE_RCV:
Thanks for following till the end 🙂
Pingback:ASync/Sync Bridge File-RFC-File using Modules at Receiver Adapter | SAP Rainbow
Hi Expert,
Thanks for your valuable blog. I have a requirement like JDBC to RFC to JDBC (Async to Sync to Async)
Followed your steps on PI 7.4 receiving error in response. From ECC to JDBC im getting an error.
Error:
ROB: error during processing: com.sap.aii.af.lib.mp.module.ModuleException: Processing Error
Response message for message 6-c950-0000062d5bef(OUTBOUND) passed to the waiting “request” thread
Can you please help with your suggestions. Whether this will work on ICO or not.
Hi,
It is mentioned as “b) Outbound Async Service Interface SI_FNAME_LNAME_OUT_ASYNC contain both Request and Response message type. This is different because normally Async SI only contain Request message type.” but in the screen shot only Request Message Type can be seen.
I’ve try this example and it work. But you cannot use Async Outbound interface, SI_FNAME_LNAME_OUT_ASYNC must be sync interface as overview picture that you can insert request and response message.
Hi,
Can we archive the sender file in the FTP server instead of deleting in this async sync bridge scenario
Thanks,
Venkatesh
Thanks for the rainsbow. Is it possible to add email adapter (or any) to the above scenario. File (request)–> RFC (response to )—> (split = File+Email for example).
Hi,
It’s very useful for me and others at the same time could you please post Rest adapter scenarios
Thanks,
Vinod
Hi,
This is useful, but if it is Async outbound, how can we use sender outbound as sync (i am using File to RFC)
Thanks,
Padmavathi.