Skip to Content
0
Former Member
Apr 05, 2006 at 11:29 AM

How to convert xml file into internal table in ABAP Mapping.

108 Views

Hi All,

I am trying with ABAP mapping. I have one scenario in which I'm using below xml file as a sender from my FTP server.

<?xml version="1.0" encoding="UTF-8" ?> 
- <ns0:MTO_ABAP_MAPPING xmlns:ns0="http://Capgemini/Mumbai/sarsingh">
  <BookingCode>2KY34R</BookingCode> 
- <Passenger>
  <Name>SARVESH</Name> 
  <Address>THANE</Address> 
  </Passenger>
- <Passenger>
  <Name>RAJESH</Name> 
  <Address>POWAI</Address> 
  </Passenger>
- <Passenger>
  <Name>CARRON</Name> 
  <Address>JUHU</Address> 
  </Passenger>
- <Flight>
  <Date>03/03/07</Date> 
  <AirlineID>UA</AirlineID> 
  <FlightNumber>125</FlightNumber> 
  <From>LAS</From> 
  <To>SFO</To> 
  </Flight>
  </ns0:MTO_ABAP_MAPPING>

AT the receiver side I wnat to concatenate the NAME & ADDRESS.

I tried Robert Eijpe's weblog (/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach)

but couldnt succeed to convert the xml file into internal table perfectly.

Can anybody help on this.

Thanks in advance!!

Sarvesh