cancel
Showing results for 
Search instead for 
Did you mean: 

Read Inbound payload at mapping execution of the outbound interface

Former Member
0 Kudos

Hi,

The sap system is sending us a field, that is not avaible on the web service we are consuming.

The problem is that the sap system requires this field at the responce.

How can I read the inbound payload, when I'm mapping the outbound responce?

Thanks in advance,

A

Accepted Solutions (1)

Accepted Solutions (1)

henrique_pinto
Active Contributor
0 Kudos

Simplest scenario: in the input mapping, fill a custom-specific Dynamic Configuration (your own namespace & tech name) and retrieve it in output mapping.

Best,

Henrique.

Former Member
0 Kudos

Hi Henrique,

And... how can this be done? Do you have any example?

Muito Obrigado!

Ariel

henrique_pinto
Active Contributor
0 Kudos

Seach for details on creating dynamic configuration object & key.

Then, just do:

Input mapping:

conf.put(value, "http://my.namespace.com/", MyField);

Output mapping:

Str value = conf.get("http://my.namespace.com/", MyField);

Best,

Henrique.

Former Member
0 Kudos

There you are!

Thank you very much!

Ariel

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>How can I read the inbound payload, when I'm mapping the outbound responce?

1. you can use a BPM to do that - but this will not be very efficient flow then

and it's very bad idea to use BPMs for sync flows

2. you can query SAP inside response message mapping to get this one field

again quite slow due to lookup

3. you can ask WS provider to store this additional field and send it back - the best approach in terms of processing

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi!

Thanks for your responce.

Well, I will ignore solutions 1 and 3. The project has an a "must" not tu use BPM and is not possible to modify the web service due it's a closed system (legal issues).

And regarding the second point, are you proposing to create an RFC on the sap system?, The problem is that is not possible to reconstruct the relationship between the responce and the sended message. That is why I need to read the outbound payload.

Is there any walkaround to "export" this field at the outbound mapping (Context objects?) and then import it at the inbound mapping? Where are the messages stored?... I was thinking that maybe i'll be able to read the sended message using ABAP mapping, using the msgid to read an ABAP table (dont know which one). Can this be done?

Thanks again,

A

Former Member
0 Kudos

Hi,

I've found this FM: SXMB_GET_MESSAGE_PAYLOAD and it would be great to read the inbound payload at the outbound mapping, just for one thing: it does truncate the payload :-s

Does anyone knows why?

Thx,

A

Edited by: Abravo_CL on May 20, 2009 10:52 PM

I was'nt reading the payload correctly... it works great

Former Member
0 Kudos

Hey

We did a exact same scenario some time ago and made use of ABAP mapping,we created a ZTable in XI itself,then once a request is sent from sender system,we were storing some attributes of it in this table via ABAP mapping,when we got back response,again do a ABAP mapping and pull these attributes from the ZTable.

Thanx

Aamir

Former Member
0 Kudos

HI,

Could you please elaborate on how to create a Ztable in XI?

Regards,

ANika

Former Member
0 Kudos

Hey

Its same as creating Ztable in R/3 system.Just go to SE11,give the table name there(make sure it starts with Z or Y),then hit "Create".after that give all the parameters for the table and thats it:)

Thanx

aamir

Former Member
0 Kudos

Thanks to everybody!... Finally I managed how to do it, I did it using the FM SXMB_GET_MESSAGE_PAYLOAD.

Then I just used the iXML parser to get the field I was needing.

Thanks to all and hope this technic will be useful to anyone else.

Regards,

Ariel