<?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 APPEND in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/append/m-p/3598293#M866596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all &lt;/P&gt;&lt;P&gt;If u see below there are two SELECT statements.In the first statement am selecting RECORD1 and in the second SELECT statement i want to select RECORD2.But whats happening is RECORD 1 is getting selected TWICE and in the output am getting as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RECORD1&lt;/P&gt;&lt;P&gt;RECORD1&lt;/P&gt;&lt;P&gt;RECORD2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using INTO table it_bseg in the second statment but am not getting it.Am also using DELETE ADJACENT.....But am getting the same out put.Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards &lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT &lt;/P&gt;&lt;P&gt;belnr gjahr buzei bschl koart shkzg wrbtr&lt;/P&gt;&lt;P&gt;sgtxt saknr hkont kunnr lifnr prctr FROM bseg &lt;/P&gt;&lt;P&gt;INTO TABLE it_bseg FOR ALL ENTRIES IN it_bkpf&lt;/P&gt;&lt;P&gt;WHERE bukrs EQ p_bukrs AND belnr EQ it_bkpf-belnr AND&lt;/P&gt;&lt;P&gt;gjahr EQ p_gjahr AND umskz NE 'F' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not it_bseg[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;belnr gjahr buzei bschl koart shkzg wrbtr sgtxt saknr hkont kunnr lifnr prctr FROM bseg&lt;/P&gt;&lt;P&gt;APPENDING table it_bseg&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_bseg WHERE bukrs EQ p_bukrs AND belnr EQ it_bseg-belnr AND gjahr EQ p_gjahr&lt;/P&gt;&lt;P&gt;AND umskz NE 'F' AND bschl IN r_bschl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM it_bseg comparing bschl belnr prctr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Mar 2008 09:46:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-17T09:46:02Z</dc:date>
    <item>
      <title>APPEND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append/m-p/3598293#M866596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all &lt;/P&gt;&lt;P&gt;If u see below there are two SELECT statements.In the first statement am selecting RECORD1 and in the second SELECT statement i want to select RECORD2.But whats happening is RECORD 1 is getting selected TWICE and in the output am getting as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RECORD1&lt;/P&gt;&lt;P&gt;RECORD1&lt;/P&gt;&lt;P&gt;RECORD2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using INTO table it_bseg in the second statment but am not getting it.Am also using DELETE ADJACENT.....But am getting the same out put.Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards &lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT &lt;/P&gt;&lt;P&gt;belnr gjahr buzei bschl koart shkzg wrbtr&lt;/P&gt;&lt;P&gt;sgtxt saknr hkont kunnr lifnr prctr FROM bseg &lt;/P&gt;&lt;P&gt;INTO TABLE it_bseg FOR ALL ENTRIES IN it_bkpf&lt;/P&gt;&lt;P&gt;WHERE bukrs EQ p_bukrs AND belnr EQ it_bkpf-belnr AND&lt;/P&gt;&lt;P&gt;gjahr EQ p_gjahr AND umskz NE 'F' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not it_bseg[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;belnr gjahr buzei bschl koart shkzg wrbtr sgtxt saknr hkont kunnr lifnr prctr FROM bseg&lt;/P&gt;&lt;P&gt;APPENDING table it_bseg&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_bseg WHERE bukrs EQ p_bukrs AND belnr EQ it_bseg-belnr AND gjahr EQ p_gjahr&lt;/P&gt;&lt;P&gt;AND umskz NE 'F' AND bschl IN r_bschl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM it_bseg comparing bschl belnr prctr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 09:46:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append/m-p/3598293#M866596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T09:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: APPEND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append/m-p/3598294#M866597</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;SORT the internal table table before deleting the entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Ravi Sankar.Z&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 13:20:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append/m-p/3598294#M866597</guid>
      <dc:creator>ravisankara_varaprasad</dc:creator>
      <dc:date>2008-03-17T13:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: APPEND</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append/m-p/3598295#M866598</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;The problem is due the condition "AND bschl IN r_bschl" in the second select statement since the select option may be initial. When you use select option, it will fetch a record even when the select option parameter field is initial and if all other conditions are satisfied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Muthu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 17:02:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append/m-p/3598295#M866598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T17:02:22Z</dc:date>
    </item>
  </channel>
</rss>

