Skip to Content

Reading XML payload data based on Message ID

Feb 20 at 06:56 PM


avatar image


I need to read the Interface input values(XML input Payloads) based on XML message ID(tcode: SXMB_MONI) in my program.

Ex:If interface input is having one of the field - Invoice Number - 12345678 ( I need to read this field value from my program based on XML message ID).

1.Based on message ID and by using the FM - SXMB_GET_MESSAGE_PAYLOAD OR SXMB_READ_MESSAGE_VERSION_RAW I am getting XML data and using the method I am converting this data to string format.

Problem is after this how to convert this XML string data and read the specific XML input node value?

Please let me your ideas on this.



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Pratik Kasralikar Feb 20 at 07:48 PM

Use class CL_XML_DOCUMENT which has lot of methods related to XML parsing. With its method IMPORT_FROM_FILE you can upload the file from the work station, or you can parse the content with PARSE_STRING, or PARSE_XSTRING, or PARSE_TABLE. After parsing you can find node with FIND_NODE.

10 |10000 characters needed characters left characters exceeded