DESCRIBE - return attributes of an internal table
Basic form
DESCRIBE TABLE itab.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
Addition 1
... LINES linEffect
Places the number of filled lines of the table t in the field lin .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.
Addition 2
... OCCURS nEffect
Transfers the size of the OCCURS parameter from the table definition to the variable n .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.
Note
If the table is meant to accept more lines than specified by the OCCURS parameter, the parameter value is roughly doubled as long as the table size remains smaller than 8 KB; this table area is held in the roll area. If the table exceeds the maximum permitted size, the OCCURS parameter is not increased and the remaining part of the table is rolled out to the paging area (see DATA ).For this reason, the OCCURS value determined by the DESCRIBE statement may differ from that in the DATA statement.
The runtime required to execute the DESCRIBE TABLE statement is approx. 4 msn (standardized microseconds).
Index
© SAP AG 1996
No hay comentarios:
Publicar un comentario
Nota: solo los miembros de este blog pueden publicar comentarios.