<?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: itab in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325557#M1030735</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;tables:mara.
DATA:  it_final TYPE mara OCCURS 0 WITH HEADER LINE.
select single * from mara into it_final where.......&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Aug 2008 06:57:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-22T06:57:32Z</dc:date>
    <item>
      <title>itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325556#M1030734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for selection of all the fields in table using perticular condition,.how to declare the itab? plz,explain with example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 06:55:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325556#M1030734</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T06:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325557#M1030735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;tables:mara.
DATA:  it_final TYPE mara OCCURS 0 WITH HEADER LINE.
select single * from mara into it_final where.......&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 06:57:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325557#M1030735</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T06:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325558#M1030736</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;Suppose you have select All fields of table SFLIGHT based on the Input CARRID in Selection Screen.&lt;/P&gt;&lt;P&gt;For this-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables:sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select-options:s_carrid for sflight-carrid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab type table of sflight,&lt;/P&gt;&lt;P&gt;          wa type sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from sflight into table itab where carrid in S_carrid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab into wa.&lt;/P&gt;&lt;P&gt; write:wa-carrid,&lt;/P&gt;&lt;P&gt;..........&lt;/P&gt;&lt;P&gt;............&lt;/P&gt;&lt;P&gt;Endloop.&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;Sujit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 07:00:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325558#M1030736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T07:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325559#M1030737</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;Intenal tables are declared on&lt;/P&gt;&lt;P&gt;(a) what data we need &lt;/P&gt;&lt;P&gt;(b) the structure of the table from where we are obtaining &lt;/P&gt;&lt;P&gt;(c) the output we want to display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg: consider table VBAP&lt;/P&gt;&lt;P&gt;case(1)&lt;/P&gt;&lt;P&gt;imagine we need all the fields for data processing based on field Ebelen&lt;/P&gt;&lt;P&gt;tables : vbap.&lt;/P&gt;&lt;P&gt;data: itab type table of vbap.&lt;/P&gt;&lt;P&gt;select-options: s_ebeln for vbap-ebeln.&lt;/P&gt;&lt;P&gt;select * from vbap into table itab where&lt;/P&gt;&lt;P&gt;ebeln in s_ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case(2)&lt;/P&gt;&lt;P&gt;imagine we need 2 fields only ebeln,ebelp for data processing based on field Ebelen &lt;/P&gt;&lt;P&gt;so we declare a strucutre or internal table with these 2 fields only&lt;/P&gt;&lt;P&gt;so we have&lt;/P&gt;&lt;P&gt;tables vbap.&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;          ebeln type vbap-ebeln,&lt;/P&gt;&lt;P&gt;          ebelp type vbap-ebelp,&lt;/P&gt;&lt;P&gt;         end of itab.&lt;/P&gt;&lt;P&gt;select-options: s_ebeln for vbap-ebeln.&lt;/P&gt;&lt;P&gt;select ebeln ebelp from vbap into table itab where&lt;/P&gt;&lt;P&gt;ebeln in s_ebelp.&lt;/P&gt;&lt;P&gt;          &lt;/P&gt;&lt;P&gt;so if we have multiple selection fields &lt;/P&gt;&lt;P&gt;like s_ebelp in case(1) we write &lt;/P&gt;&lt;P&gt;select-options: s_ebeln for vbap-ebeln.&lt;/P&gt;&lt;P&gt;select-options: s_ebelp for vbap-ebelp.&lt;/P&gt;&lt;P&gt;select * from vbap into table itab where&lt;/P&gt;&lt;P&gt;ebeln in s_ebelp and&lt;/P&gt;&lt;P&gt;ebelp in s_ebelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;Pls check and revert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Byju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 07:09:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325559#M1030737</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T07:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325560#M1030738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;tables:mara.
DATA:  it_final TYPE mara OCCURS 0 WITH HEADER LINE.
select single * from mara into it_final where.......&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Don't use TABLES and WITH HEADER LINE statements. That's old school and not up to date (I hate it because so many old programs contains this type of code and I have to work with it)...&lt;/P&gt;&lt;P&gt;Instead of that use internal tables with field symbols due to performance reasons. And try to avoid using * in the select. Select only the fields you need to have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  lt_mara       TYPE STANDARD TABLE OF mara.

FIELD-SYMBOLS:
  &amp;lt;fs_mara&amp;gt;   TYPE mara.

SELECT SINGLE matnr FROM mara INTO TABLE lt_mara
  WHERE
    matnr = '123' AND...
    ...

READ lt_mara ASSIGNING &amp;lt;fs_mara&amp;gt; INDEX 1.
IF sy-subrc IS INITIAL.
  WRITE &amp;lt;fs_mara&amp;gt;-matnr.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 07:10:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325560#M1030738</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T07:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325561#M1030739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Don't use TABLES and WITH HEADER LINE statements. That's old school and not up to date (I hate it because so many old programs contains this type of code and I have to work with it)...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Instead of that use internal tables with field symbols due to performance reasons. And try to avoid using * in the select. Select only the fields you need to have:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for useful info. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;though i just gave qustionire some glimpse.Am not writing a report for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit.l&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 07:28:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325561#M1030739</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T07:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325562#M1030740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Don't use TABLES and WITH HEADER LINE statements. That's old school and not up to date (I hate it because so many old programs contains this type of code and I have to work with it)...&lt;/P&gt;&lt;P&gt;&amp;gt; Instead of that use internal tables with field symbols due to performance reasons. And try to avoid using * in the select. Select only the fields you need to have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Absolutely!  Sometimes I think I'm the only person advising this!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additionally, I'd add - tables with header lines introduce an ambiguity, and are therefore bad programming pracice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, sometimes you have to use a work area rather than a field-symbol.  But in those cases, you should still define the work area seperately from the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 08:25:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab/m-p/4325562#M1030740</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-08-22T08:25:16Z</dc:date>
    </item>
  </channel>
</rss>

