Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing Internal Data →  Meshes →  Meshes - Using Mesh Paths 

SET ASSOCIATION mesh_path

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


SET ASSOCIATION mesh_path { = wa    } 
                        | { LIKE wa }
                        | { INITIAL }.

Extras

1. ... = wa
2. ... LIKE wa

3. ... INITIAL

Effect

Sets associations for a mesh_path. The statement sets columns in the second last path node of the mesh path. These columns are listed as scomp in the ON condition of the association starting with the node. The columns are set on values that are specified by the additions on the right side. The content of the last path node is ignored.

  • If the mesh path only contains one initial association, the second last node is the root node of the path and the corresponding content is neither read nor changed. Instead the columns specified by the ON condition are set for the structure, which is specified as the source in the square brackets of the association. The square brackets cannot contain any additional conditions.
  • If the mesh path contains path extensions, it is evaluated down to the second last node. The columns specified using the ON condition are changed in the rows of the second last path node, which are described in the result. All associations (except the last one) of the mesh path can contain additional conditions, which can be specified using USING KEY and WHERE log_exp. The square brackets [ ] for the association of the last path extension must be empty.

The last association of the mesh path is only required to determine the components to be changed (using the ON condition). Therefore the last association cannot contain any additional conditions.


Notes

  • Using statement SET ASSOCIATION, association-relevant components can be set in structures and mesh nodes, without needing to know the component names. These structures can be used, for example, to build mesh nodes.

  • Using statement SET ASSOCIATION, change operations can be performed that provide additional options to those offered by statements INSERT and MODIFY.

  • A mesh path that only contains an initial association can also be used to modify mesh nodes. This can be done by using a field symbol or data reference in source to reference a row in a mesh node.

Addition 1

... = wa

Effect

Assigns columns of a work area wa. The work area wa must be a structure with the same row type as the last path node.

The contents of the components of wa are listed in the ON condition of the last association of the mesh path as tcomp. These contents are assigned to the allocated components scomp in the structure source (or assigned to the allocated columns of the rows found in the second last path node).


Note

In terms of semantics, key values in an instance of a start node of an association are set as they are in an instance of a follow-on node.

Addition 2

... LIKE wa

Effect

Assigns columns of a work area wa. The work area wa must be a structure with the same row type as the second last path node.

The contents of the components of wa are listed in the ON condition of the last association of the mesh path as scomp. These contents are assigned to the identically named components in the structure source (or assigned to the identically named columns of the rows found in the second last path node).


Note

In terms of semantics, key values in an instance of a start node of an association are set as they are in a different instance of the same node.

Addition 3

... INITIAL

Effect

Assigns initial values

All components of source (or all columns of the rows found in the second last path node), which are listed in the ON condition of the last association of the mesh path as scomp, are assigned the initial value that corresponds to their type.


Note

In terms of semantics, key values in an instance of a start node of an association are initialized.

Continue

Setting Associations for Mesh Paths - Example