Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

For Empty Value field XML is Not showing output.

Former Member
0 Kudos

Hi All,

Currently We are going upgrade from 4.6C to ECC 6.0 .

We are facing problem while reading the binary data in XML.

In the old system Empty tags are getting filled as <VALUE />.

Where as in ECC 6.0 if the field is empty, the tag is not getting generated.

Please guide,

Thanks & Regards,

Swapnil

2 REPLIES 2

Former Member
0 Kudos

ECC 6.0 works in the same way.

Empty tags looks like <Pernr/>

0 Kudos

Hi Jorge,

I am using following syntax.

Old System,

  • create & set encoding...

lo_encoding = lo_ixml->create_encoding(

byte_order = if_ixml_encoding=>co_none

character_set = 'UTF-8' ).

CALL METHOD lo_xml_doc->m_document->set_encoding(

encoding = lo_encoding ).

  • create output stream...

lo_stream_fact = lo_ixml->create_stream_factory( ).

lo_ostream = lo_stream_fact->create_ostream_xstring(

string = e_xml ).

CALL METHOD lo_xml_doc->m_document->render(

ostream = lo_ostream

recursive = 'X' ).

New Sytem.

  • create & set encoding...

lo_encoding = lo_ixml->create_encoding(

byte_order = if_ixml_encoding=>co_none

character_set = 'UTF-8' ).

CALL METHOD lo_xml_doc->m_document->set_encoding(

encoding = lo_encoding ).

  • create output stream...

lo_stream_fact = lo_ixml->create_stream_factory( ).

lo_ostream = lo_stream_fact->create_ostream_xstring(

string = e_xml ).

data : i_size like SY-TABIX .

CALL METHOD lo_xml_doc->RENDER_2_xSTRING(

IMPORTING

stream = e_xml

RETCODE = gd_rc

SIZE = i_size ).

Regards,

Swapnil