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: 

Simple Transformation CX_ST_INVALID_XML

joseinnvaria84
Discoverer
0 Kudos

Hi, Expert

I'm getting the exception CX_ST_INVALID_XML when the transformation is called but I can't see any error when I check the transformation in STRANS, below you can see the code:

<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates" xmlns:ddic="http://www.sap.com/abapxml/types/dictionary">

  <tt:root name="BLOCKS" type="ddic:ZCRMT_OHIP_CREATE_MAIN_BLOCK"/>

  <tt:template>
    <blocks tt:ref=".BLOCKS">
      <blockInfo>
        <tt:loop ref=".BLOCKS.BLOCKINFO">
          <block>
            <blockDetails>
              <block_code tt:value-ref="BLOCK_CODE"/>
              <block_name tt:value-ref="BLOCK_NAME"/>
              <timeSpan>
                <start_date tt:value-ref="START_DATE"/>
                <end_date tt:value-ref="END_DATE"/>
              </timeSpan>
              <blockStatus>
                <bookingStatus>
                  <status>
                    <code tt:value-ref="CODE_STATUS"/>
                  </status>
                </bookingStatus>
              </blockStatus>
              <reservationType>
                <reservationType tt:value-ref="RESERVATION_TYPE"/>
              </reservationType>
              <marketCode>
                <marketCode tt:value-ref="MARKET_CODE.MARKET_CODE"/>
              </marketCode>
              <sourceOfSale>
                <sourceCode>
                  <sourceCode tt:value-ref="SOURCE_CODE.SOURCE_CODE"/>
                </sourceCode>
              </sourceOfSale>
            </blockDetails>
            <blockOwners>
              <tt:loop ref="OWNERS">
                <owner>
                  <ownership tt:value-ref="OWNERSHIP"/>
                  <ownerCode tt:value-ref="OWNERCODE"/>
                  <primary tt:value-ref="PRIMARY_OWNER"/>
                </owner>
              </tt:loop>
            </blockOwners>
            <reservationDetails>
              <ratePlanCode>
                <tt:loop ref="RESERVATION_DETAILS">
                  <primary tt:value-ref="PRIMARY_RATE"/>
                  <ratePlanCode tt:value-ref="RATE_CODE"/>
                </tt:loop>
              </ratePlanCode>
              <elastic tt:value-ref="ELASTIC"/>
            </reservationDetails>
            <catering>
              <eventAttendees>
                <noOfAttendees tt:value-ref="ATTENDEES"/>
              </eventAttendees>
            </catering>
            <comments>
              <commentInfo>
                <tt:loop ref="NOTES">
                  <comment>
                    <text>
                      <value tt:value-ref="VALUE"/>
                    </text>
                    <commentTitle tt:value-ref="TITLE"/>
                    <type tt:value-ref="TYPE_NOTE"/>
                    <internal tt:value-ref="INTERNAL"/>
                    <hotelId tt:value-ref="HOTEL_ID"/>
                  </comment>
                </tt:loop>
              </commentInfo>
            </comments>
            <externalAttributes>
              <eventType tt:value-ref="TYPE"/>
            </externalAttributes>
            <hotelId tt:value-ref="HOTEL_ID"/>
            <paymentMethod>
              <code tt:value-ref="PAYMENT_CODE"/>
            </paymentMethod>
          </block>
        </tt:loop>
      </blockInfo>
    </blocks>
  </tt:template>
</tt:transform>

Thanks you in advance,

Regards.

2 REPLIES 2

Sandra_Rossi
Active Contributor

Don't you think the issue comes from the XML to be transformed?

former_member660513
Participant
0 Kudos

Hello,

i guess the error occurs at runtime(the template itself is syntactically correct),

because the deep ABAP data structure that you pass does not fit to the template.

Don't you see technical details in the ST22 log?