Unnessacery tags in XML

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply
RGoeken
Posts: 45
Joined: Fri Aug 11, 2006 3:18 am

Unnessacery tags in XML

Post by RGoeken » Tue Aug 16, 2011 12:25 am

Hi,

I am converting a nested internal table to XML with the function modules
SDIXML_DATA_TO_DOM and
SDIXML_DOM_TO_XML

The result looks OK but has som <item> tags that I don't know where they come from as they are not in my internal table cause I am only using header and pos:

Code: Select all

 TYPES: BEGIN OF ty_merc,
             header TYPE zmercheader,
             pos    TYPE zmercpos OCCURS 0,
           END OF ty_merc.

Does anybody know where these tags come from and how I can loose them? Here's part of the XML:

<?xml version="1.0" encoding="UTF-8"?>
-<IT_MERC>-<item>-<HEADER><TANUM>0000000000</TANUM><ADDR1>01R34567890123456789012345678901234567890123456789</ADDR1><TPC>0123456789012345678901234567890123456789</TPC><TSL>01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789ABCDEFGHIJ</TSL><TWEI>0123456789012345678901234567890123456789</TWEI><PCUST>0123456789.JPG</PCUST><DATF>DDMMJJJJ</DATF><CULT>NL</CULT><LCUST>LOGO.JPG</LCUST></HEADER>-<POS>-<item>-<item><TAPOS>0000</TAPOS><FT1>1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-1234567890-12345678</FT1><MATNR>000000000000083009</MATNR><KDMAT>MATERIAAL</KDMAT><KMM>1234567890-1234567890-1234567890-12</KMM><TPB>+/- 27 STUKS</TPB><TNW>+/- 250 GRAM</TNW><PID>83009_NL.JPG</PID>

Baz
Posts: 4748
Joined: Fri Nov 08, 2002 5:54 am
Location: He's out there! somewhere!!!!
Contact:

Re: Unnessacery tags in XML

Post by Baz » Tue Aug 16, 2011 12:32 am

how is zmercpos typed?
Baz

AsPiRiNg tUlY iDiOt Image

http://www.catb.org/~esr/faqs/smart-questions.html

Image

check out my Podcasts http://dj-baz.podomatic.com

RGoeken
Posts: 45
Joined: Fri Aug 11, 2006 3:18 am

Re: Unnessacery tags in XML

Post by RGoeken » Tue Aug 16, 2011 12:37 am

Hi,

ZMERCPOS is a table type with a line type.

Post Reply