Application Development 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: 

Transforming Multiple record types with XSLT_TOOL

Francis417
Participant
0 Kudos

Dear Experts,

Appreciate if any hints or guidelines can be provided for the following.

I want to transform multiple record types to a single XML file or vice versa by making use of the standard transaction XSLT_TOOL but have no idea on how to do it.

I have no problem using in transforming single record type using XSLT_TOOL and would like to know if it is possible and how to do so for multiple record type.

Thanks.

5 REPLIES 5

Jelena
Active Contributor
0 Kudos

Not sure I understand the specific challenge here... What exactly do you mean by "multiple record types"? Would this be allowed by XML standard? And why do you need this?

Might want to add an example.

Former Member
0 Kudos

You could use deep structure whose fields are of different structure types. Once transformed, it will result in single xml file.

0 Kudos

I've seldom working with deep structure. Appreciate if any more guidelines or hints on using deep structure with the XLST_TOOL can be provided.

Many Thanks.

0 Kudos

Try running this code sample. The deep structure gets successfully converted to xml.

TYPES:
  BEGIN OF ts_deep,
	str1 TYPE vbak,
	str2 TYPE vbap,
	str3 TYPE vbep,
  END OF ts_deep.


DATA ls_deep TYPE ts_deep.
DATA lv_xml TYPE string.
TRY.
	CALL TRANSFORMATION id SOURCE root = ls_deep RESULT XML lv_xml.
	cl_demo_output=>display_xml( lv_xml ).
  CATCH cx_root.
ENDTRY.



Former Member
0 Kudos

To use this tool you need knowleged in XSLT language.

XSLT tutorial

Here you can learn to create xslt