Syntax for Modify in Change 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.

The counting of table entries begins with 1.

Performance

You 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).(96.3)

Related posts :

Syntax for Modify data base table part one
and two

DO

EDITOR CALL PART ONE

EDITOR CALL PART TWO

ELSE AND ELSE-IF

EXEC

No comments :

Post a Comment