Skip to Content
avatar image
Former Member

Reading XML payload data based on Message ID

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • 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.

    Add comment
    10|10000 characters needed characters exceeded