DESCRIBE TABLE

DESCRIBE - Return attributes of an internal table

Effect

Returns the attributes of the internal table itab. You must use at least one of the additions listed below.

Additions:

1.... LINES lin
2.... OCCURS n

Effect

Places the number of filled lines of the table t in the field lin. The value returned to lin has type I.

Example

DATA: BEGIN OF TAB OCCURS 10, 
		X, 
	END OF TAB. 
DATA: LIN TYPE P. 
... 
CLEAR TAB. REFRESH TAB. 
MOVE '?' TO TAB-X. 
APPEND TAB. 
DESCRIBE TABLE TAB LINES LIN.

Result: LIN contains the value 1.

Effect

Passes the size of the OCCURS parameter from the table definition (as defined with DATA) to the variable n. The value returned to n has type I.

Example

DATA: BEGIN OF TAB OCCURS 10, 
		X, 
	END OF TAB. 
	OCC TYPE P. 
DESCRIBE TABLE TAB OCCURS OCC.

Result: OCC contains the value 10.

The runtime required to execute the DESCRIBE TABLE statement is approx. 4 msn (standardized microseconds).