ABAP_SYNTAX MODIFY ${ TABLE mesh_path> $[USING KEY keyname>$] FROM wa $[TRANSPORTING comp1 > comp2> ...$] result> $} $| ${ mesh_path> FROM wa $[TRANSPORTING comp1> comp2> ...$] $}.>
ABAP_VARIANTS: 1 MODIFY TABLE mesh_path FROM wa ...> 2 MODIFY mesh_path FROM wa ...>
ABAP Addition ... TRANSPORTING comp1 comp2 ...>
What does it do? Modifies one or more lines in the last path node of a mesh path mesh_path>>. In the line or lines described by the mesh path, the following columns are assigned the corresponding values from the work area wa>:
If the optional addition TRANSPORTING> is not specified, all columns are modified
that are not in the ON> condition > of the mesh association used,
that are no part of the primary key of the last path node, if the table is a sorted table or a hashed table.
If the optional addition TRANSPORTING> is specified, the columns listed after it are modified wa> expects a structure that is compatible with the line type of the last path node. No key fields of primary or secondary table keys in the last path node can be overwritten. The return code sy-subrc> is set in the same way as in the corresponding statement MODIFY itab>>.
Latest notes: It should be noted that the addition TABLE> is highly significant for directly specified internal tables, as in MODIFY>>, and distinguishes different variants of statements from each other. NON_V5_HINTS ABAP_HINT_END
ABAP_VARIANT_1 MODIFY TABLE mesh_path FROM wa ...>
What does it do? Modifies exactly one line in the follow-on node of an initial mesh association>. In this variant, no path extensions can be specified, and the square brackets of the initial mesh association cannot contain any additional conditions>. The line to be modified is determined using the table key used:
If the ON> condition> of the mesh association used covers all key fields of the table key it uses, the line to be modified is determined using the result> of the mesh path. However, only those fields of the ON> condition are respected that are also key fields.
If the ON> condition> of the mesh association used does not cover the key fields of the table key it uses, the missing key fields are taken from the associated components of the work area wa>. The line is modified in accordance with the rules of MODIFY>>. If the follow-on node contains multiple lines that match the specified key, the first line found is modified. If the line to be modified is not found, nothing is modified. The key used can be specified using the addition USING KEY>, just as in the statement MODIFY>> with directly specified internal table. result>> can be used to specify the output behavior.
Latest notes: Columns of the follow-on node that are listed in the ON> condition> but are not part of the table key used are always ignored in this variant. This means that the line to be modified cannot be determined beyond the bounds of the table key. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_ABEXA Changing Single Lines in Mesh Paths> ABAP_EXAMPLE_END
ABAP_VARIANT_2 MODIFY mesh_path FROM wa ...>
What does it do? Modifies multiple lines in the last path node of a mesh path mesh_path>>. All lines in the last path node that are described by the result> of the mesh path are modified. An additional condition can be specified in the square brackets [ ... ]> > of each mesh association of the mesh path using the additions USING KEY>> and WHERE log_exp >>. In the last mesh association, the addition USING KEY> cannot be specified if it is specified after FROM wa>.
ABAP_EXAMPLE_ABEXA Changing Multiple Lines in Mesh Paths> ABAP_EXAMPLE_END
ABAP Addition
What does it do? The same applies to the addition TRANSPORTING> as to the statement MODIFY>> with directly specified internal table, with the restriction that no columns can be specified that are part of the primary key of the last path node if the table is a sorted table or hashed table.
Latest notes: The TRANSPORTING> addition can also be used to modify columns that are specified in the ON> condition > of the mesh association used. NON_V5_HINTS ABAP_HINT_END