Mentor SAP

Table Types

A dictionary structure containing one or more fields using a table type is called a deep structure.

 

You can define table types using an existing dictionary type. Database tables, structure definitions, views, data elements, direct type definitions, or existing table types can be used as line type.

 

During runtime, if the ABAP program is referencing any data object using table types, the system will create a two-dimensional array in the main memory for each of these objects.

 

 

Table Type Definition

A table type is defined by the following.

 

Creating Table Types and Deep Structures

These are table types that define only some of the attributes of an internal table in the ABAP Dictionary and leave the others open. You can use generic table types to define the types of generic parameters in function modules and forms, and thus provide a degree of freedom for the arguments passed in the corresponding calls. A table type is generic in the following cases:

 

A range table type is a special case. You use this table type to describe the structure of an internal table for administering complex areas, that is, the type of an internal ranges table in the ABAP program.

 

You can use range tables, for example, in logical expressions( IN operators ) in the SELECT, IF WHILE, and CHECK statements, or to pass data to selection tables.

The row type of a ranges table type has a fixed structure. The row type consists of the four components : SIGN( sign), OPTION ( Comparison operator ), LOW( Lower limit), and HIGH ( Higher limit)

 

Deep Structure

A deep structure contains at least one field with a table type. The component of this table has its own name with which it can be addressed in the same way as a normal internal table (LOOP AT..., INSERT... INTO TABLE, ...).

 

An internal table, in turn, can have a deep structure as a line type. In this way, you can create multidimensional data types, since internal tables and structures can be inter-nested several times.

 

Caution: Database tables can only include flat structures.