cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Transform from generic XML to ABAP structure

nicknf
Explorer
0 Likes
329

Dear community,

considering I have the following generic XML:

 

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <item>
    <id>1</id>
    <name>Item 1</name>
    <quantity>10</quantity>
  </item>
  <item>
    <id>2</id>
    <name>Item 2</name>
    <quantity>20</quantity>
  </item>
</root>

 

It is a valid XML, which however does not have the SAP specifics such as root called <abap> and the respective name space. How can I transform this into a ABAP structure structured exaxtly as the XML when using call transformation without defining an own XLST transformation?

The structure would look like this:

 

TYPES: BEGIN OF ty_item,
         id       TYPE i,
         name     TYPE string,
         quantity TYPE i,
       END OF ty_item.

 

 

 

Thanks for your help!

Accepted Solutions (0)

Answers (0)