<?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: Empty Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485378#M1061858</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nilesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewrite the Select query as below;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT buzei bschl belnr gsber hkont zuonr kostl dmbtr sgtxt
INTO CORRESPONDING FIELDS OF gtab FROM bseg
FOR ALL ENTRIES IN ntab 
WHERE belnr = ntab-belnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now this will fetch data from the database provided that ntab contains some records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Sep 2008 04:43:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-17T04:43:11Z</dc:date>
    <item>
      <title>Empty Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485376#M1061856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;append lines of itab to ntab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort ntab by belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;can u plz tell me that in foll. code why ntab is showing all values but not gtab ..?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gtab is showing blank i.e. no records in it..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;plzzz&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;thankx in advance....&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from ntab comparing belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_IT_SHOW_ANY_TABLE_ON_ALV'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    table          =  ntab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select buzei bschl belnr gsber hkont zuonr kostl dmbtr sgtxt&lt;/P&gt;&lt;P&gt;into corresponding fields of gtab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_IT_SHOW_ANY_TABLE_ON_ALV'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    table          =  gtab.&lt;/P&gt;&lt;P&gt;from bseg&lt;/P&gt;&lt;P&gt;where belnr = ntab-belnr.&lt;/P&gt;&lt;P&gt;append gtab.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 04:32:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485376#M1061856</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T04:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485377#M1061857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use for all entries statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Farzan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Farzan Mohamed on Sep 17, 2008 6:47 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 04:39:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485377#M1061857</guid>
      <dc:creator>former_member137336</dc:creator>
      <dc:date>2008-09-17T04:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485378#M1061858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nilesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewrite the Select query as below;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT buzei bschl belnr gsber hkont zuonr kostl dmbtr sgtxt
INTO CORRESPONDING FIELDS OF gtab FROM bseg
FOR ALL ENTRIES IN ntab 
WHERE belnr = ntab-belnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now this will fetch data from the database provided that ntab contains some records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 04:43:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485378#M1061858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T04:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485379#M1061859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no its still showing blank table..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 04:48:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485379#M1061859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T04:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485380#M1061860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any values in BSEG for the BELNR s in ntab... Please check going to se16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Farzan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 04:52:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485380#M1061860</guid>
      <dc:creator>former_member137336</dc:creator>
      <dc:date>2008-09-17T04:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485381#M1061861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ntab is showing all the required data but gtab is still empty...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 04:52:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485381#M1061861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T04:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485382#M1061862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nilesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not really understand your coding but perhaps you wanted to do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF ( ntab[] IS INITIAL ).
ELSE.
  SELECT buzei bschl belnr gsber hkont zuonr kostl dmbtr sgtxt
    INTO CORRESPONDING FIELDS OF TABLE gtab                    " &amp;lt;&amp;lt; TABLE !!!
    FROM bseg
    FOR ALL ENTRIES IN ntab 
    WHERE belnr = ntab-belnr.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you have defined you itab's using header lines. Thus, this is another nice example how header lines spoil any ABAP coding.&lt;/P&gt;&lt;P&gt;If my coding solution is correct then the syntax check would have resulted in an error. GTAB would have been interpreted as work area (i.e. the header line) and therefore the syntax should be SELECT ... ENDSELECT.&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;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 04:53:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485382#M1061862</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-09-17T04:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485383#M1061863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nilesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry i missed the TABLE keyword in my query, my query will work if you use INTO CORRESPONDING FIELDS OF &lt;STRONG&gt;TABLE&lt;/STRONG&gt; gtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 05:16:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485383#M1061863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T05:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485384#M1061864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is what I mentioned in the first reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Farzan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 05:19:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485384#M1061864</guid>
      <dc:creator>former_member137336</dc:creator>
      <dc:date>2008-09-17T05:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485385#M1061865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Oct 2008 05:43:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-internal-table/m-p/4485385#M1061865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-25T05:43:47Z</dc:date>
    </item>
  </channel>
</rss>

