Skip to Content

SOAP to RFC synchronous scenario with File


We came across scenarios where we have to integrate java application with SAP ECC by using RFC.

This time we got the same requirement but with the twist:

1) Java application is sending SOAP message to PI and PI should route that message (after converting SOAP message to XI message) to RFC.

2) After receiving the response from RFC PI should send the response to Java application. Now here comes the little tweak, we need to map RFC response to File as well apart from sending SOAP response message (which is generated after mapping RFC response message to Java application response structure) back to Java application.

We were initially thinking to implement the above scenario by using the RFC lookup, but client did not agree to our solution as lookups have problem with errors troubleshooting.So we thought to implement with BPM.
This will give also a clear picture of BPM for starters, as I have included all the steps of BPM.

End to End process flow

Description of the scenario:

We are calling RFC “RFC_GET_SYSTEM_INFO” which is present in most of the ECC systems. Let’s first go thru the objects that need to be created for the above requirement:

We will not be creating Data type, Message type objects as we will be using RFC as a message type. So we will be having only Message interface type objects.

1) Message interface:

1.1 MI_TEST_ECCSysDetails_ABS_Sync:Abstract synchronous interface

Request message type: RFC_GET_SYSTEM_INFO

Response message type:RFC_GET_SYSTEM_INFO.Response

1.2 MI_TEST_ECCSysDetails_ABS_ECCResponse:Abstract Asynchronous interface Message type: RFC_GET_SYSTEM_INFO.Response.

1.3 MI_TEST_ECCSysDetails_ABS_ECCRequest:Abstract Asynchronous interface Message type: RFC_GET_SYSTEM_INFO.

1.4 MI_TEST_RFCResp_In: inbound interface

Message type RFC_GET_SYSTEM_INFO.Response.

No message mapping is required as we are sending/consuming same RFC structure.

2) Integration process design:

First define two container variables: one variable “SendECCmsg” refering abstaract interface MI_TEST_ECCSysDetails_ABS_ECCRequest and another “SendJavamsg” refering abstract interface MI_TEST_ECCSysDetails_ABS_ECCResponse.

Integration Process

2.1 Receive step

This is the first step in integration process. Under properties tab select the start process checkbox, and select message with container variable “SendECCmsg” and with mode “Opens S/A bridge” and select the synchronous interface MI_TEST_ECCSysDetails_ABS_Sync.

2.2 Send step

Properties:mode=synchronous,synchronous interface=MI_TEST_ECCSysDetails_ABS_Sync, Request message=container variable “SendECCmsg” and Response message=container variable “SendtoJava”.

2.3 Send step

Properties:mode=closes S/A bridge,message=container variable “SendJavamsg”, opened by= value equals to the description you have given to the first receive step, it asks for the step name which has open this S/A bridge. This step finally gives response back to Java application, which is RFC response message received from the SAP ECC (from the step 2.2).

So uptill now, we have covered upto sending RFC response message to Java application. Now we need to send the same response message to business system as a XML file. For this we will add another send step.

2.4 Send

Properties: mode=asynchronous,Message=container variable “SendJavamsg”,

That’s it.

Now after activating all the objects we need to go for configuration!

Configuraion objects:

Import the integration process in to ID from ESR.

Create one communication channel for file receiver adapter to create file.One SOAP sender adapter for sending SOAP request message from Java applicaiton to XI with quality of service Best Effort. One RFC receiver adapter for executing RFC on SAP ECC.


1.Receiver determination: From Java business system to Integration process with outbound interface “MI_TEST_ECCSysDetails_ABS_Sync”.

Create corresponding Interface determination with inbound interface”MI_TEST_ECCSysDetails_ABS_Sync”, as we are receiving the same message as it is in integration process.

2.Receiver determination: From Integration process to ECC system with the outbound interface “MI_TEST_ECCSysDetails_ABS_Sync”.

Create corresponding interface determination inbound interface with the RFC “RFC_GET_SYSTEM_INFO”.

3.Receiver determination: From Integration process to Third party system with outbound interface “MI_TEST_ECCSysDetails_ABS_ECCResp”

Create corresponding interface determination inbound interface with “MI_TEST_RFCResp_In”.

4. Create sender agreements for SOAP adapter. Create receiver agreement for RFC and File adapter.

Generate WSDL from ID from the sender agreement of SOAP adapter and you can use any SOAP test tool to send SOAP request message to PI. 


Here is the SOAP request which I am sending with Altova XML Spy:

SOAP Request image

And the response(this is partial response, I have cut down the full response message):

Partial RFC response received by Altova XML spy

File with the same RFC response also would be generated at the location based on file adapter configuration.

The same framework can be used in any scenario where we have both side Sync interfaces and also file(async) has to be dumped. Thanks to Ankit Agrawal who just came to my desk and thought if this can be achieved, and then journey began!

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

    My two cents about the blog:
    1) I am not able to view the pictures 🙂
    2) I fail to understand why is it published as a blog. It would have suited more as a wiki section. From your description what I assume is your BPM will have steps like
    Receive –> SYNCSend –> Send(Close S/A) –> Send

    I would have loved to see a new feature that S/A achieves or BPM achieves….some setting which is still hidden from the world….basically something new.

    Not to discourage you, but then we would be prompted to post every solution that we achieve  as a blog. Which at least I think is not the purpose of a blog!


    • Thanks Abhishek and Vijay.
      Actually I could not find solution on SDN so thought to publish blog on this which can give information to the BPM starters.Anyways this was my first start blog. But will try to post innovative solution only!