SAP® Documentation

Single view

ABENMESH_INSERT - MESH INSERT

BAL_S_LOG - Application Log: Log header data   CPI1466 during Backup  
This documentation is copyright by SAP AG.
SAP E-Book

INSERT mesh_path

Syntax

INSERT line_spec INTO TABLE mesh_pathresult.

Effect

Inserts rows in the last path node of a mesh path mesh_path. As in inserts into a directly specified table using INTO TABLE, the position of the inserted rows is determined using the primary table key. The behavior when duplicate rows are encountered with respect to unique table keys is also the same. When specifying the inserted rows using line_spec, the same applies when inserting rows in directly specified tables and they must be compatible with the row type of the last path node.

A set of rows with the row type of the last path node is instantiated from line_spec and the result of the mesh path. This set is inserted in the last path node in accordance with the rules of INSERT:

  • For each row in line_spec or for each row in an inserted table, the same number of rows are created as described by the result. If the mesh path contains only the initial associations, one row is created; in the case of path extensions, multiple rows can be created.
  • In the new rows, the columns in the ON condition of the last association of the mesh path are filled as follows:
  • If the mesh path contains only an initial association, each of these columns is filled with the current comparison value from source.

  • If the mesh path contains path extensions, each of these columns is filled with the value described by the result of the preceding association.

The remaining components have the value of the rows specified in line_spec.

The following applies when specifying the associations:

  • If the mesh path contains only an initial association, the square brackets cannot contain an additional condition.
  • If the mesh path contains path extensions, all associations can contain additional conditions, which can be specified using the additions USING KEY and WHERE log_exp. The square brackets [ ] for the association of the last path extension must be empty.

The number of rows inserted is the number of rows specified in lin_spec multiplied by the number or rows described in result. If, due to an additional WHERE condition, the results set is empty, no rows are inserted.

result can be used to specified the output behavior when precisely one row is specified, as in INSERT. Since more than one row is always inserted when path extensions are used, the addition result can only be specified in the following cases:

  • If the variant LINES OF is not used in line_spec.
  • The mesh path contains only the initial association.

The return code sy-subrc is set in the same way as in the corresponding statement INSERT.

Notes

  • When INITIAL LINE is used to specify an initial row in line_spec, only those components remain initial that are not specified in the ON condition.
  • The square brackets of the association of the last path extension are empty, since it needs only to indicate the mesh node in which the rows are inserted.






ABAP Short Reference   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 6083 Date: 20200125 Time: 091020     sap01-206 ( 48 ms )

Our Service

Looking for Support? Questions?

The

Consolut

Callback-Service

Leave us your contact details and we will call you back. Panels marked with * are mandatory.