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:             

4 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
  • 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

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.