cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vijaya,

thanks for your answer, yes you are right, the xml file is similer to my xml file, but in the pdf document only one field is mapped as well as its occurance is single. I wnat to map all the fields which are having multiple occurances.

Thanks !!

Sarvesh

Former Member
0 Kudos

Hi Sarvesh,

The pdf has details of ABAP mapping. The example given almost matches the xml file you want to be converted.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how to use abap-mapping in xi 3.0.pdf

Just in case you have not seen this

regards

Vijaya