<?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 Re: Outbound Invoice - User Exit - ABAP Code Correction in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-invoice-user-exit-abap-code-correction/m-p/4979171#M1160314</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wht ur code will do  is delete 2 and 3 segments. and spare the first one but ur requirement seems like u want to spare 3 one deleting first and second so do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: w_edidd LIKE edidd OCCURS 0 WITH HEADER LINE.
 
Data: lv_tabix type i value 0.
 

loop at int_edidd into w_edidd where segnam = 'E1EDP05'.

 if lv_tabix &amp;lt; 3.
delete int_edidd from w_edidd.
lv_tabix = lv_tabix + 1.
endif.
 
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 10 Jan 2009 07:41:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-10T07:41:31Z</dc:date>
    <item>
      <title>Outbound Invoice - User Exit - ABAP Code Correction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-invoice-user-exit-abap-code-correction/m-p/4979170#M1160313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi EDI and ABAP experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using INVOIC02 for outbound invoices. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever a discount is applied i will have 3 number of E1EDP05 segments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to keep the last segment and delete the earlier two segments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the code below, will you please let me know what is wrong with my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: w_edidd LIKE edidd OCCURS 0 WITH HEADER LINE.

Data: lv_tabix like sy-tabix.


loop at int_edidd where segnam = 'E1EDP05'.
clear lv_tabix.

lv_tabix = sy-tabix + 1.

read table int_edidd into w_edidd index lv_tabix.
if w_edidd-segnam = 'E1EDP05'.

delete int_edidd.
endif.

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Creasy Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Jan 2009 06:40:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-invoice-user-exit-abap-code-correction/m-p/4979170#M1160313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-10T06:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Outbound Invoice - User Exit - ABAP Code Correction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-invoice-user-exit-abap-code-correction/m-p/4979171#M1160314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wht ur code will do  is delete 2 and 3 segments. and spare the first one but ur requirement seems like u want to spare 3 one deleting first and second so do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: w_edidd LIKE edidd OCCURS 0 WITH HEADER LINE.
 
Data: lv_tabix type i value 0.
 

loop at int_edidd into w_edidd where segnam = 'E1EDP05'.

 if lv_tabix &amp;lt; 3.
delete int_edidd from w_edidd.
lv_tabix = lv_tabix + 1.
endif.
 
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Jan 2009 07:41:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/outbound-invoice-user-exit-abap-code-correction/m-p/4979171#M1160314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-10T07:41:31Z</dc:date>
    </item>
  </channel>
</rss>

