<?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: help with select in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327680#M167677</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i made this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select   belnr gjahr&lt;/P&gt;&lt;P&gt;from rseg&lt;/P&gt;&lt;P&gt;into table itab&lt;/P&gt;&lt;P&gt;for all entries in &amp;lt;ls_itab&amp;gt;&lt;/P&gt;&lt;P&gt;where ebeln = &amp;lt;ls_itab&amp;gt;-ebeln&lt;/P&gt;&lt;P&gt;and ebelp = &amp;lt;ls_itab&amp;gt;-ebelp&lt;/P&gt;&lt;P&gt;and lfbnr = &amp;lt;ls_itab&amp;gt;-lblni.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i get &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unable to interept &amp;lt;ls_itab&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jun 2006 07:50:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-09T07:50:37Z</dc:date>
    <item>
      <title>help with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327673#M167670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select count(*) belnr gjahr&lt;/P&gt;&lt;P&gt;  from   rseg&lt;/P&gt;&lt;P&gt;  into   (z_count , rseg-belnr , rseg-gjahr)&lt;/P&gt;&lt;P&gt;  where  ebeln = &amp;lt;ls_itab&amp;gt;-ebeln&lt;/P&gt;&lt;P&gt;  and    ebelp = &amp;lt;ls_itab&amp;gt;-ebelp&lt;/P&gt;&lt;P&gt;  and    lfbnr  = &amp;lt;ls_itab&amp;gt;-lblni&lt;/P&gt;&lt;P&gt;  group by belnr gjahr.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  &amp;lt;ls_itab&amp;gt;-zgjahr = rseg-gjahr.&lt;/P&gt;&lt;P&gt;  &amp;lt;ls_itab&amp;gt;-zbelnr = rseg-belnr.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is wrong with this???&lt;/P&gt;&lt;P&gt;i heard that &amp;lt;b&amp;gt;ENDSELECT&amp;lt;/b&amp;gt; not good for performance what can i do to not use it in this select.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 07:23:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327673#M167670</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T07:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: help with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327674#M167671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a table with the three field and then change the select statement to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select count(*) belnr gjahr&lt;/P&gt;&lt;P&gt;from rseg appending &lt;/P&gt;&lt;P&gt;into table count_tab&lt;/P&gt;&lt;P&gt;where ebeln = &amp;lt;ls_itab&amp;gt;-ebeln&lt;/P&gt;&lt;P&gt;and ebelp = &amp;lt;ls_itab&amp;gt;-ebelp&lt;/P&gt;&lt;P&gt;and lfbnr = &amp;lt;ls_itab&amp;gt;-lblni&lt;/P&gt;&lt;P&gt;group by belnr gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 07:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327674#M167671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T07:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: help with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327675#M167672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select count(*) belnr gjahr&lt;/P&gt;&lt;P&gt;from rseg&lt;/P&gt;&lt;P&gt;into (z_count , &amp;lt;b&amp;gt;rseg-belnr , rseg-gjahr&amp;lt;/b&amp;gt;)&lt;/P&gt;&lt;P&gt;where ebeln = &amp;lt;ls_itab&amp;gt;-ebeln&lt;/P&gt;&lt;P&gt;and ebelp = &amp;lt;ls_itab&amp;gt;-ebelp&lt;/P&gt;&lt;P&gt;and lfbnr = &amp;lt;ls_itab&amp;gt;-lblni&lt;/P&gt;&lt;P&gt;group by belnr gjahr.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;lt;ls_itab&amp;gt;-zgjahr = &amp;lt;b&amp;gt;rseg-gjahr&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;lt;ls_itab&amp;gt;-zbelnr = &amp;lt;b&amp;gt;rseg-belnr&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)u select the value  from  rseg  and   into rseg both in same table.&lt;/P&gt;&lt;P&gt;make  a  internal table   type rseg  where  u store seelcted value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)if  u  use any airthmatic  function( count , sum...) than u have   to use  select  end select.&lt;/P&gt;&lt;P&gt;3) to avoid  select end select.ur  requirment  is to calulate  total number  of  data use &amp;lt;b&amp;gt;SY-DBCNT&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 07:28:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327675#M167672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T07:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: help with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327676#M167673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tal,&lt;/P&gt;&lt;P&gt;Declare one internal table with required fields ...&lt;/P&gt;&lt;P&gt;Then&lt;/P&gt;&lt;P&gt;select count(*) belnr gjahr&lt;/P&gt;&lt;P&gt;from rseg&lt;/P&gt;&lt;P&gt;into &amp;lt;b&amp;gt;table internal table&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;where ebeln = &amp;lt;ls_itab&amp;gt;-ebeln&lt;/P&gt;&lt;P&gt;and ebelp = &amp;lt;ls_itab&amp;gt;-ebelp&lt;/P&gt;&lt;P&gt;and lfbnr = &amp;lt;ls_itab&amp;gt;-lblni&lt;/P&gt;&lt;P&gt;group by belnr gjahr.&lt;/P&gt;&lt;P&gt;Now loop the inernal table and then then check the conditions using Read and if sy-subrc = 0 then delte that record from internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 07:28:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327676#M167673</guid>
      <dc:creator>sridharreddy_kondam</dc:creator>
      <dc:date>2006-06-09T07:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: help with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327677#M167674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Liat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact  better to avoid SELECT -ENDSELECT. But in your case, since you are using COUNT SELECT -ENDSELECT is needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT -ENDSELECT is having the posibility of hiting the database multiple times which reduced the performances.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt; Thomas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 07:29:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327677#M167674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T07:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: help with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327678#M167675</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;use &amp;lt;b&amp;gt;for all entries&amp;lt;/b&amp;gt; instead of select and endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select count(*) belnr gjahr
from rseg
into table itab
for all entries in &amp;lt;ls_itab&amp;gt;
where ebeln = &amp;lt;ls_itab&amp;gt;-ebeln
and ebelp = &amp;lt;ls_itab&amp;gt;-ebelp
and lfbnr = &amp;lt;ls_itab&amp;gt;-lblni
group by belnr gjahr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 07:32:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327678#M167675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T07:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: help with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327679#M167676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want to modify &amp;lt;ls_itab&amp;gt;? Then do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln ebelp lblni belnr gjahr&lt;/P&gt;&lt;P&gt;from rseg&lt;/P&gt;&lt;P&gt;into table itab&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN &amp;lt;ls_itab&amp;gt;&lt;/P&gt;&lt;P&gt;where ebeln = &amp;lt;ls_itab&amp;gt;-ebeln&lt;/P&gt;&lt;P&gt;and ebelp = &amp;lt;ls_itab&amp;gt;-ebelp&lt;/P&gt;&lt;P&gt;and lfbnr = &amp;lt;ls_itab&amp;gt;-lblni.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; SORT itab BY ebeln ebelp lblni.&lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;ls_itab&amp;gt;.&lt;/P&gt;&lt;P&gt;  l_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;  READ TABLE itab WITH KEY ebeln = &amp;lt;ls_itab&amp;gt;-ebeln&lt;/P&gt;&lt;P&gt;                           ebelp = &amp;lt;ls_itab&amp;gt;-ebelp&lt;/P&gt;&lt;P&gt;                           lblni = &amp;lt;ls_itab&amp;gt;-lblni.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    &amp;lt;ls_itab&amp;gt;-zgjahr = itab-gjahr.&lt;/P&gt;&lt;P&gt;    &amp;lt;ls_itab&amp;gt;-zbelnr = itab-belnr.&lt;/P&gt;&lt;P&gt;    MODIFY &amp;lt;ls_itab&amp;gt; INDEX l_tabix &lt;/P&gt;&lt;P&gt;           TRANSPORTING gjahr belnr.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 07:34:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327679#M167676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T07:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: help with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327680#M167677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i made this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select   belnr gjahr&lt;/P&gt;&lt;P&gt;from rseg&lt;/P&gt;&lt;P&gt;into table itab&lt;/P&gt;&lt;P&gt;for all entries in &amp;lt;ls_itab&amp;gt;&lt;/P&gt;&lt;P&gt;where ebeln = &amp;lt;ls_itab&amp;gt;-ebeln&lt;/P&gt;&lt;P&gt;and ebelp = &amp;lt;ls_itab&amp;gt;-ebelp&lt;/P&gt;&lt;P&gt;and lfbnr = &amp;lt;ls_itab&amp;gt;-lblni.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i get &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unable to interept &amp;lt;ls_itab&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 07:50:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327680#M167677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T07:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: help with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327681#M167678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tal,&lt;/P&gt;&lt;P&gt;I think the fields in ls_itab are not matching with the selct fields...u have to select the common fields in both tables...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this Link which can definitely help u...&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;http://www.sapdevelopment.co.uk/tips/tips_select.htm&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just compare with u r requirement and u will solve it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;sridhar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: sridhar reddy kondam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 08:36:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327681#M167678</guid>
      <dc:creator>sridharreddy_kondam</dc:creator>
      <dc:date>2006-06-09T08:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: help with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327682#M167679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How is &amp;lt;ls_itab&amp;gt; defined in your code? Earlier I thought it was already defined min your program as an internal table looking at you code, something like this:&lt;/P&gt;&lt;P&gt;FIELD-SYMBOL: &amp;lt;ls_itab&amp;gt; TYPE STANDARD TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now seems it is not the case. What is &amp;lt;ls_itab&amp;gt; then?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2006 18:15:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327682#M167679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-09T18:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: help with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327683#M167680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;field-symbols: &amp;lt;ls_itab&amp;gt; like itab1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Jun 2006 08:16:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327683#M167680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-11T08:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: help with select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327684#M167681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didnot understand. If you want to have the field symbol of structure like itab1, then why do you need field symbol at all? you could have itab1 itself instead. We generally use field symbol where its structure will be determined at the run time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Jun 2006 16:12:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-select/m-p/1327684#M167681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-11T16:12:54Z</dc:date>
    </item>
  </channel>
</rss>

