03-15-2017 6:58 AM
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.
03-20-2017 8:23 PM
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.
03-21-2017 5:25 AM
You could use deep structure whose fields are of different structure types. Once transformed, it will result in single xml file.
03-22-2017 10:17 AM
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.
03-22-2017 10:25 AM
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.
03-22-2017 4:51 PM