<?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: How to code this - Please advise in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-advise/m-p/6648666#M1444620</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if it is one time selection for &lt;STRONG&gt;bukrs,augbl,auggj,kostl,prctr,gsber,aufn&lt;/STRONG&gt; (mean you need to select the value from itab for only one combination of these fields) than you can simply fetch record in another itab and and at the same time do a count.&lt;/P&gt;&lt;P&gt;now based on the count value append the values in the required itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Mar 2010 12:22:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-19T12:22:30Z</dc:date>
    <item>
      <title>How to code this - Please advise</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-advise/m-p/6648665#M1444619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear friends,&lt;/P&gt;&lt;P&gt;     Please advise as how to code the below scenario in order to obtain the best performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've an internal table IT_BSAD.Now I've to check if in the combination of &lt;STRONG&gt;bukrs,augbl,auggj,kostl,prctr,gsber,aufnr&lt;/STRONG&gt;, if there is a single record in IT_BSAD, then it should be appended to IT_BSAD1 &amp;amp; if there are multiple records, then those should be appended to IT_BSAD2. In any case IT_BSAD1 &amp;amp; IT_BSAD2 should not contain duplicate records &amp;amp; records in IT_BSAD = records in IT_BSAD1 + Records in IT_BSAD2. I coded it somehow but it hangs in case of million of records. Please advise me the best way of doing it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll appreciate any help in this regard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks:&lt;/P&gt;&lt;P&gt;Gaurav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 09:45:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-advise/m-p/6648665#M1444619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-19T09:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to code this - Please advise</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-advise/m-p/6648666#M1444620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if it is one time selection for &lt;STRONG&gt;bukrs,augbl,auggj,kostl,prctr,gsber,aufn&lt;/STRONG&gt; (mean you need to select the value from itab for only one combination of these fields) than you can simply fetch record in another itab and and at the same time do a count.&lt;/P&gt;&lt;P&gt;now based on the count value append the values in the required itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 12:22:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-advise/m-p/6648666#M1444620</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-19T12:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to code this - Please advise</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-advise/m-p/6648667#M1444621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;prepare a sorted table with key bukrs,augbl,auggj,kostl,prctr,gsber,aufnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop it_basd assigning &amp;lt;fs_basd&amp;gt; .

at new sufnr.
lv_index = 0.
endat.

" move the fields to it_basd1 work area

"append it_basd1
lv_index = lv_index + 1.

if lv_index &amp;gt; 1.

if lv_index = 2.
read it_basd1 into iwa_basd2 with key  bukrs,augbl,auggj,kostl,prctr,gsber,aufnr.

append iwa_bsad2 into it_bsad2.

delete from  it_basd1 where  bukrs,augbl,auggj,kostl,prctr,gsber,aufnr.

endif.

" move the fields of &amp;lt;fs_basd&amp;gt; to it_basd2 work area

append iwa_bsad2 into it_bsad2.
endif.



endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this will help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nafran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Mar 2010 10:45:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-advise/m-p/6648667#M1444621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-22T10:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to code this - Please advise</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-advise/m-p/6648668#M1444622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the logical answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Mar 2010 04:24:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-code-this-please-advise/m-p/6648668#M1444622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-23T04:24:36Z</dc:date>
    </item>
  </channel>
</rss>

