Ansicht
Dokumentation

ABAPDESCRIBE_TABLE - DESCRIBE TABLE

ABAPDESCRIBE_TABLE - DESCRIBE TABLE

rdisp/max_wprun_time - Maximum work process run time   PERFORM Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

DESCRIBE TABLE

Short Reference



DESCRIBE TABLE itab $[KIND knd$] $[LINES lin$] $[OCCURS n$].

Additions

1. ... KIND knd

2. ... LINES lin

3. ... OCCURS n

Effect

This statement determines some of the properties of the internal table itab and assigns them to the specified target fields. The following can be specified as target fields of each addition:

  • Existing variables to which the return value can be converted.

The different additions enable the table category, the number of currently filled lines, and the initial memory requirement to be determined.

In addition, the system fields sy-tfill and sy-tleng are filled with the current number of table lines and the length of a table line in bytes.

Notes

  • For more detailed information about an internal table, it is best to use the methods of the RTTS instead of the statement DESCRIBE TABLE.
  • If no addition is specified, the statement DESCRIBE TABLE only sets the system fields sy-tfill and sy-tleng.

Addition 1

... KIND knd

Effect

Determines the table category of the internal table itab. The return value is a single character character-like ID. In an inline declaration, a variable of the type c with length 1 is declared.

The possible IDs are "T" for standard tables, "S" for sorted tables, and "H" for hashed tables. These values are also defined as constants sydes_kind-standard, sydes_kind-sorted, and sydes_kind-hashed in the type pool SYDES.

Example

Sorting of a generically typed internal table in a method in descending order. Since sorted tables cannot be sorted in descending order, the table category is checked to prevent uncatchable exceptions from being raised.

Addition 2

... LINES lin

Effect

Determines the current number of table lines in the internal table itab. The return value has the type i. In an inline declaration, a variable of the type i is declared.

Note

The current number of lines of an internal table can also be determined using the built-in function lines, which can be used in suitable operand positions.

Example

The example shows that the addition of LINES to DESCRIBE TABLE and the built-in function lines have the same result.

Addition 3

... OCCURS n

Effect

Determines the initial memory requirements defined using the addition INITIAL SIZE or the obsolete addition OCCURS when the internal table is created. The return value has the type i. In an inline declaration, a variable of the type i is declared.

Example

The example shows that the addition of OCCURS to DESCRIBE TABLE and the attribute INITIAL_SIZE of a type description object of class CL_ABAP_TABLEDESCR produce the same value.






BAL_S_LOG - Application Log: Log header data   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 5289 Date: 20240614 Time: 054540     sap01-206 ( 80 ms )