Application Development and Automation 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: 
Read only

Getting Dump while executing XML transformation

0 Likes
1,776

Hi All,

I am generating XML file from two internal table. But while executing the XML transformation command for the second internal table i am getting dump.

My code looks like below.

Transformation call

CALL TRANSFORMATION ZJ_1IER1_XML_INTERUNITTRANS OPTIONS XML_HEADER = 'NO'
    SOURCE inter_goods_rc          = gt_intrgds
                        inter_unit_tr           = gt_intrunit
     RESULT XML  xml_interunittransferx.

Here gt_intrgds and gt_intrunit are two internal table.

The Transformation is as below.

<?sap.transform simple?>

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

  <tt:root line-type="ddic:J_1IER1_INTRUNTRNF" name="INTER_UNIT_TR"/>

  <tt:root line-type="ddic:J_1IER1_INTGDSRECV" name="INTER_GOODS_RC"/>

  <tt:template>

    <CLEARANCE-DETAIL-FOR-INTER-UNIT-TRANSFERS>

      <tt:loop ref=".INTER_UNIT_TR">

        <CLEARANCE-DETAIL-FOR-INTER-UNIT-TRANSFER>

          <REGISTRATION-NUMBER-RECIPIENT-UNIT tt:value-ref="$REF.REG_NO_REC_UNIT"/>

         <NAME-ADDRESS-RECIPIENT-PREMISES tt:value-ref="$REF.NAME_ADRR_RECIPIENT"/>

          <CETSH tt:value-ref="$REF.CETSH"/>

          <DESCRIPTION-GOODS-SENT tt:value-ref="$REF.DESC_GOODS_SENT"/>

          <UOQ tt:value-ref="$REF.UOQ"/>

          <QUANTITY-CLEARED tt:value-ref="$REF.QUANT_CLEARED"/>

        </CLEARANCE-DETAIL-FOR-INTER-UNIT-TRANSFER>

      </tt:loop>

   </CLEARANCE-DETAIL-FOR-INTER-UNIT-TRANSFERS>

    <RECEIPT-DETAILS-OF-INTERMEDIATE-GOODS-RECEIVEDS>

      <tt:loop ref=".INTER_GOODS_RC">

        <RECEIPT-DETAILS-OF-INTERMEDIATE-GOODS-RECEIVED>

          <RECEIPT-DETAILS-OF-INTERMEDIATE-GOODS-RECEIVED tt:value-ref="$REF.REC_DET_IGR"/>

          <REGISTRATION-NUMBER-RECIPIENT-UNIT tt:value-ref="$REF.REG_NO_REC_UNIT"/>

          <NAME-ADDRESS-RECIPIENT-PREMISES tt:value-ref="$REF.NAME_ADRR_RECIPIENT"/>

          <CETSH tt:value-ref="$REF.CETSH"/>

          <DESCRIPTION-GOODS-SENT tt:value-ref="$REF.DESC_GOODS_SENT"/>

          <UOQ tt:value-ref="$REF.UOQ"/>

          <QUANTITY-CLEARED tt:value-ref="$REF.QUANT_CLEARED"/>

        </RECEIPT-DETAILS-OF-INTERMEDIATE-GOODS-RECEIVED>

      </tt:loop>

    </RECEIPT-DETAILS-OF-INTERMEDIATE-GOODS-RECEIVEDS>

  </tt:template>

</tt:transform>

When i run program in debug mode it will execute the program till the statement </CLEARANCE-DETAIL-FOR-INTER-UNIT-TRANSFERS>. But during execution of <RECEIPT-DETAILS-OF-INTERMEDIATE-GOODS-RECEIVEDS> ( marked in red above ) i am getting dump.

One more observation is if i pass only one internal table (either of one mentioned above) and modify the transformation accordingly i am not getting dump. Getting dump only when i use both internal tables.

Please help me on this.

Regards,

5 REPLIES 5
Read only

Former Member
0 Likes
1,172

Hello Shreenath Bhat,

Did you know that you do not need to create an XML transformation, to convert a table to an XML file?

You can simply use the inherent transformation identity 'id'.

For example:   

        call transformation id
         source a1 = i_tab         

          result xml b1

a1      = is just a name (or label) and does not need a data definition.

i_tab  = a table type or table defined in the SAP Dictionary and contains the data to be trasnsformed.

b1       = can be data type string or xstring.

Maybe this approach will solve your issue.

Regards,

Kim

Read only

0 Likes
1,172

Hi Kim,

Thanks for replaying.

As you see above my code i am sending two internal table to transformation. Also there is XML tags in between the two tables.

I have one more transformation as below and it is working fine. I donot know why above said  one is not working.

CALL TRANSFORMATION zbj_1ier1_clearance_b OPTIONS XML_HEADER = 'NO'
      SOURCE clearance_details = itab_clearance
             NOTIFICATIONS = itab_notif
             DUTY_PAYABLE = itab_dutypayable
      RESULT XML  xml_clearancex.

Regards,

shree

Read only

0 Likes
1,172

Hello Shreenath,

Could it be that  you misspelled RECEIVED.. you have RECEIVEDS on one line but RECEIVED on the next.   

Regards,

Kim

Read only

0 Likes
1,172

Hi Kim,

That is the requirement that we had. That is the format that we need to use.

Regards,

shree

Read only

0 Likes
1,172

Hi Shree,

What is the exact error message?

Regards,

Kim