ABAP Keyword Documentation → ABAP - Reference → Processing Internal Data → Meshes → Meshes - Using Mesh Paths
DELETE mesh_path
Other versions:
7.31 | 7.40 | 7.54
Syntax
DELETE { TABLE mesh_path table_key }
| { mesh_path }.
Variants
1. DELETE TABLE mesh_path table_key.
2. DELETE mesh_path.
Effect
Deletes a single row or multiple rows from the last path node of a mesh path mesh_path
.
Note
Note that the addition TABLE
(as in
DELETE) is highly significant for directly specified internal tables and distinguishes different variants of statements from each other.
Variant 1
DELETE TABLE mesh_path table_key.
Effect
Deletes precisely one row from the follow-on node of an initial association. In this variant, no path extensions can be specified and the square brackets of the initial association cannot contain any additional conditions. The row to be modified is determined using the table key:
- If the
ON
condition of the association covers all key fields of the table key it uses, the deleted row is determined using the result of the mesh path. Here, only those fields of theON
condition are respected that are also key fields.
- If the
ON
condition of the association does not cover the key fields of the table key it uses, the missing key fields must be specified in the additiontable_key
and these are combined with the result of the mesh path. The same can be specified fortable_key
as in the statementDELETE
TABLE itab
with a directly specified internal table:
- If
WITH TABLE KEY
is used, all key fields not covered by theON
condition must be specified. No key fields can be specified that are already covered by theON
condition. Furthermore, all fields of the follow-on node used in theON
condition must exist in the table key used by the association.
- Only those components are taken from a work area specified using
FROM wa
that match the non-covered key fields. All other components are ignored. The work areawa
must be compatible with the row type of the last path node.
table_key
using keynmame COMPONENTS
or USING keyname
, this
key overrides any USING KEY
s
specified in the definition of the association. The row is deleted with respect to this table key and its key fields must be covered in full.
The row is deleted in accordance with the rules of DELETE. If the follow-on node contains multiple rows that match the specified key, the first row found is deleted. If the row to be deleted is not found, nothing is deleted.
The return code sy-subrc
is set in the same way as in the corresponding statement DELETE itab
.
Notes
- If the
ON
condition covers all key fields, the additionWITH TABLE KEY
cannot be specified. The additionFROM wa
can be specified, but is ignored.
- If no explicit table key is specified in the definition of the
ON
condition and in the statementDELETE TABLE mesh_path
, the row is deleted with respect to the primary table key.
- Columns of the follow-on node that are specified in the
ON
condition but are not part of the table key used are either forbidden or ignored in this variant. This means that the row to be deleted cannot be determined beyond the bounds of the table key.
The return code sy-subrc
is not set in this variant.
Example
Variant 2
DELETE mesh_path.
Effect
Deletes multiple rows from the last path node of a mesh path mesh_path
. Deletes all rows from the last path node described by the
result of the mesh path.
An additional condition can be specified in the square brackets [ ...
] of each association of the mesh path using the additions
USING KEY
and WHERE log_exp
.
Example