<?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 internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/4308697#M1027231</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT * FROM mara UP TO 1 ROWS&lt;/P&gt;&lt;P&gt;          INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;     WHERE matnr IN s_matnr AND ersda IN s_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE  itab INDEX 1 .&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0 .&lt;/P&gt;&lt;P&gt;    SELECT SINGLE * FROM makt WHERE matnr EQ itab-matnr .&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;&lt;/P&gt;&lt;P&gt;select * from mast into table w_mast&lt;/P&gt;&lt;P&gt;for all entries in itab where matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at w_mast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM stpo APPENDING TABLE w_stpo&lt;/P&gt;&lt;P&gt;WHERE stlnr = w_mast-stlnr.&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;STRONG&gt;READ TABLE w_stpo index 1 .(I need help here , bcoz internal table has more than one content)so i cant use read&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Aug 2008 13:58:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-05T13:58:30Z</dc:date>
    <item>
      <title>internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/4308697#M1027231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT * FROM mara UP TO 1 ROWS&lt;/P&gt;&lt;P&gt;          INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;     WHERE matnr IN s_matnr AND ersda IN s_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE  itab INDEX 1 .&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0 .&lt;/P&gt;&lt;P&gt;    SELECT SINGLE * FROM makt WHERE matnr EQ itab-matnr .&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;&lt;/P&gt;&lt;P&gt;select * from mast into table w_mast&lt;/P&gt;&lt;P&gt;for all entries in itab where matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at w_mast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM stpo APPENDING TABLE w_stpo&lt;/P&gt;&lt;P&gt;WHERE stlnr = w_mast-stlnr.&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;STRONG&gt;READ TABLE w_stpo index 1 .(I need help here , bcoz internal table has more than one content)so i cant use read&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 13:58:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/4308697#M1027231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T13:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/4308698#M1027232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use a loop if you want to read the whole table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 14:03:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/4308698#M1027232</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T14:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/4308699#M1027233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select under a loop statement in not a good idea regarding performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anyways you can do sumthing like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data:
  count    type i,
  w_lines type i.
loop at w_mast.

SELECT * FROM stpo APPENDING TABLE w_stpo
WHERE stlnr = w_mast-stlnr.

describe table w_stpo lines w_lines.

do w_lines time.

READ TABLE w_stpo index count .
count = count + 1.
enddo.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With luck,&lt;/P&gt;&lt;P&gt;Pritam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 14:04:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/4308699#M1027233</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T14:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/4308700#M1027234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;if not w_mast is initial.
  SELECT * FROM stpo APPENDING TABLE w_stpo
 for all entries in w_mast
  WHERE stlnr = w_mast-stlnr.
endif.
 loop at w_mast.

loop at  w_stpo where matnr = w_mast-matnr.


ENDLOOP.

Endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 14:08:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/4308700#M1027234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T14:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/4308701#M1027235</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;Change the read table statment to,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table &amp;lt;internal table&amp;gt; into &amp;lt;workarea&amp;gt; index 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table is used to read the contents of itab inside a loop. The read table is used with binary search option and the itab1 should be sorted before using read table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for more info:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading records with keys&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading lines with Index&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3730358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3730358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2008 14:11:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/4308701#M1027235</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-05T14:11:40Z</dc:date>
    </item>
  </channel>
</rss>

