Application Development and Automation 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: 
Read only

XML Adding timestamp at node level

Former Member
0 Likes
1,009

Hi Experts,
I am working on an object where the entire internal table content should be downloaded to a XML file.
So to achieve that my code was

The gt_data [] is of type one custome Z table .

data : xmltable TYPE TABLE OF xmltab,

         xml_out TYPE string,

CALL TRANSFORMATION id

    SOURCE output = gt_data[]

    RESULT XML xml_out.

  APPEND xml_out TO xmltable .

Now they want "Time Stamp " to be added to the parent node like the attached screen shot.

Kindly guide me , how can i achieve it. I am quite new to XML stuffs . Hence seek your help.

Thanks and Regards,
Swarnadeepta

3 REPLIES 3
Read only

Former Member
0 Likes
803

Transaction code STRANS - there you can change the transformation to the way you need it.

Read only

0 Likes
803

Hi ,
Thanks for the response, but here do i have to make any changes to the Z table ?
how can i add the time stamp ?
i still could not get it ..

Read only

0 Likes
803

You need:

a) add the field to the table (to store the data),
b) add the field to the xml file (to be able to send the xml somewhere).

I don't know the requirement, that is up to you to find out where to put it. Time-stamp is just another field, it could be in multiple formats, so you need to find out, which one to use. Then find out, if the value is to be stored in the Z-table. Then either fill the gt_data-"timestamp_field" manually or by selecting the data  from your Z-table (your gt_data is filled somehow).

Either way you will need to look at the transformation and add the timestamp field to the correct place.