cancel
Showing results for 
Search instead for 
Did you mean: 

XI map Message ID from Proxy

Former Member
0 Kudos

Hello,

I need to map the Message ID from a Proxy to my outbound documents. I have one Proxy from R/3 that branches in XI to send out two documents. I want to map the Proxy's message id in both documents.

I have tried the UDF method mentioned in these forums using StreamTransformationConstant(MESSAGE_ID) but this returns the message id of each outgoing document, I need the message id from the original message.

Any ideas?

Thanks,

Matt

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

So you are saying I should use:

map.get(StreamTransformationConstants.MESSAGE_ID)

To get the current Message ID then use that Message ID in a DB Lookup to get the Parent ID?

In a way similar to what is described in the following blog:

[/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler|Lookupu2019s in XI made simpler - Siva Maranani]

Thanks,

Matt

Former Member
0 Kudos

Hi

That deals with DB look-up, but what you need is RFC look-up

you may need to create a java code, which does the work, compile & have them in your imported archives.

then add it to import section of your UDF & call its method to get the value.

you can have look at this for example

https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/user-defined%252bmapping%252bfunction%25...

you can try to use RFC_READ_TABLE FM for your requirement

other pointers are here

https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action%3fpageid=79955426

Regards

Vishnu

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks, Vishnu!

I was able to pull in the original Message ID with the RFC Lookup on that table.

Cheers,

Matt

Former Member
0 Kudos

Thanks for the quick response.

I tried that and it came up all zeros. Is there another way to use that REF_ID?

Thanks,

Matt

Former Member
0 Kudos

Hi

From table SXMSPMAST, you can get the value of PARENTMSG for your MSGGUID

the above are the exact field names in the table.

PARENTMSG is the parent msg id for your msg id MSGGUID

Regards

Vishnu

Former Member
0 Kudos

Hi

Try REF_TO_MESSAGE_ID

Regards

Vishnu