Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Diff B/w Table type and Structure ?

Former Member
0 Likes
3,985

Hi all,

Data: lt_filetable TYPE filetable, (Table type)

ls_file TYPE file_table. (Structure).

My question is what is the difference between Above two declarations ? i mean

Table type and Structure ?

Thanks in advance

Sriram...

5 REPLIES 5
Read only

Former Member
0 Likes
1,961

table type u can refer any field.A table type describes the structure and functional attributes of an internal table in ABAP. In ABAP programs you can reference a table type TTYP defined in the ABAP Dictionary with the command DATA <inttab> TYPE TTYP. An internal table <inttab> is created in the program with the attributes defined for TTYP in the ABAP Dictionary.

To construct a new structured data type struc_typein a program, you use several TYPES statements:

Read only

Former Member
0 Likes
1,961

lt_filetable will be act as a Internal table...can hold multiple records....

ls_file will be act as a workarea...which will helps you to do the process (read, append, modify, insert) in the lt_filetable...because it can hold only one record...

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.

Read only

Former Member
0 Likes
1,961

Table Type:

is a structure which is defined with a 'OCCURS 0' extension with the definition of the structure and can hold data.

Structure:

is a definition with the field details and which can not hold any data in it.

in the case given by you:

1) Data: lt_filetable TYPE filetable, (Table type)

The 'filetable' is a table declaration with 'OCCURS 0' parameter.

2) ls_file TYPE file_table. (Structure).

the 'file_table' is a structure definition.

Rewards if useful.

Read only

Former Member
0 Likes
1,961

Hi

<b>Object class table types</b>

Semantic domain. A data element describes the role of a (technical) domain in a certain business-oriented context for the fields on which it depends and defines how thse fields are displayed on the screen.

Examples

Different roles, that is data elements, are possible for the domain "cost center", depending on the application.

Cost center

Sending cost center

Receiving cost center

Responsible cost center

etc.

<b>Object class structures (structured types)</b>

Structures globally define the data structure occurring in program calculations or when data is passed between programs.

Structures are used in particular to define the data at the interface of module pools and screens and to define the types of the parameters of reusable forms or function modules.

Structures are defined (almost) exactly like tables, but no database tables are generated from them. The same data elements and domains can be used in structures as in tables. Tables can also be included.

<b>Reward i fuisefull</b>

Read only

former_member650568
Discoverer
0 Likes
1,961

Hi friends,

Actually Table type is like internal table, but it globally we are declared in se11 (DDIC) into repository.

main purpose is once create table type, the table type are used different se38 program with single creation of table type.

Table type: is Combination row and columns,but it is hold the data at run time.

different table types are there standared,sorted,hashed,index type and other at the same time we are given input default parameters also.

Table type like table(like internal table) thats why no need to create declare the table of .

Data: lt_filetable TYPE filetable, (Table type)

Structuer: is the combination of different columns with single record...like work area.

ex:ls_file TYPE file_table. (Structure).