Skip to Content

Transforming Multiple record types with XSLT_TOOL

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.

Add comment
10|10000 characters needed 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.

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Mar 21, 2017 at 05:25 AM

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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member 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.
      
      
      
  • avatar image
    Former Member
    Mar 22, 2017 at 04:51 PM

    To use this tool you need knowleged in XSLT language.

    XSLT tutorial

    Here you can learn to create xslt

    Add comment
    10|10000 characters needed characters exceeded