MODIFY - Change an internal table
Variant
MODIFY itab [FROM wa] [INDEX idx].Effect
Changes an entry in the internal table itab .If you specify FROM wa , the line is replaced by the explicitly specified work area wa . If the FROM specification is omitted, the line is replaced by the header line from itab .
With INDEX idx , you can specify the table index of the line to be changed. The index specification can be omitted in a LOOP on an internal table.
The INDEX specification can also appear before the FROM specification.
The return code value is set as follows:
When specifying the insertion point with INDEX idx :
SY-SUBRC = 0 The change was executed.
SY_SUBRC = 4 The index specification was too big. The change was not executed because the table had fewer than idx entries.
If you do not specify the insertion point, the &ABAP_SUBRC is set to 0.
Note
The counting of table entries begins with 1.Note
PerformanceYou can avoid unnecessary assignments by using statements which have an explicitly specified work area for internal tables with a header.
The runtime required to execute the MODIFY itab INDEX idx statement is about 5 msn (standardized microseconds).
Index
© SAP AG 1996
No hay comentarios:
Publicar un comentario
Nota: solo los miembros de este blog pueden publicar comentarios.