cancel
Showing results for 
Search instead for 
Did you mean: 

PI message ID in mapping field

former_member223432
Participant
0 Kudos

Hi experts,

We have a requirement of generating a Uique number in ECC....since in PI, we have message id for every incoimg message which is UNIQUE , we need to pass the same messsage ID as a filed value in PI and map to one of the ECC field ...is it possible?

regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

yes it is possible

http://wiki.sdn.sap.com/wiki/display/Snippets/UDFtoReadMessageIDofaPIMessage

former_member223432
Participant
0 Kudos

Thank you michal/Amit..

problem solved

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

use this code in the mapping:

java.util.Map map = container.getTransformationParameters();

String YourMessageID = (String)map.get(StreamTransformationConstants.MESSAGE_ID);

return YourMessageID;

Note:

it does not work if you have a mapping inside a ccBPM

Regards,

Michal Krawczyk