<?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 problem with internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table/m-p/2356172#M520607</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello friends the following is my requirement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of inbkpf occurs 0,&lt;/P&gt;&lt;P&gt;      belnr type bkpf-belnr,&lt;/P&gt;&lt;P&gt;      end of inbkpf,&lt;/P&gt;&lt;P&gt;      wa_bkpf type bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: incsks type standard table of csks,&lt;/P&gt;&lt;P&gt;      wa_csks type csks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bukrs belnr gjahr buzei saknr shkzg&lt;/P&gt;&lt;P&gt;  from bseg&lt;/P&gt;&lt;P&gt;   into table innonbonus&lt;/P&gt;&lt;P&gt;where  belnr in inbkpf and&lt;/P&gt;&lt;P&gt;           kostl in incsks and&lt;/P&gt;&lt;P&gt;           saknr like 'S8%' and&lt;/P&gt;&lt;P&gt;           saknr in nonbonus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i run the above code it gives error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	The line structure of the table "INBKPF" is incorrect.		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can some plz tell the way i can check for an entry in the internal table&lt;/P&gt;&lt;P&gt; with out looping all the internal tables.&lt;/P&gt;&lt;P&gt;can some one help plz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jun 2007 15:46:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-11T15:46:46Z</dc:date>
    <item>
      <title>problem with internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table/m-p/2356172#M520607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello friends the following is my requirement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of inbkpf occurs 0,&lt;/P&gt;&lt;P&gt;      belnr type bkpf-belnr,&lt;/P&gt;&lt;P&gt;      end of inbkpf,&lt;/P&gt;&lt;P&gt;      wa_bkpf type bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: incsks type standard table of csks,&lt;/P&gt;&lt;P&gt;      wa_csks type csks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bukrs belnr gjahr buzei saknr shkzg&lt;/P&gt;&lt;P&gt;  from bseg&lt;/P&gt;&lt;P&gt;   into table innonbonus&lt;/P&gt;&lt;P&gt;where  belnr in inbkpf and&lt;/P&gt;&lt;P&gt;           kostl in incsks and&lt;/P&gt;&lt;P&gt;           saknr like 'S8%' and&lt;/P&gt;&lt;P&gt;           saknr in nonbonus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i run the above code it gives error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	The line structure of the table "INBKPF" is incorrect.		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can some plz tell the way i can check for an entry in the internal table&lt;/P&gt;&lt;P&gt; with out looping all the internal tables.&lt;/P&gt;&lt;P&gt;can some one help plz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 15:46:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table/m-p/2356172#M520607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T15:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: problem with internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table/m-p/2356173#M520608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want FOR ALL ENTRIES in inbkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also include BUKRS and GJAHR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 15:50:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table/m-p/2356173#M520608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T15:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: problem with internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table/m-p/2356174#M520609</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;Please try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: begin of inbkpf occurs 0,
        belnr type bkpf-belnr,
      end of inbkpf,
      wa_bkpf type bkpf.

data: incsks type standard table of csks,
      wa_csks type csks.

ranges: r_kostl.

loop at incsks.
  r_kostl-sign = 'I'.
  r_kostl-option = 'EQ'.
  r_kostl-low = incsks-kostl.
  append r_kostl.
endloop.

sort r_kostl.
delete adjacent duplicate from r_kostl.

select bukrs belnr gjahr buzei saknr shkzg
from bseg
into table innonbonus
for all entries in inbkpf
where belnr in inbkpf-belnr and
kostl in r_kostl and
saknr like 'S8%' and
saknr in nonbonus.
&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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 15:51:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table/m-p/2356174#M520609</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-06-11T15:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: problem with internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table/m-p/2356175#M520610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem in the select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: ra_belnr type range of belnr occurs 0 with header line.
loop at inbkpf.
ra_belnr-sign = 'I'.
ra_belnr-option = 'EQ'.
ra_belnr-low = 'inbkpf-belnr.
append ra_belnr
endloop.

select bukrs belnr gjahr buzei saknr shkzg
from bseg
into table innonbonus
where belnr in ra_belnr and  " Check here.
kostl in incsks and
saknr like 'S8%' and
saknr in nonbonus.

or use like this.

select bukrs belnr gjahr buzei saknr shkzg
from bseg
into table innonbonus
for all entries in inbkpf " check here 
where belnr in inbkpf-belnr  and   " Check here
kostl in incsks and
saknr like 'S8%' and
saknr in nonbonus.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 15:55:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table/m-p/2356175#M520610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T15:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: problem with internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table/m-p/2356176#M520611</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 ur internal table inbkpf structure with ur select select statement. Its should be in same format or else use corresponding option.&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>Mon, 11 Jun 2007 15:55:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table/m-p/2356176#M520611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T15:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: problem with internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table/m-p/2356177#M520612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT bukrs belnr gjahr buzei saknr shkzg
  FROM bseg
  INTO TABLE innonbonus
  FOR ALL ENTRIES IN inbkpf
  WHERE bukrs EQ inbkpf-bukrs AND
        belnr EQ inbkpf-belnr AND
        gjahr EQ inbkpf-gjahr AND
        kostl IN incsks       AND
        saknr LIKE 'S8%'      AND
        saknr IN nonbonus.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 16:00:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-internal-table/m-p/2356177#M520612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T16:00:16Z</dc:date>
    </item>
  </channel>
</rss>

