Skip to Content

There is very frequent requirement for the scenario like

1. Asynchronous interface like Idoc/ File will call the synchronous interface like RFC/web service

2. Merge some of the values from Idoc/ FIle request message with response message and send this message to create another file

It was impossible to achieve above scenario without BPM earlier. Then comes Async-sync bridge using RequestResponse and ResponseOneway beans to achieve async-sync scenario.

However still it was not possible to merge the values from request message with response message without BPM as there is no provision in PI to store the values of any field within PI.

That’s not the case now:

One can use GetPayloadValueBean and PutPayloadValueBean to achieve this.

I will not focus on async-sync bridge using RequestResponse and ResponseOneway beans as this is already well described on scn.

To continue with above scenario, we will take an example where

1. Asynchronous Request message sends SAP username and Reference username

2. Fetch SAP Id using SAP username using synchronous RFC call

3. Merge SAP Id and Reference Username and send it in response file

We can achieve this as follows:

1. Create File to RFC synchronous scenario with

     Request message having 2 fields SAP username, Reference Username

     Response message having 2 fields SAP Id and Reference Username

2. Configure async-sync bridge in sender file adapter using RequestResponse and ResponseOneway beans

3. In RFC adapter, configure GetPayloadValueBean, RemovePayloadValueBean and PutPayloadValueBean as follows:


We need value of Reference username to be merged with SAP Id. However we don’t pass this field to RFC. Then how can we store it?

For this purpose, I added one field in RFC structure in PI.

a. export xsd of RFC request structure

b. Edit xsd and add field WEBREFERENCEUSER

c. Import xsd in external definition and use it as the target message in request message mapping

The Operation mapping will have same RFC interface imported from SAP. We will use external definition only in message mapping.

Now, we use GetPayloadValueBean and store the value of WEBREFERENCEUSER in module context. It is like a variable which will hold the value of field (same as container variable in BPM). In above example, it is defined as test.

Define parameter as get:/ns1:BAPI_USER_GET_DETAIL/WEBREFERENCEUSER and value of parameter as test.

The parameter xmlns is used to define the namespace ns1. The multiple namespaces can be defined separated by space.

We can define multiple parameters to store multiple values.

So we have successfully stored the value for request message.

However we don’t want to pass WEBREFERENCEUSER to RFC call as there is no such field in RFC structure. So we remove the element before calling RFC using RemovePayloadValueBean.

parameter name : remove:/ns1:BAPI_USER_GET_DETAIL/WEBREFERENCEUSER

Same module key will be used as that of GetPayloadValueBean.

Then we call the RFC so we need to put GetPayloadValueBean and RemovePayloadValueBean before adapter’s module call.

Next, we need to retrieve the value stored earlier. So now we add PutPayloadValueBean after adapter’s module:

parameter name – put:/ns1:BAPI_USER_GET_DETAIL.Response/ADDRESS/ADDR_NO

parameter value – test —-> same module context where the value of request message was stored earlier

Here as well Same module key will be used as that of GetPayloadValueBean.

We can add a new field to Response structure or use existing one.

Then response mapping will map the value as required.

Below are the message log details:


The response mapping:


This is the response:

<?xml version=”1.0″ encoding=”UTF-8″?>

<ns1:mt_test_in xmlns:ns1=””>




Reference links:

To report this post you need to login first.


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

    1. Former Member Post author

      Thanks to both of you.

      As pointed by Prateek, there are many usecases. One can be this:

      The RemovePayloadValueBean can be used to remove some nodes from ouput.

      This can be used for mapping requirements like same source needs to be passed to target after removing some fields. So now this can be achieved using adapter module.

    1. Former Member

      Hi Praveen,

      I have used the below blog and creted a scenario(Soap to File) in 7.31 dual stack. I have configured the module in sender soap channel. Scenario is sucessfully executing but I’m not able to find the exact functionality of the module “PutPayload value bean”.

      My intention is to use this module is that it has to enrich the basic xml structure. But still I’m able to see the original payload in the Soap channel.

      Please guide me if there is any configuration chnages.


      Thanks in advance.



      1. Former Member

        Hi Jaya,

        As per your snap shot I can see that you have used GetPayloadValueBean in module configuration, but you should be using PutPayloadValueBean.

        Probably I have to correct this typo mistake in my blog. I am updating this now


        Praveen Gujjeti

          1. Former Member

            I remember that there is some exception for SOAP sender adapter (search forum), where in if we configure some standards/custom modules it will have no effect. May be you can configure the module in receiver file channel to see it’s effect.

            check this link for SOAP Adapter: Module Processor (SAP Library – SAP NetWeaver Exchange Infrastructure)

            â—Ź      In the sender adapter, you cannot add your own modules.


            Praveen Gujjeti

            1. Former Member

              Hi Praveen Gujjeti ,

              As per our project requirement we are working on Synchronous interface (RFC<–>SOAP) .Target system might return fault exception as well .In either case we need to capture one of the source field value .When I use two put values(one for normal response other for fault response) I’m getting below error.

              Transmitting the message using connection RFC_ failed, due to: java.lang.NullPointerException: while trying to invoke the method org.w3c.dom.Node.appendChild(org.w3c.dom.Node) of a null object loaded from local variable ‘template_parent’

              Configuration screenshot




              1. Former Member

                Hi Venkat,

                I think the issue you are facing is pretty straight forward. Since you get only either a proper response or a fault response always, hence one of the put statement will obviously fail since it can’t point to XPATH which doesn’t exist in response.


                Praveen Gujjeti

  1. Former Member

    Hi Beena,

    Thanks for the very informative blog. I was trying to implement something very similar to the above, but I am getting the following error in my channel:

    Message processing failed. Cause: Object not found in lookup of GetPayloadValueBean.

    Any idea how this error can be resolved?



    1. Former Member

      Hi Jyotika,

           Try specifying the module name as “localejbs/AF_Modules/GetPayloadValueBean”. Not simply “GetPayloadValueBean”. I got the same error.

  2. Mark Bernabe

    Hi Beena,

    Do these modules work for response with multiple occurences (i.e. BAPI_USER_GET_DETAIL.response/ADDRESS that is 0..unbounded) ? I have a similar scenario but my response can be more than 1. When I used the modules, the PutPayloadValueBean only worked on the 1st occurence.

    Any idea about this?

    Thank you.

  3. Former Member


    Can this GetPayloadValueBean and PutPayloadValueBean be used in below case.

    1. Web service at client side is in synchronous mode.
    2. There in no unique identifier between request and response

    Has any one faced any performance issue in GetPayloadValueBean and PutPayloadValueBean



Leave a Reply