<?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: difference between work area and internal tables. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-work-area-and-internal-tables/m-p/2675578#M618151</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In internal table you can move and store any number records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but in work area at a single point of time we can store only one record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;usually we use work area to move one record from internal table to work area and to perform operations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;Vijaykumar Reddy. S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 26 Aug 2007 10:58:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-26T10:58:24Z</dc:date>
    <item>
      <title>difference between work area and internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-work-area-and-internal-tables/m-p/2675575#M618148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  I wanna know the difference between work area and internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what happend if i give with out header line in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also how to assosiate work area to internal table in that scenario.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Aug 2007 11:52:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-work-area-and-internal-tables/m-p/2675575#M618148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-25T11:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: difference between work area and internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-work-area-and-internal-tables/m-p/2675576#M618149</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;Work area is nothing but a variable whose TYPE is same as that of a Line (Record) of a internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in the case of a table with header line you will get this variable as the first record of the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you dont need an extra workarea for moving your each record to a temporary workarea for processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the case of a table with headerline table name acts as the workarea and tablename[] will represent the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when you want to use a table with out headerline you can create a workarea as follows.&lt;/P&gt;&lt;P&gt;DATA: itab type table of SPFLI.&lt;/P&gt;&lt;P&gt;DATA: work_area like line of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now work_area is similar to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: work_area type SPFLI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when you have&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab type table of SPFLI with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab is workarea and itab[] is the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Aug 2007 11:56:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-work-area-and-internal-tables/m-p/2675576#M618149</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-08-25T11:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: difference between work area and internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-work-area-and-internal-tables/m-p/2675577#M618150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     Workarea is used to store a single record(row) of an internal table. Lets say you have an internal table, you want to make some modification in the 5th row.&lt;/P&gt;&lt;P&gt;so you will be looping at the internal table into the workarea and will be modifying the content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table is used to store multiple records(ROW) in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;work area is declared as follows:&lt;/P&gt;&lt;P&gt;Types: begin of ty_vbak,&lt;/P&gt;&lt;P&gt;          vbeln type vbeln,&lt;/P&gt;&lt;P&gt;          posnr type posnr,&lt;/P&gt;&lt;P&gt;          end of ty_vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Data wa_vbak type vbak.&lt;/P&gt;&lt;P&gt;2) data: begin of wa_vbak2,&lt;/P&gt;&lt;P&gt;            vbeln type vbeln,&lt;/P&gt;&lt;P&gt;            posnr type posnr,&lt;/P&gt;&lt;P&gt;            end of wa_vbak2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incase if you want to declare a work area from an table type, then u will define as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) data wa_vbak type line type of vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will declare internal table as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) data lt_vbak type table of ty_vbak.&lt;/P&gt;&lt;P&gt;2) data lt_vbak2 type table of vbak.&lt;/P&gt;&lt;P&gt;3) data: begin of lt_vbak3 occurs 0,&lt;/P&gt;&lt;P&gt;            vbeln type vbeln,&lt;/P&gt;&lt;P&gt;            posnr type posnr,&lt;/P&gt;&lt;P&gt;           end of lt_vbak3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above declareation(point 3) declares a internal table with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) data lt_vbak4 type ty_vbak occus 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above declares a internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Niyaz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Aug 2007 15:42:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-work-area-and-internal-tables/m-p/2675577#M618150</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-25T15:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: difference between work area and internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-work-area-and-internal-tables/m-p/2675578#M618151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In internal table you can move and store any number records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but in work area at a single point of time we can store only one record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;usually we use work area to move one record from internal table to work area and to perform operations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;Vijaykumar Reddy. S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Aug 2007 10:58:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-work-area-and-internal-tables/m-p/2675578#M618151</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-26T10:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: difference between work area and internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-work-area-and-internal-tables/m-p/2675579#M618152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you know 'C' language, then work area is similar to structure which holds only single record and internal table is similar to structure of array holds many records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you create internal table with header line then while taking or reading data from internal table, one by one record store in to header line. See picture below, 1st line as a header line, have same structure/ format as internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[ID    |	Name  |   Subject  | Marks&lt;/P&gt;&lt;P&gt;[_|___|______|___]--&amp;gt;Header Line and it holds data while &lt;/P&gt;&lt;P&gt;[1     |	A        |	maths  |	98]  looping through internal table&lt;/P&gt;&lt;P&gt;[2     |	B        |	english |	78]&lt;/P&gt;&lt;P&gt;[3     |	C        |	Biology| 	56]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at internal_table.&lt;/P&gt;&lt;P&gt;     (program lines)&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you create internal table with out header line, then only table get created with out having provision to store record after read (See picture below). So we have to create work area with same structure of internal table. which store records one by one after reading it from internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[ID   |	Name   |	Subject |	Marks]&lt;/P&gt;&lt;P&gt;[1    |	A         |	maths   |	98]&lt;/P&gt;&lt;P&gt;[2    |	B         |	english  |	78]&lt;/P&gt;&lt;P&gt;[3    |	C         |	Biology |	56]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at internal_table into work_area.&lt;/P&gt;&lt;P&gt;   (program lines)&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Aug 2007 11:41:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-work-area-and-internal-tables/m-p/2675579#M618152</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-26T11:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: difference between work area and internal tables.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-work-area-and-internal-tables/m-p/2675580#M618153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Balaji..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table is an ABAP runtime object which has two parts the Body and the header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whereas a work area cannot have a body.. It is mere a field or group of fields which can hold values at runtime..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the SAP higher versions mySAP ERP, the use of tables with header line is made obsolete.. But there is absolutely no problem with the same..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just think that when you define an internal table with occurs or with header line statement, the system automatically creates a workarea with this table, using which you can access the contents in the bosy of tyhe table.. You can read a record from the table body to this header or add a record in the header to the internal table body..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you work with a table ITAB without a header line, you can not use statements like READ TABLE, APPEND, INSERT etc without giving an explicit work area..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose i have an internal table like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : itab TYPE STANDARD TABLE OF t001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This table will not have a header with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you will use APPEND itab. The compilor will give error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here i will create a work area with same structure of the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : e_wa TYPE t001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i will write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND e_wa TO itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE itab INTO e_wa WITH KEY xxxxxx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab INTO e_wa...           etc..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a better approach we use Field symbols with such tables, instead of structures&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs_itab&amp;gt; TYPE t001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab ASSIGNING &amp;lt;fs_itab&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE itab ASSIGNING &amp;lt;fs_itab&amp;gt; etc.. However we can not use field symbols in few cases..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will help you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;/P&gt;&lt;P&gt;Vikas Bittera.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**&lt;STRONG&gt;Points for usefull answers&lt;/STRONG&gt;**&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2007 00:49:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-work-area-and-internal-tables/m-p/2675580#M618153</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-27T00:49:52Z</dc:date>
    </item>
  </channel>
</rss>

