<?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: regarding select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472507#M556013</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;while using for all entries statement,first u have to check weather the table is empty or not.if the first itab is initial it will return all records from second table.&lt;/P&gt;&lt;P&gt;use this code.&lt;/P&gt;&lt;P&gt;if not ig_bseg[] is initial.&lt;/P&gt;&lt;P&gt;select statement.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jun 2007 09:22:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-25T09:22:47Z</dc:date>
    <item>
      <title>regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472501#M556007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select belnr                           " to get the data from bkpf for the given compnay code date range and for the particular user&lt;/P&gt;&lt;P&gt;         bukrs&lt;/P&gt;&lt;P&gt;         budat&lt;/P&gt;&lt;P&gt;         gjahr&lt;/P&gt;&lt;P&gt;         bstat&lt;/P&gt;&lt;P&gt;         budat&lt;/P&gt;&lt;P&gt;  from   bkpf&lt;/P&gt;&lt;P&gt;  into   corresponding fields of table ig_bkpf&lt;/P&gt;&lt;P&gt;  for all entries in ig_ypctrusr&lt;/P&gt;&lt;P&gt;  where  bukrs = p1  and&lt;/P&gt;&lt;P&gt;         budat in budat and&lt;/P&gt;&lt;P&gt;         usnam = ig_ypctrusr-usnam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select belnr&lt;/P&gt;&lt;P&gt;         bukrs&lt;/P&gt;&lt;P&gt;         gjahr&lt;/P&gt;&lt;P&gt;         dmbtr&lt;/P&gt;&lt;P&gt;         prctr&lt;/P&gt;&lt;P&gt;         pprct&lt;/P&gt;&lt;P&gt;         sgtxt&lt;/P&gt;&lt;P&gt;         hkont&lt;/P&gt;&lt;P&gt;  from   bseg&lt;/P&gt;&lt;P&gt;  into   corresponding fields of table ig_bseg&lt;/P&gt;&lt;P&gt;  for all entries in  ig_bkpf&lt;/P&gt;&lt;P&gt;  where belnr = ig_bkpf-belnr and&lt;/P&gt;&lt;P&gt;        bukrs = ig_bkpf-bukrs and&lt;/P&gt;&lt;P&gt;        gjahr = ig_bkpf-gjahr and&lt;/P&gt;&lt;P&gt;        prctr in prctr            and&lt;/P&gt;&lt;P&gt;        pprct in pprct            and&lt;/P&gt;&lt;P&gt;        hkont = '0000150203'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am using this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now there is no data in ig_bkpf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when it is selectig data from bseg it is selecting all the data from bseg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any body tell why this is hapening.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:17:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472501#M556007</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472502#M556008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Write&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;if not ig_bkpf[] is initial.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;select belnr&lt;/P&gt;&lt;P&gt;bukrs&lt;/P&gt;&lt;P&gt;gjahr&lt;/P&gt;&lt;P&gt;dmbtr&lt;/P&gt;&lt;P&gt;prctr&lt;/P&gt;&lt;P&gt;pprct&lt;/P&gt;&lt;P&gt;sgtxt&lt;/P&gt;&lt;P&gt;hkont&lt;/P&gt;&lt;P&gt;from bseg&lt;/P&gt;&lt;P&gt;into corresponding fields of table ig_bseg&lt;/P&gt;&lt;P&gt;for all entries in ig_bkpf&lt;/P&gt;&lt;P&gt;where belnr = ig_bkpf-belnr and&lt;/P&gt;&lt;P&gt;bukrs = ig_bkpf-bukrs and&lt;/P&gt;&lt;P&gt;gjahr = ig_bkpf-gjahr and&lt;/P&gt;&lt;P&gt;prctr in prctr and&lt;/P&gt;&lt;P&gt;pprct in pprct and&lt;/P&gt;&lt;P&gt;hkont = '0000150203'.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:19:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472502#M556008</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472503#M556009</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;check like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not ig_bkpf[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select belnr&lt;/P&gt;&lt;P&gt;bukrs&lt;/P&gt;&lt;P&gt;gjahr&lt;/P&gt;&lt;P&gt;dmbtr&lt;/P&gt;&lt;P&gt;prctr&lt;/P&gt;&lt;P&gt;pprct&lt;/P&gt;&lt;P&gt;sgtxt&lt;/P&gt;&lt;P&gt;hkont&lt;/P&gt;&lt;P&gt;from bseg&lt;/P&gt;&lt;P&gt;into corresponding fields of table ig_bseg&lt;/P&gt;&lt;P&gt;for all entries in ig_bkpf&lt;/P&gt;&lt;P&gt;where belnr = ig_bkpf-belnr and&lt;/P&gt;&lt;P&gt;bukrs = ig_bkpf-bukrs and&lt;/P&gt;&lt;P&gt;gjahr = ig_bkpf-gjahr and&lt;/P&gt;&lt;P&gt;prctr in prctr and&lt;/P&gt;&lt;P&gt;pprct in pprct and&lt;/P&gt;&lt;P&gt;hkont = '0000150203'.&lt;/P&gt;&lt;P&gt;endif.&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;seshu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:21:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472503#M556009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472504#M556010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is normal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rule for using "For all entries" is that on which internal table you are using For all entries that should not be empty so put your second select in The condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not it_bseg[] is iinitial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put your select here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:22:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472504#M556010</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472505#M556011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish ,&lt;/P&gt;&lt;P&gt;  This is one very important point we need to consider when we use FOR ALL ENTRIES , if there are no records in the internal table then it will ignore the internalt table in the where clause and consider all other options .&lt;/P&gt;&lt;P&gt;In your case it will get all records which satisfy the condition&lt;/P&gt;&lt;P&gt;prctr in prctr and&lt;/P&gt;&lt;P&gt;pprct in pprct and&lt;/P&gt;&lt;P&gt;hkont = '0000150203'..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it is always said to check if the internal table has records before we actually process for all entries.&lt;/P&gt;&lt;P&gt;if there are no entries the select statement must not be processed .&lt;/P&gt;&lt;P&gt;Use an IF condition to implement it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:22:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472505#M556011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472506#M556012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select data from BSEG only if ig_bkpf is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ig_bkpf[] is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ....from BSEG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&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;Suruchi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:22:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472506#M556012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472507#M556013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;while using for all entries statement,first u have to check weather the table is empty or not.if the first itab is initial it will return all records from second table.&lt;/P&gt;&lt;P&gt;use this code.&lt;/P&gt;&lt;P&gt;if not ig_bseg[] is initial.&lt;/P&gt;&lt;P&gt;select statement.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:22:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472507#M556013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472508#M556014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Just remember that whenever you are using FOR ALL ENTRIES,make sure to check whether the internal table is empty or not.&lt;/P&gt;&lt;P&gt;Only when the table is not empty proceed to do the select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will solve your problem.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:23:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472508#M556014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472509#M556015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi anji can oyu please tell m,e why this was happening even after the table ig_bkpf is empty why it is selecting all the data from bseg when we are using FOR ALL ENTRIES statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it should look into bseg only for those records which are in ig_bkpf .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and since it is empty why it is taking al the records from bseg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please clear this doubt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:23:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472509#M556015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472510#M556016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to check that the internal table is not initial before running for all entries.&lt;/P&gt;&lt;P&gt;Else it gives all the data from the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:24:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472510#M556016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472511#M556017</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;Whenever u use FOR ALL ENTRIES for selecting data, then if ITTAB is initial check has to be done .&lt;/P&gt;&lt;P&gt;In ur case,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the 2nd select query, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If ig_bkpf is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select belnr&lt;/P&gt;&lt;P&gt;bukrs&lt;/P&gt;&lt;P&gt;gjahr&lt;/P&gt;&lt;P&gt;dmbtr&lt;/P&gt;&lt;P&gt;prctr&lt;/P&gt;&lt;P&gt;pprct&lt;/P&gt;&lt;P&gt;sgtxt&lt;/P&gt;&lt;P&gt;hkont&lt;/P&gt;&lt;P&gt;from bseg&lt;/P&gt;&lt;P&gt;into corresponding fields of table ig_bseg&lt;/P&gt;&lt;P&gt;for all entries in ig_bkpf&lt;/P&gt;&lt;P&gt;where belnr = ig_bkpf-belnr and&lt;/P&gt;&lt;P&gt;bukrs = ig_bkpf-bukrs and&lt;/P&gt;&lt;P&gt;gjahr = ig_bkpf-gjahr and&lt;/P&gt;&lt;P&gt;prctr in prctr and&lt;/P&gt;&lt;P&gt;pprct in pprct and&lt;/P&gt;&lt;P&gt;hkont = '0000150203'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, this wil select the required records as per ur query.&lt;/P&gt;&lt;P&gt;****reward points if useful.&lt;/P&gt;&lt;P&gt;All the best&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:25:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472511#M556017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472512#M556018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT query is fetching all the data from BSEG as the internal in FOR ALL ENTRIES is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When this table is empty it assumes to fetch all the data hence....the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just make the necessary changes as shown and your problem will be solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

select belnr " to get the data from bkpf for the given compnay code date range and for the particular user
bukrs
budat
gjahr
bstat
budat
from bkpf
into corresponding fields of table ig_bkpf
for all entries in ig_ypctrusr
where bukrs = p1 and
budat in budat and
usnam = ig_ypctrusr-usnam.

&amp;lt;b&amp;gt;if not ig_bkpf is initial.&amp;lt;/b&amp;gt;

select belnr
bukrs
gjahr
dmbtr
prctr
pprct
sgtxt
hkont
from bseg
into corresponding fields of table ig_bseg
for all entries in ig_bkpf
where belnr = ig_bkpf-belnr and
bukrs = ig_bkpf-bukrs and
gjahr = ig_bkpf-gjahr and
prctr in prctr and
pprct in pprct and
hkont = '0000150203'.

&amp;lt;b&amp;gt;endif.&amp;lt;/b&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Kunjal Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:25:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472512#M556018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472513#M556019</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;Before use  " for all entries  itab" we should check first table (ig_bkpf&lt;/P&gt;&lt;P&gt;)should not be initial. if its initial it will go to DUMP.so we need to check initial condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If use all entries in your slelect quary it will fecth all records based on first internal table (ig_bkpf) to second internal table  (ig_bseg)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards all helpfull ansewrs .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regrads.&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:26:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472513#M556019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: regarding select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472514#M556020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Write&lt;/P&gt;&lt;P&gt;if not ig_bkpf[] is initial.&lt;/P&gt;&lt;P&gt;select belnr&lt;/P&gt;&lt;P&gt;bukrs&lt;/P&gt;&lt;P&gt;gjahr&lt;/P&gt;&lt;P&gt;dmbtr&lt;/P&gt;&lt;P&gt;prctr&lt;/P&gt;&lt;P&gt;pprct&lt;/P&gt;&lt;P&gt;sgtxt&lt;/P&gt;&lt;P&gt;hkont&lt;/P&gt;&lt;P&gt;from bseg&lt;/P&gt;&lt;P&gt;into corresponding fields of table ig_bseg&lt;/P&gt;&lt;P&gt;for all entries in ig_bkpf&lt;/P&gt;&lt;P&gt;where belnr = ig_bkpf-belnr and&lt;/P&gt;&lt;P&gt;bukrs = ig_bkpf-bukrs and&lt;/P&gt;&lt;P&gt;gjahr = ig_bkpf-gjahr and&lt;/P&gt;&lt;P&gt;prctr in prctr and&lt;/P&gt;&lt;P&gt;pprct in pprct and&lt;/P&gt;&lt;P&gt;hkont = '0000150203'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt; if your first internal table is not filled then the second internal table will be filled with the records which satisfy the condition mentioned in the selec quaery.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:27:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-select-statement/m-p/2472514#M556020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T09:27:43Z</dc:date>
    </item>
  </channel>
</rss>

