Skip to Content
avatar image
-2
Former Member

Unable to get the tag in xml .

i am creating an xml without call transformation method .

after creating xml file i am getting this tag <?xml version="1.0"?>.

but the requirement is to get this tag

<?xml version="1.0" encoding="UTF-8"?>..

kindly help.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 13, 2017 at 07:11 AM

    Try this code.

    CALL TRANSFORMATION id_indent
    SOURCE main_tag = it_xml
    RESULT XML xml_result.
    TRY.
    CALL METHOD cl_abap_conv_in_ce=>create
    EXPORTING
    encoding = 'UTF-8'
    input = xml_result
    RECEIVING
    conv = convin.

    CALL METHOD convin->read
    IMPORTING
    data = l_data.
    ENDTRY.

    Add comment
    10|10000 characters needed characters exceeded