Skip to Content
2
Nov 28, 2020 at 08:48 AM

How to upload a XML file in an XML format on application server and formating it

311 Views Last edit Nov 28, 2020 at 08:50 AM 2 rev

Hi Team ,

I need your help in displaying the XML in a hierarchical format .

I am creating an XML using CALL TRANSFORMATION from an internal table and uploading it on the application server.

Below is the code snippet

xml_out is of type string.

CALL TRANSFORMATION ('ID')
SOURCE output = lt_employee
RESULT XML xml_out.

lv_file = '214_11.xml'.


OPEN DATASET lv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

TRANSFER xml_out TO lv_file.

CLOSE DATASET.

The XML is getting uploaded in a straight line

Is there a way I can display it in hierarchical format?

And I also notice that not all the in the string is getting displayed in the application server, the data is getting truncated so would need to know whats the reason.

Note: I tried the logic used in the previous answers from this community but did not work for my requirement.

Appreciate your help!

Attachments

capture.jpg (27.9 kB)