cancel
Showing results for 
Search instead for 
Did you mean: 

XML to flat File:ABAP Class

Former Member
0 Kudos

Hi ,

Please can someone answer my question asap.

I have to write an ABAP Class which receives an XML Document which has multiple IDOCS.The IDOC has several Segments which can repeat and also the segments have Sub-Segments.

Please can someone provide me a sample code which can convert the fields of each segment to a line of the output flat file.

I need a flat file where fields under each segment should come in one line.I mean the control record should come in one line.The fields of 1st segment ex:E1EDK01 should come in 2nd line.....

Please revert.

Thanks in Advance,

Harish.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You will need to use ABAP ixml technology to parse the content from the xml file:

You can reference following ABAP mapping.

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/15ecdf90-0201-0010-d792-941a3c3c...

or SAP help doc:

http://help.sap.com/erp2005_ehp_04/helpdata/DE/86/8280d212d511d5991b00508b6b8b11/frameset.htm

Regards.

Liang

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks...sorry I was using a different ID as I lost this one.