Gyan Factory

Gyan Factory
SAP Technical Project Support

Saturday, January 16, 2016

Simple Transformation of Structure Using Tx- XSLT_TOOL / STRANS ( ABAP-> XML)

This post demonstrates how to transform any ABAP structured data to XML format So that it can be passed to any third party system for further action. Here let's convert a structure (Work Area) context to xml data.

Step1. Let's assume we need to convert any record data of this table into XML format.























Step2. In Tx- SE11 create a structure with the below fields.















Step3. Go to Tx- SXLT_TOOL.







Step4. Provide a transformation name and create it.















Step5. Provide short text, select as Simple Transformation and continue.










Step6. Save it and click on SourceCde tab.















Step7. Click on the Wizard button.















Step8. The below screen appears













Step9. Right click on the Root Node and select Insert New Root.













Step10. Provide any root_name and the above created structure name.

















Step11. The below screen appears. Now Drag the Node 'FLIGHT_LINE' to the Right side of the screen and drop under Simple Transformation tab.












Step12. After drop the screen looks like below as shown . Activate it and go back.














Step13. The Below program code generated automatically.

Step14. Go to Tx- SE38 and create a report so that we can call the above created transformation and convert the abap data to XML format.






















Step15. Execute the program. Here we can use the standard FM or the ABAP Class ->Method to display the XML structure that i separated by the Transformation.



















Step16. The O/P appears as below:

No comments:

Post a Comment