cancel
Showing results for 
Search instead for 
Did you mean: 

Store value from request message to be processed in response mapping

Former Member
0 Kudos

Hi,

I have the following synchronous scenario:

R/3 (ABAP Proxy) <> XI/PI <> 3rd party Web Service

I need to reference a value in the sender (request) message in the response mapping.

For example:

A request with a user ID is received from R/3 to XI/PI. I want to store the user ID in the request message. A response is received from the web service. I then want to use the user ID in the response mapping.

I believe XI/PI can meet this requirement with a BPM using container or possibly using a custom table to store Message GUID and the variable value in the request message mapping.

Are there any other methods that can be used to meet this scenario?

Thanks and regards,

Duke

Accepted Solutions (1)

Accepted Solutions (1)

former_member192295
Active Contributor
0 Kudos

Hi,

I think your requiremet we can do in below mentioned ways.

1. Use Global variable to store data (while process request flow) and read again (while process response flow) from global variable. If PI version 7.0 will support.

2. use UDF to store value in local text file (while processing request flow). Again read value from text file (while processing response flow). After read remove file from disk.

I hope above one will help. One one my previous requirement i did.

Former Member
0 Kudos

Thanks for the reply Nallam.

I thought Global Containers were only valid for that specific message mapping and not the interface mapping.

I wil give it a try.

Thanks and regards,

Duke

Former Member
0 Kudos

The global container did not work. It seems that you can only use the global container within the message mapping itself.

In my scenario, I need a value from the request payload in the request mapping to be used in the response mapping.

Any other ideas?

Thanks and regards,

Duke

Answers (3)

Answers (3)

former_member181985
Active Contributor
0 Kudos

Check my Blog: [Usage of Dynamic Configuration in Synchronous Scenarios|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/18151] [original link is broken] [original link is broken] [original link is broken];

Regards,

Praveen Gujjeti

Former Member
0 Kudos

Hi,

I've been able to implement sthg similar to your requirement (we needed the document number in the JDBC XMLSQL insert response) ... Because we do this synchronously, I store a docNumber specific header in the request msg DynamicConfiguration object, and read it in a mapping when processing the response !

Not sure it suits you

Rgds

Chris

Former Member
0 Kudos

Hi Duke,

I am not sure about your requirements, however, if you have a value in a payload xml, you can use this message to do other mappings with more than one input, and add to it some logic.

I think when you are refering to a "global container", you are trying to have something like an auxiliar variable, correct? You can create a message, that only is used inside the BPM to keep such values, and use it on message mapping to do comparisons or whatever.

Best Regards,

Pedro M. D. Pereira

stefan_grube
Active Contributor
0 Kudos

> I've been able to implement sthg similar to your requirement (we needed the document number in the JDBC XMLSQL insert response) ... Because we do this synchronously, I store a docNumber specific header in the request msg DynamicConfiguration object, and read it in a mapping when processing the response !

I tried the same with SOAP adapter but I had to notice that the SOAP adapter removes all entries in DynamicConfiguration while creating the response.

Former Member
0 Kudos

Hi All,

This is the first time I've encountered such a requirement. Most of the time we create our own programs that call the sender proxy, so to interogate the results and call another proxy would be the ideal solution. But, in this case the standard LSO process controls the execution of the proxy. We may look into doing an enhancement to the standard code, but I was looking for a way we can do this in PI with minimal effort.

As Stefan stated, I also noticed that the DynamicConfiguration is emptied in the response.

We will explore the use of BPM, but from what I can see, utilizing a custom table with the runtime constant MESSAGE_ID may be the simplest solution in PI.

Thanks and regards,

Duke

stefan_grube
Active Contributor
0 Kudos

This is not possible. The receiver of the message has to copy the field to the response.

But why does the sender need a vlaue which is already available in a local variable of the ABAP program which calls the proxy?

Former Member
0 Kudos

Hi Stefan,

The reason why I'm exploring this is that we are trying to utilize the standard process that calls a proxy service delievered for LSO. The 3rd party web service returns an array of results, which we need to interogate based on an attribute value in the request message and invoke another web service call.

I guess, I will explore further the idea of using a custom table with the message guid.

Thanks,

Duke

stefan_grube
Active Contributor
0 Kudos

I have read the same scenario once in forum.

Have you or one of your collegues already asked this?

I recommend to redesign the process.

The webservice should return only values, that are requested from sender.

Former Member
0 Kudos

why don't u send the array in the response to ABAP proxy and let it decide/trigger the next web service call as the request ID is already available in ABAP

is this sync scenario or 2 asyn scenario like multiple request sent as async messaes and u get the final response from webservice as the secodn interface