‎2008 Jan 23 1:36 PM
‎2008 Jan 23 1:38 PM
structure can have only sinle entries that is it is like a row
table have multiple rows. we can define tables using structure
<REMOVED BY MODERATOR>
keep rockin
vivek
Edited by: Alvaro Tejada Galindo on Jan 23, 2008 6:03 PM
‎2008 Jan 23 1:39 PM
Structures
A structure is a sequence of any other data types from the ABAP Dictionary, that is, data elements, structures, table types, or database tables. When you create a structure in the ABAP Dictionary, each component must have a name and a data type.
Table types
Table types are construction blueprints for internal tables that are stored in the ABAP Dictionary. When you create a table type in the ABAP Dictionary, you specify the line type, access type, and key. The line type can be any data type from the ABAP Dictionary, that is, a data element, a structure, a table type, or the type of a database table. You can also enter a predefined Dictionary type directly as the line type, in the same way that you can with a domain.
‎2008 Jan 23 1:40 PM
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.
one difference is that when you create a variable of a table type you get an internal table. when you use a structure instead, you get a work area.
‎2008 Jan 23 1:41 PM
Hi,
table type
http://help.sap.com/saphelp_nw2004s/helpdata/en/90/8d7304b1af11d194f600a0c929b3c3/frameset.htm
structures
http://help.sap.com/saphelp_nw2004s/helpdata/en/90/8d7301b1af11d194f600a0c929b3c3/frameset.htm
If A is a Table type,
and you say data: itab type A. then itab is an internal table.
If B is a Line type, and you say itab type B. Then itab is a structure .
If CXX is a Structure, and you say itab type CXX, then itab is a structure.
and itab type line of A = itab type CXX = itab like line of A.
Regards,
Satish
‎2008 Jan 23 1:44 PM
Structure:
A structure is just a list of fields defined under a name. Structures are useful for painting screen fields, and for manipulating data that has a consistent format defined by a discrete number of fields.
There is no content to view in a structure. You can, however, view the definition of a structure in SE11.
Structure refers to the Definition of an Object, mostly Table or a View, and doesnt have any contents. Structure doesnt exist at the underlying database system level. It exists as a definition in the dictionary.
Table:
A table is a table that has been created in the database.
Table is a two-dimensional data matrix containing rows and columns. The rows contain the data and the columns indicate fields. There can be 0 or multiple rows.
Structure in ABAP can not store data. At DDIC level both are same but a table in SAP has mapping
to a table in the underlying database. In se16 you can see data only from a table.
Hope this helps
Vinodh Balakrishnan