<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Difference between loop within user-exit und test in se37 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291820#M1532888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some trouble with a certain user exit and the procedure it contains.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the user exit EXIT_SAPLV56U_004 to modify delivery note data, partner role to be exact. In this exit I call bapi BAPI_OUTB_DELIVERY_CHANGE. This is the code of the user exit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
z_header_data LIKE bapiobdlvhdrchg,
z_header_control LIKE bapiobdlvhdrctrlchg.

DATA: BEGIN OF itab_zheaderpartner,
      UPD_MODE_PARTN TYPE BAPIDLVPARTNERCHG-UPD_MODE_PARTN,
      DELIV_NUMB TYPE BAPIDLVPARTNERCHG-DELIV_NUMB,
      ITM_NUMBER TYPE BAPIDLVPARTNERCHG-ITM_NUMBER,
      PARTN_ROLE TYPE BAPIDLVPARTNERCHG-PARTN_ROLE,
      PARTNER_NO TYPE BAPIDLVPARTNERCHG-PARTNER_NO,
      ADDRESS_NO TYPE BAPIDLVPARTNERCHG-ADDRESS_NO,
      DESC_PARTN TYPE BAPIDLVPARTNERCHG-DESC_PARTN,
      MANUAL_ADDR TYPE BAPIDLVPARTNERCHG-MANUAL_ADDR,
      SCA_CODE TYPE BAPIDLVPARTNERCHG-SCA_CODE,
END OF itab_zheaderpartner.

DATA z_header_partner LIKE itab_zheaderpartner OCCURS 10 with
header line.

*DATA z_header_partner TYPE TABLE OF BAPIDLVPARTNERCHG WITH HEADER LINE.

DATA: itab_del_change_BAPIRET2 like BAPIRET2.
DATA: itab_commit_BAPIRET2 like BAPIRET2.

DATA z_del_change_BAPIRET2 LIKE itab_del_change_BAPIRET2 OCCURS 10 with
header line.

DATA z_commit_BAPIRET2 LIKE itab_commit_BAPIRET2 OCCURS 10 with
header line.

loop at i_xvttp.

z_header_partner-upd_mode_partn = 'U'.
z_header_partner-deliv_numb = i_xvttp-vbeln.
z_header_partner-partn_role = 'SP'.
z_header_partner-partner_no = i_xvttk-tdlnr.

z_header_data-deliv_numb = i_xvttp-vbeln.
z_header_control-deliv_numb = i_xvttp-vbeln.
z_header_control-no_lock = 'Y'.

CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
  EXPORTING
    header_data = z_header_data
    header_control = z_header_control
    delivery = i_xvttp-vbeln
*   techn_control =
  TABLES
    header_partner = z_header_partner
*   header_partner_addr =
*   header_deadlines =
*   item_data =
*   item_control =
*   item_serial_no =
*   supplier_cons_data =
*   extension1 =
*   extension2 =
    return = z_del_change_BAPIRET2.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    WAIT = 'X'
  IMPORTING
    RETURN = z_commit_BAPIRET2.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Continued in the second post ... Sorry for that but if i try to put it in one post, there is a display failure &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Sep 2010 11:53:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-09-06T11:53:00Z</dc:date>
    <item>
      <title>Difference between loop within user-exit und test in se37</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291820#M1532888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some trouble with a certain user exit and the procedure it contains.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the user exit EXIT_SAPLV56U_004 to modify delivery note data, partner role to be exact. In this exit I call bapi BAPI_OUTB_DELIVERY_CHANGE. This is the code of the user exit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
z_header_data LIKE bapiobdlvhdrchg,
z_header_control LIKE bapiobdlvhdrctrlchg.

DATA: BEGIN OF itab_zheaderpartner,
      UPD_MODE_PARTN TYPE BAPIDLVPARTNERCHG-UPD_MODE_PARTN,
      DELIV_NUMB TYPE BAPIDLVPARTNERCHG-DELIV_NUMB,
      ITM_NUMBER TYPE BAPIDLVPARTNERCHG-ITM_NUMBER,
      PARTN_ROLE TYPE BAPIDLVPARTNERCHG-PARTN_ROLE,
      PARTNER_NO TYPE BAPIDLVPARTNERCHG-PARTNER_NO,
      ADDRESS_NO TYPE BAPIDLVPARTNERCHG-ADDRESS_NO,
      DESC_PARTN TYPE BAPIDLVPARTNERCHG-DESC_PARTN,
      MANUAL_ADDR TYPE BAPIDLVPARTNERCHG-MANUAL_ADDR,
      SCA_CODE TYPE BAPIDLVPARTNERCHG-SCA_CODE,
END OF itab_zheaderpartner.

DATA z_header_partner LIKE itab_zheaderpartner OCCURS 10 with
header line.

*DATA z_header_partner TYPE TABLE OF BAPIDLVPARTNERCHG WITH HEADER LINE.

DATA: itab_del_change_BAPIRET2 like BAPIRET2.
DATA: itab_commit_BAPIRET2 like BAPIRET2.

DATA z_del_change_BAPIRET2 LIKE itab_del_change_BAPIRET2 OCCURS 10 with
header line.

DATA z_commit_BAPIRET2 LIKE itab_commit_BAPIRET2 OCCURS 10 with
header line.

loop at i_xvttp.

z_header_partner-upd_mode_partn = 'U'.
z_header_partner-deliv_numb = i_xvttp-vbeln.
z_header_partner-partn_role = 'SP'.
z_header_partner-partner_no = i_xvttk-tdlnr.

z_header_data-deliv_numb = i_xvttp-vbeln.
z_header_control-deliv_numb = i_xvttp-vbeln.
z_header_control-no_lock = 'Y'.

CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
  EXPORTING
    header_data = z_header_data
    header_control = z_header_control
    delivery = i_xvttp-vbeln
*   techn_control =
  TABLES
    header_partner = z_header_partner
*   header_partner_addr =
*   header_deadlines =
*   item_data =
*   item_control =
*   item_serial_no =
*   supplier_cons_data =
*   extension1 =
*   extension2 =
    return = z_del_change_BAPIRET2.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    WAIT = 'X'
  IMPORTING
    RETURN = z_commit_BAPIRET2.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Continued in the second post ... Sorry for that but if i try to put it in one post, there is a display failure &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 11:53:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291820#M1532888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-06T11:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between loop within user-exit und test in se37</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291821#M1532889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I can tell the code runs well, but no data gets modified in the VBAP. I also think I have found the source of the problem, but I do not understand what exactly goes wrong.&lt;/P&gt;&lt;P&gt;In the BAPI there is the following source code where the partner roles should be changed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM partner_upd_fill
        TABLES   it_header_partner STRUCTURE bapidlvpartnerchg
                 it_header_partner_addr STRUCTURE bapidlvpartnaddrchg
        CHANGING ct_partner_update TYPE shp_partner_update_t.

  DATA cs_partner_update TYPE shp_partner_update.
  DATA ls_header_partner TYPE bapidlvpartnerchg.

  &amp;lt;b&amp;gt;LOOP AT it_header_partner INTO ls_header_partner.&amp;lt;/b&amp;gt;
    CLEAR cs_partner_update.
    cs_partner_update-updkz_par = ls_header_partner-upd_mode_partn.
    cs_partner_update-vbeln_vl  = ls_header_partner-deliv_numb.
*     = IT_HEADER_PARTNER-ITM_NUMBER
    cs_partner_update-parvw     = ls_header_partner-partn_role.
    cs_partner_update-parnr     = ls_header_partner-partner_no.
*    = IT_HEADER_PARTNER-ADDRESS_NO
*    = IT_HEADER_PARTNER-DESC_PARTN
*    = IT_HEADER_PARTNER-MANUAL_ADDR

    IF ls_header_partner-manual_addr = gc_true.
      PERFORM partner_address_chg_fill
                      TABLES   it_header_partner_addr
                      USING    ls_header_partner-address_no
                      CHANGING cs_partner_update.
    ENDIF.
    APPEND cs_partner_update TO ct_partner_update.
  ENDLOOP.

ENDFORM.                    " PARTNER_UPD_FILL&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the loop marked in boldfaced letters the data from it_header_partner should be copied to lt_header_partner. But this does not work when I use the code in the user exit.&lt;/P&gt;&lt;P&gt;But if I just run the bapi in SE37, the loop works perfectly and the VBAP gets modified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there somebody who can help me with this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you and kind regards,&lt;/P&gt;&lt;P&gt;strobbel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: strobbel on Sep 6, 2010 1:54 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 11:53:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291821#M1532889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-06T11:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between loop within user-exit und test in se37</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291822#M1532890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you mean the LOOP doesn't work ? Are you sure the internal table &lt;STRONG&gt;it_header_partner&lt;/STRONG&gt; is populated when you call the BAPI via the User Exit ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert back with your observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Statutory Warning: You shouldn't use any COMMIT statements within your user exit !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 12:00:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291822#M1532890</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-09-06T12:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between loop within user-exit und test in se37</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291823#M1532891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx for your fast reply!&lt;/P&gt;&lt;P&gt;yes i'm absolutely sure that the &lt;STRONG&gt;it_header_partner&lt;/STRONG&gt; is populated because i've debugged the user-exit routine. meanwhile that i've seen that the internal table is filled with the correct data.&lt;/P&gt;&lt;P&gt;do you have any idea why the loop doesn't fills the internal table &lt;STRONG&gt;ls_header_partner&lt;/STRONG&gt; ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx for your help with the commit, i will delete it from the source code!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: strobbel on Sep 6, 2010 2:19 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 12:19:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291823#M1532891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-06T12:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between loop within user-exit und test in se37</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291824#M1532892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you update the partner, Update the itm_number with '000000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if you can update the sold to party. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delivery being related document, There may be an issue with data integrity etc. So, If you ask me, I will look for exits / events to update the delivery after the shipment is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, Don't commit within a user exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 12:22:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291824#M1532892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-06T12:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between loop within user-exit und test in se37</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291825#M1532893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Within the user-exit the &lt;STRONG&gt;itm_number&lt;/STRONG&gt; is filled with '000000'.&lt;/P&gt;&lt;P&gt;I don't want to change the sold-to-party. I want to change the forwarding agent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user-exit doesn't changes anything at the creation of an delivery, the user-exit is with the creation of an transport over transaction vt01n.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 12:30:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291825#M1532893</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-06T12:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between loop within user-exit und test in se37</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291826#M1532894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Strobbel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that you've defined &lt;STRONG&gt;z_header_partner&lt;/STRONG&gt; with header line. You must be knowing that internal tables with header lines are obsolete and shouldn't be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway fyi for int. tables with header lines the table name refers to the header line so i think you should use the square brackets to refer to the whole table structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
  EXPORTING
    header_data    = z_header_data
    header_control = z_header_control
    delivery       = i_xvttp-vbeln
  TABLES
    header_partner = z_header_partner[] "Use square brackets to pass the entire table
    return         = z_del_change_bapiret2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 12:38:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291826#M1532894</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-09-06T12:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between loop within user-exit und test in se37</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291827#M1532895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THX for your reply!&lt;/P&gt;&lt;P&gt;If i write the code like that (in square brackets), the &lt;STRONG&gt;it_header_partner&lt;/STRONG&gt; is not filled &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: strobbel on Sep 6, 2010 2:45 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: strobbel on Sep 6, 2010 2:46 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 12:45:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291827#M1532895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-06T12:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between loop within user-exit und test in se37</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291828#M1532896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Strobbel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see an issue with the loop endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What was the return parameter on delivery? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 13:06:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291828#M1532896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-06T13:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between loop within user-exit und test in se37</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291829#M1532897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've found out the problem &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my user-exit i had to change the definition of the z_header_partner table like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA z_header_partner LIKE TABLE OF BAPIDLVPARTNERCHG.

DATA itab_z_header_partner LIKE LINE OF z_header_partner.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that i had to change the filling of the z_header_partner table like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at i_xvttp.

clear z_header_partner.

itab_z_header_partner-upd_mode_partn = 'U'.
itab_z_header_partner-deliv_numb = i_xvttp-vbeln.
itab_z_header_partner-partn_role = 'SP'.
itab_z_header_partner-partner_no = i_xvttk-tdlnr.
append itab_z_header_partner TO z_header_partner.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 13:12:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291829#M1532897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-06T13:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between loop within user-exit und test in se37</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291830#M1532898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a Tabeltype for BAPIDLVPARTNERCHG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nicer would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Internal Table
DATA: z_header_partner      TYPE /spe/bapidlvpartnerchg_t.

* Work-area
DATA: itab_z_header_partner TYPE bapidlvpartnerchg.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will give you the exact same result,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Postema on Sep 6, 2010 3:33 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 13:31:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-loop-within-user-exit-und-test-in-se37/m-p/7291830#M1532898</guid>
      <dc:creator>rob_postema</dc:creator>
      <dc:date>2010-09-06T13:31:40Z</dc:date>
    </item>
  </channel>
</rss>

