Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing Internal Data →  Internal Tables →  Processing Statements for Internal Tables →  MODIFY itab 

MODIFY itab - itab_line

Short Reference

Other versions: 7.31 | 7.40 | 7.54


... { table_key  | index } FROM wa 
                          [TRANSPORTING comp1 comp2 ...]


... TRANSPORTING comp1 comp2 ...


In this variant, the MODIFY statement assigns the content of work area wa to a row specified either by a table key in table_key or by specification of a row number in index. wa is a functional operand position.

TRANSPORTING can be used to restrict the comp components to be modified. result can be used when you change an individual row to set a reference in the form of a field symbol or a data reference to the row changed.

The wa work area must be compatible with the row type of the internal table for access using table keys, index access to sorted tables, and using the TRANSPORTING addition. The only situation in which wa does not have to be compatible with the row type of the internal table is when data is inserted in standard tables using the primary table index and without the TRANSPORTING addition. If necessary, it is converted to the row type according to the conversion rules.


Apart from classes, there is one other obsolete short form for which the FROM wa declaration can be omitted if the internal table has an itab header line with the same name. The statement then uses the header line as a work area implicitly.


... TRANSPORTING comp1 comp2 ...


If the TRANSPORTING addition is used, only the specified comp1 comp2 ... components of the work area are assigned to the corresponding components of the row(s) to be changed. For sorted tables and hashed tables, no primary table key components may be specified after TRANSPORTING.

The comp1 comp2 ... component specifications are made in accordance with the rules specified in Component declaration with the constraint that after TRANSPORTING, no attributes of classes can be addressed using the object component selector.


MODIFY itab - table_key

MODIFY itab - index

Internal tables, index assess with key specification