<?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: work area and internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-and-internal-table/m-p/1466126#M219514</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;  When you have only record (assuming select single * from mara int wa_mara where matnr = 'adfasdf') you can use the work area. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  When you have multiple records you can use internal table. (ex. select * from mara into t_mara where erdat = sy-datum).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Please let me know if it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Aug 2006 18:01:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-07T18:01:47Z</dc:date>
    <item>
      <title>work area and internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-and-internal-table/m-p/1466124#M219512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know when do we use work area and when do we use internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Tina Wilson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2006 17:52:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-and-internal-table/m-p/1466124#M219512</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-07T17:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: work area and internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-and-internal-table/m-p/1466125#M219513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Work areas are used with internal tables.  For example if you have an internal table defined like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: itab type table of mara.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This internal table can hold many rows of data, right?  SO say you need to read this data.  Well you will need to LOOP or READ the internal table, since this internal table has no header line(please to put the read data), you need to have a work area to put the data into.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

&amp;lt;b&amp;gt;data: wa like line of itab.&amp;lt;/b&amp;gt;

Loop at itab &amp;lt;b&amp;gt;into wa&amp;lt;/b&amp;gt;.
..
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you defined the internal table with a header line, there is no reason to have the work area and you can just do the same like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: itab type table of mara &amp;lt;b&amp;gt;with header line&amp;lt;/b&amp;gt;.

Loop at itab.
..
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is now best practice to use work areas instead of header lines because in ABAP OO, header lines are not allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2006 18:01:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-and-internal-table/m-p/1466125#M219513</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-07T18:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: work area and internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-and-internal-table/m-p/1466126#M219514</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;  When you have only record (assuming select single * from mara int wa_mara where matnr = 'adfasdf') you can use the work area. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  When you have multiple records you can use internal table. (ex. select * from mara into t_mara where erdat = sy-datum).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Please let me know if it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2006 18:01:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-and-internal-table/m-p/1466126#M219514</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-07T18:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: work area and internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-and-internal-table/m-p/1466127#M219515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Work area to pick single record.&lt;/P&gt;&lt;P&gt;Data: wa_eanl type eanl.&lt;/P&gt;&lt;P&gt;Select single * from eanl into wa_eanl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table to store lot of record.&lt;/P&gt;&lt;P&gt;data: i_eanl type eanl occurs 0 with header line.&lt;/P&gt;&lt;P&gt;Select * from eanl into table i_eanl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prakash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2006 18:03:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-and-internal-table/m-p/1466127#M219515</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-07T18:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: work area and internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-and-internal-table/m-p/1466128#M219516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; In ABAP Object oriented programming, internal tables with header lines are not allowed. To add , delete or change the records in an internal table, a work area is used. THis work area will have the same structure as the internal table. Technically speaking work area is a line of an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below link to know more work area n internal tables.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb36a1358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb36a1358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vamsi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2006 18:12:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-and-internal-table/m-p/1466128#M219516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-07T18:12:28Z</dc:date>
    </item>
  </channel>
</rss>

