Skip to Content
-2
Jul 16, 2018 at 05:26 AM

How to edit the XML string

686 Views

Hi Experts,

I have an XML file (converted from adobe pdf), and I have to update few fields.

I have used below code,

CALL FUNCTION 'SMUM_XML_PARSE'
EXPORTING
xml_input = l_XML_RAW
TABLES
xml_table = g_t_xml_info
return = g_t_return.

LOOP at g_t_xml_info ...

*update the fields from internal table

ENDLOOP

CALL TRANSFORMATION (`ID`)
SOURCE tab = g_t_xml_info[]
RESULT XML xml_out.

But the xml_out is not the same format as the original XML string, It has tags as HIER, TYPE, CNAME, CVALUE(fields of g_t_xml_info) which was not there in original XML string.

How can I get the same format after updating the XML, Please let me know.

Regards,

Sachin