cancel
Showing results for 
Search instead for 
Did you mean: 

How to read a specific Payload ?

Former Member
0 Kudos

@Hi All,

I need to create an UDF to get the value of a specific payload "Communication Parameter (text/plain)" and map this value to a field (Graphical Mapping). How can I do that?

Thanks.

Diego Santos.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Diego,

Create a UDF and insert the command java, you search the value in tag xml:

String chNFe = inptxml.substring(inptxml.indexOf("<chNFe>") + "<chNFe>".length(),inptxml.indexOf("</chNFe>"));

return chNFe;

Regards.

Marcelo Macedo

Former Member
0 Kudos

Hello Diego!

If you need it on an UDF, use the InputAttachments/InputPayload objects available from mapping API:

http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/aii/mapping/api/InputAttachments.html

(you can also check on SDN for both objects, there are plenty of examples)

This requires 7.1. If you need it on XI 3.0/7.0, you will need the payload swap bean so you can get the attachment into the main body.

BR,

Lucas Santos

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

are you trying to read message content SXMSPMAST table? may be you can try using select statement in UDF but not sure it works or not.

Regards,

Raj