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.
async_sync_simple_overview
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.
async_sync_detail_overview
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:
async_sync_cc_file_snd_module
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:
async_sync_esr_objects
 
Imported RFC function module:
async_sync_esr_objects_rfc

List of ID objects:
async_sync_id_objects

Enterprise Service Repository Objects:

Operation Mapping:
async_sync_om
async_sync_om_response
SI Outbound:
async_sync_si_out_async
SI Inbound:
async_sync_si_in_sync

Mapping(Request):
async_sync_mm_request
Mapping(Response):
async_sync_mm_response
RFC Message:
async_sync_esr_rfc_request

async_sync_esr_rfc_response

Integration Directory Objects:

CC_FILE_SND:
async_sync_cc_file_snd
async_sync_cc_file_snd_fcc
async_sync_cc_file_snd_module
CC_FILE_RCV:
async_sync_cc_file_rcv
Sender Agreement:
async_sync_cc_file_snd
Receiver Determination:
async_sync_id_receiver_determination
Interface Determination:
async_sync_id_interface_determination
Receiver Agreement:
async_sync_id_receiver_agreement

Message monitoring:

CC_FILE_SND
async_sync_rwb_cc_file_snd_overview
CC_RFC_ER1_RCV:
async_sync_rwb_cc_rfc_rcv_overview
The message log for CC_FILE_SND and CC_RFC_ER1_RCV is same:
async_sync_rwb_cc_file_snd_detail async_sync_rwb_cc_file_snd_detail_log1async_sync_rwb_cc_file_snd_detail_log2
CC_FILE_RCV:
async_sync_rwb_cc_file_rcv_overview
async_sync_rwb_cc_file_rcv_detail
async_sync_rwb_cc_file_rcv_detail_log
Thanks for following till the end 🙂

ASync/Sync Bridge File-RFC-File using Modules at Sender Adapter
Tagged on:             

8 thoughts on “ASync/Sync Bridge File-RFC-File using Modules at Sender Adapter

  • Pingback:ASync/Sync Bridge File-RFC-File using Modules at Receiver Adapter | SAP Rainbow

  • August 25, 2016 at 12:01 am
    Permalink

    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.

    Reply
  • January 7, 2017 at 2:40 am
    Permalink

    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.

    Reply
    • August 3, 2018 at 6:19 pm
      Permalink

      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.

      Reply
  • November 5, 2017 at 2:01 pm
    Permalink

    Hi,
    Can we archive the sender file in the FTP server instead of deleting in this async sync bridge scenario
    Thanks,
    Venkatesh

    Reply
  • February 16, 2018 at 10:20 pm
    Permalink

    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).

    Reply
  • October 27, 2018 at 1:56 pm
    Permalink

    Hi,
    It’s very useful for me and others at the same time could you please post Rest adapter scenarios
    Thanks,
    Vinod

    Reply
  • July 14, 2019 at 4:32 pm
    Permalink

    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.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *