<?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: tables vs structures vs fs in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-vs-structures-vs-fs/m-p/3749612#M902132</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;Tables: A collection of fields which physically exist in the database and can hold data for you.&lt;/P&gt;&lt;P&gt;Structures: A collection of fields which cannot hold data on their own.&lt;/P&gt;&lt;P&gt;Work Areas: These are temporary memory areas which exist during the excecution of a program and can hold data temporarily, for data to be played with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For difference in workarea and headerline, refer to:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/difference-between-work-area-and-header-line.htm" target="test_blank"&gt;http://www.sap-img.com/abap/difference-between-work-area-and-header-line.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ankur&lt;/P&gt;&lt;P&gt;Please reward points if the info is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ankur malhotra on May 2, 2008 8:13 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 May 2008 06:09:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-02T06:09:31Z</dc:date>
    <item>
      <title>tables vs structures vs fs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-vs-structures-vs-fs/m-p/3749610#M902130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is actual difference between tables , structures , fieldstrings , and headerline or workarea of table reply in short please&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 06:02:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables-vs-structures-vs-fs/m-p/3749610#M902130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T06:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: tables vs structures vs fs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-vs-structures-vs-fs/m-p/3749611#M902131</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;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Structure and tables&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A structure forms the skeleton of the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A structure comprises components i.e., fields. Types are defined for the components A component can refer to an elementary type (via a data element or by directly specifying the data type and length in the structure definition), another structure or a table type. A structure can therefore be nested to any depth&lt;/P&gt;&lt;P&gt;Tables can be defined independently of the database in the ABAP Dictionary. The fields of the table are defined with their (database-independent) data types and lengths.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the table is activated, a physical table definition is created in the database for the table definition stored in the ABAP Dictionary. The table definition is translated from the ABAP Dictionary to a definition of the particular database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Field-symbols and Workarea&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;generally, Work area is slow bcoz it refers to variable. But, Field sysmbol acts like a pointer so it is pretty fast than WA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important: It will improve performace. &lt;/P&gt;&lt;P&gt;in one example i seen that looping itab with 100000 records is 25%!!!!!!!!! fast using Field symbol as compared to wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pl refer following codes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;codeREPORT demo_int_tables_read_assigning .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF line,&lt;/P&gt;&lt;P&gt;col1 TYPE i,&lt;/P&gt;&lt;P&gt;col2 TYPE i,&lt;/P&gt;&lt;P&gt;END OF line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA itab LIKE HASHED TABLE OF line WITH UNIQUE KEY col1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;fs&amp;gt; LIKE LINE OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 4 TIMES.&lt;/P&gt;&lt;P&gt;line-col1 = sy-index.&lt;/P&gt;&lt;P&gt;line-col2 = sy-index ** 2.&lt;/P&gt;&lt;P&gt;INSERT line INTO TABLE itab.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE itab WITH TABLE KEY col1 = 2 ASSIGNING &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;fs&amp;gt;-col2 = 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab INTO line.&lt;/P&gt;&lt;P&gt;WRITE: / line-col1, line-col2.&lt;/P&gt;&lt;P&gt;ENDLOOP.[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Headerline and work area&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Head lines are part of your internal tables which holds the data of the line which has been read using the READ TABLE statement or the LOOP. A work area is an explicit variable with the same structure as your internal table which is used to read the line of the internal table into instead of using the header line. Header lines are obselete and you should always use explicit work areas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;codeData: itab type table of mara.&lt;/P&gt;&lt;P&gt;data: wa like line of itab.[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 06:09:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables-vs-structures-vs-fs/m-p/3749611#M902131</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T06:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: tables vs structures vs fs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-vs-structures-vs-fs/m-p/3749612#M902132</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;Tables: A collection of fields which physically exist in the database and can hold data for you.&lt;/P&gt;&lt;P&gt;Structures: A collection of fields which cannot hold data on their own.&lt;/P&gt;&lt;P&gt;Work Areas: These are temporary memory areas which exist during the excecution of a program and can hold data temporarily, for data to be played with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For difference in workarea and headerline, refer to:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/difference-between-work-area-and-header-line.htm" target="test_blank"&gt;http://www.sap-img.com/abap/difference-between-work-area-and-header-line.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ankur&lt;/P&gt;&lt;P&gt;Please reward points if the info is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ankur malhotra on May 2, 2008 8:13 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 06:09:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables-vs-structures-vs-fs/m-p/3749612#M902132</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T06:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: tables vs structures vs fs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-vs-structures-vs-fs/m-p/3749613#M902133</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;in short&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Tables&lt;/STRONG&gt; are used to hold permanent data.All the data in SAP is stored in the form  tables.In R/3 a table is a collection of rows. Each row contains fields, also called columns. Normally, within a table, each row has the same number of columns as the other rows of the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A table holds persistent data. In other words, if you put data into a table, it remains there after your program ends. It will remain there until it is changed or deleted by your program or another program. The name of a table is unique within the entire R/3 system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Structures&lt;/STRONG&gt; : In R/3 a structure is a description of a group of fields. It describes the field names, their sequence, and their data types and lengths. Each structure has a name that is unique within the entire R/3 system. A structure cannot have the same name as a table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A structure name can be used in two ways: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a program, a structure name can be used to allocate memory for a group of fields. &lt;/P&gt;&lt;P&gt;In a table, a structure name can be used to describe a set of fields. &lt;/P&gt;&lt;P&gt;Strictly speaking, a structure is something that only exists within the R/3 Data Dictionary. If you see the word structure, you should immediately think "DDIC structure." However, some SAP documentation uses the word structure to also refer to a group of variables within a program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; They hold data during the run time only.&lt;/P&gt;&lt;P&gt;                    They are used in Programs to process the data.&lt;/P&gt;&lt;P&gt;                  they can handle    one record ata a time&lt;/P&gt;&lt;P&gt;             They are helpful in adding additional fields to tables(includes and append).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;fieldstring&lt;/STRONG&gt; : A field-symbol is a pointer you can dynamically assign to a field. After assignment, you can use the field-symbol anywhere in your program in place of the actual field name. Use the field-symbol statement to define a field-symbol, and use assign to assign a field to it. The field-symbol name must begin and end with angle brackets&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Headerline.&lt;/STRONG&gt; The header line is a field string(WORK AREA) with the same structure as a row of the body, but it can only hold a single row. It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if helpful&lt;/P&gt;&lt;P&gt;prasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 06:13:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables-vs-structures-vs-fs/m-p/3749613#M902133</guid>
      <dc:creator>prasanth_kasturi</dc:creator>
      <dc:date>2008-05-02T06:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: tables vs structures vs fs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-vs-structures-vs-fs/m-p/3749614#M902134</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;tables , structures , fieldstrings , and headerline or workarea of table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: these are the ones in which information about different entities are stored. In other words,tables are the structures that actually store the information that is in the database (i.e., customer information).  &lt;/P&gt;&lt;P&gt;Ex: KUNNR-customer master table contains details about all the customers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STRUCTURES: these contain structure for the data to be stored but do not contain the "information" itself,they are not mapped to &lt;/P&gt;&lt;P&gt;the database and have no underlying database tables. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;And for fieldstrings,I guess u meant FIELD-SYMBOLS.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS  are placeholders which are used dynamically.&lt;/P&gt;&lt;P&gt;These greatly improve the performance compared to work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HEADERLINE: this acts like a workarea when u declare a table as "with headerline".It is jus a copy of the line of respective table u r reffering to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex: DATA: IT_MARA TYPE STANDARD TABLE OF MARA     WITH HEADERLINE.&lt;/P&gt;&lt;P&gt;If u ve declared the internal table like above,hen while looping u can directly loop the table without using the work area.&lt;/P&gt;&lt;P&gt;LOOP AT IT_MARA.&lt;/P&gt;&lt;P&gt;WRITE: IT_MARA-MATNR.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;But now the practice is to use "internal table" with workarea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WORKAREA: it is used to store the data retrieved from the internal table temporarily. it must have the same structure as tht of internal table.&lt;/P&gt;&lt;P&gt;Ex: IT_MARA TYPE STANDARD TABLE OF MARA .&lt;/P&gt;&lt;P&gt;      WA_MARA LIKE LINE OF IT_MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this has cleared ur doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u still have doubts, feel free to ask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramya Shree M R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 15:34:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables-vs-structures-vs-fs/m-p/3749614#M902134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T15:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: tables vs structures vs fs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables-vs-structures-vs-fs/m-p/3749615#M902135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.table contails records means data.&lt;/P&gt;&lt;P&gt;2.structure contains the field arrangement like mara structure conatains matnr meins....in the order of the table but doesnt hold any data means records&lt;/P&gt;&lt;P&gt;3.string means long character means 516 char length&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.the work area is used when the table had no header line.&lt;/P&gt;&lt;P&gt;generally if the table contains the header line then the data entered or leaved through the header line  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i will show the itab with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;header(after the data comes here it will go or enter) &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;record1&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;record2&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;record3&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the internal table had no header line then you need to send the data out or into the table with work area only..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;work area for the itab&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;record1&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;record2&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;record3&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 18:08:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables-vs-structures-vs-fs/m-p/3749615#M902135</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T18:08:15Z</dc:date>
    </item>
  </channel>
</rss>

