Skip to Content
0

Transforming Multiple record types with XSLT_TOOL

Mar 15 at 06:58 AM

143

avatar image

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.

abap | xml
10 |10000 characters needed characters left characters exceeded

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.

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Nakli Monky Mar 21 at 05:25 AM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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
Francis S.K. LUK

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.



0
Jorge Hernandez Mar 22 at 04:51 PM
0

To use this tool you need knowleged in XSLT language.

XSLT tutorial

Here you can learn to create xslt

Share
10 |10000 characters needed characters left characters exceeded