‎2007 Oct 24 4:57 PM
Hi Everyone
Can anyone please tell me the difference between a Tabletype and a Structure
‎2007 Oct 26 11:58 AM
Hi Pratibha
TABLE TYPE
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3138358411d1829f0000e829fbfe/frameset.htm
regards.
‎2007 Oct 24 5:02 PM
hi,
Structures (structured types)
Structured types describe the structure and functions of any structured data objects, that is of data structures with components of any type.
A component can be a field with an elementary type or can itself be a structure. A table can also be used as a component in a structure.
A database table always has a structure and is therefore implicitly a structured type. However, the fields of a database table can only have an elementary type.
Table types
Table types describe the structure and functions of internal tables in the ABAP program. Their rows can have any row type. Table types with elementary row type therefore can be defined just the same as multi-dimensional table types (table types with a table type as row type) or table types using structures with table-like components.
In a simple words,
Structure is just a flat structure but Table type is an internal table.
Sample code how to use them to create internal table:
Create Internal table from a structure:
DATA: IT_DATA TYPE STANDART TABLE OF Structure.
Create Internal table from a table type:
DATA: IT_DATA TYPE table_type.
Regards,
gokul.
reward if usefull
‎2007 Oct 25 5:18 AM
Hi Prathiba..
Structure : It is a Data type used to define a stuctured data object like Work area.
DATA: WA1 TYPE <STRUCTURE>. "this will create a Work area
Table Type:It is a Data type used to define a Internal data object. It will store all the attributes to define an internal table, such as Table type, Key fields etc.
DATA: it1 TYPE <table type>. "this will create a Internal table
REWARD IF HELPFUL.
‎2007 Oct 26 11:58 AM
Hi Pratibha
TABLE TYPE
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3138358411d1829f0000e829fbfe/frameset.htm
regards.