cancel
Showing results for 
Search instead for 
Did you mean: 

Reading XML payload data based on Message ID

Former Member
0 Kudos

Hi,

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.

Thanks,

Ravi.

Accepted Solutions (0)

Answers (1)

Answers (1)

kasralikarpratik
Explorer
0 Kudos

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.