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

Difference between DDIC Table Type and structure

Former Member
0 Likes
1,939

Hi all,

Please tell me what is is basic difference between DDIC Table Type and DDIC Structure ?

Regards,

Ajoy Chatterjee

3 REPLIES 3
Read only

Former Member
0 Likes
1,143

Hi,

<b>Structures (structured types)</b>

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.

<b>Table types</b>

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,

Read only

Former Member
0 Likes
1,143

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.

Read only

Former Member
0 Likes
1,143

Difference between structure and table type is

Table type

The table type specifies how you can access individual table rows via ABAP.

Generally all internal tables are treated as table types.

There are different types of table types like standard,sorted and hashed.

Internal tables are used only during program execution i.e data flows into internal table only during program execution.

Data manipulations in internal table during debugging will not effect database.No memory is allocated for table types like internal table.

structure

Structure contains data only when it is inserted in database table using append or include.

We change the data in structure which will effect Database.

Memory is allocated to structure only when it is included in table using append or include.