Skip to Content

The Main Purpose of this Weblog is to Send the Response of RFC to File in an Asyn Mode.

Mainly RFC is a Synchronous Interface and File is an Asynchronous Interface. So we have to Maintain an Sync/Asyn Bridge. It is easy to Maintain a Proxy instead of Sync/Asyn Bridge.

So when we Create a Message Mapping we may not Map the file Message type to Response of RFC. So there is an Easy way to Send the Response of RFC to File in Asynchronous Mode.

The Best way is to Create a Proxy for the Response Message type of RFC as an Outbound Asyn Interface. Now Open an ABAP Report using Transaction SE38 and call the RFC and Send the response of RFC to Proxy Method.

1) Let us take an RFC(BUPA_CENTRAL_GET_DETAIL)in R/3 where the response of this RFC should be sent to file.
2) The Input for the RFC will be given as Parameters in ABAP Report and call the RFC in that Report.
3) Collect the Response of the RFC from Export Parameters
4) Now create a Proxy in the R/3 System in SProxy Transaction.
5) Declare a Data in the ABAP Report of the Class Created in the above Proxy. Create an Object for the Class.
6) Call the Method of that Class of Proxy.

Integration Builder – Design

1) Create the RFC Response that to be sent to File with name ‘Rfc_Resp_DT’.
image

2) Create the File Output Data Type with name ‘File_Output_DT’.
image

3) Create the RFC Response Message Type with name ‘Rfc_Resp_MT’.
image

4) Create the File Output Message Type with name ‘File_Output_MT’.
image

5) Create Outbound Asynchronous Interface for RFC Response Message type with Name ‘Rfc_Resp_OB_MI’.
image

6) Create Inbound Asynchronous Interface for File Output Message type with Name ‘File_Output_In_MI’.
image

7) Create Message Mapping for RFC Response Message Type to File Output Message Type with Name ‘Rfc_Resp_File_Output_MM’.
8) Create Interface Mapping for RFC Response Outbound interface and File Output Inbound interface with name ‘Rfc_Resp_File_Output_IM’.

Proxy Creation in R/3

9) Go to Transaction SPROXY. Choose our Message Interface and click Create.
image

10) Enter Package and Prefix Name.

Note: Maintain the Package as $TMP only.

image

11) Activate the Proxy Created.
image

12) Click on Class Interface name ‘ZSRCO_RFC_RESP_OB_MI’.
image

13) The Objects Created by Proxy are
image

ABAP Report Creation in R/3

14) Create an ABAP Report using Transaction SE38. Call the RFC in that Report. Send the import parameter to RFC by Parameters in report

Integration Builder – Configuration

15) Since it is Proxy Adapter there is no need for Sender Communication Channel & Sender Agreement to be Created.
16) Create the Receiver Determination, Interface Determination & Receiver Agreement.
17) Execute the ABAP Report & See the Output.

I Wish this Weblog will solve lot of Queries on RFC response and Executing it in Asynchronous Mode.

To report this post you need to login first.

8 Comments

You must be Logged on to comment or reply to a post.

  1. Michal Krawczyk
    hi,

    >>>>Weblog to send Response from RFC to File in Asyn Mode Using Proxy

    the title of this weblog shouldn’t contain “RFC” as RFC has nothing to do with that
    you’re just showing how to send data from
    a function module (FM) to XI

    RFC are “remotely” called modules and you’re executing your FM
    on R3 (not on any remote sytem) so it might be a little bit confusing
    for some people.

    Regards,
    michal

    (0) 
    1. Anton Wenzelhuemer
      hi,

      first, i fully have to agree with Michal. This has nothing to do with RFC.

      second, I wonder what this is good for at all. IMHO this is just an ‘overcomplexication’ of


      ....
      open dataset my_dataset.
      transfer the_stuff_from_my_fm to my_dataset.
      close my_dataset.
      ...

      anton

      (0) 
    1. Anonymous
      Hi,
      I had created this Blog because, if u need to send a Response of RFC to a file in an Asyn mode,
      then we need to create an RFC sender CC, TCP/IP connection and Execute the RFC in an ABAP Report.
      Here there is a problem, we cannot map the response of RFC to File data type. So, I created this Blog to show that we can use Proxy instead of RFC. For this Reason, I mentioned RFC in the Title.
      (0) 
      1. Bhavesh Kantilal
        Sriram,

        No offence intended, but if one were to write a blog for every scenario in which an ABAP proxy can be used, there will be tons of blogs out here on SDN.

        Regards
        Bhavesh

        (0) 
  2. Pushkar Anand
    Sorry to  say but, I dont think this adds any value to SDN SaiRam.
    Could you please tell us why do we need RFC instead of using Inbound Proxies if we want to have an asynchronous scenario.
    (0) 
  3. Karthick Sitaraman
    HI Sriram,

    I tried ur blog and crated scenario.

    Will it cerate file in XI server? When i run the report, it gives me the output, but there is no message in sxi_monitor/ RWB.

    Regards,
    Karthick S
    (0) 

Leave a Reply