Ansicht
Dokumentation

ABENMESH_PATH - MESH PATH

ABENMESH_PATH - MESH PATH

General Data in Customer Master   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

- mesh_path

... ${mesh-$|mesh>-$|mesh_ref->$}rnode\_associ[ ... ] \_assoc1[ ... ]\_assoc2[ ... ] ...

Additions

1. ... ${mesh-$|mesh>-$|mesh_ref->$}rnode

2. ... \_associ[ source $[cond$] ]

3. ... \_assoc1[ $[cond$] ]\_assoc2[ $[cond$] ] ...

Effect

Specifies a mesh path in statements and expressions used to process meshes. A mesh path is always constructed as follows:

  • A root node rnode specification
  • An initial mesh association \_associ specification between a root node and a follow-on node
  • Optional further mesh associations \_assoc1, \_assoc2, ... specifications whose start nodes can be the follow-on nodes of preceding mesh associations.

When specifying a mesh path, it is not significant whether the address nodes of the mesh are internal tables or references to internal tables. When a mesh path is evaluated, references to internal tables are dereferenced automatically. A mesh path describes a set of lines in its final path node as its result.

Note

A mesh path cannot exit a mesh. Each follow-on node is part of the same mesh as the root node. Meshes can, however, be nested by specified a mesh path expression as the source of the initial mesh association.

Addition 1

... ${mesh-$|mesh>-$|mesh_ref->$}rnode

Effect

Root node rnode of a mesh path. rnode is a node of a mesh type that must be the start node or target node of a mesh association of the mesh type. The same options are available when specifying the mesh as when addressing regular structure components:

  • mesh-rnode
mesh is a mesh, that is, a data object of the respective mesh type. The root node is addressed using the structure component selector (-).
  • mesh>-rnode
mesh> is a field symbol typed with the mesh type and to which a mesh is assigned. The root node is addressed using the structure component selector (-).
  • mesh_ref->rnode
mesh_ref is a reference variable whose static type is the mesh type and that points to a mesh. The root node is addressed using the object component selector (->).

Example

Definition of a mesh type mesh with internal tables and a mesh type refmesh with references to internal tables as components. A data object mesh has the type mesh and a data object meshref points to a data object of type refmesh. The root node of the first mesh path is mesh-node1. The structure component selector is used here. The root node of the second mesh path is node1 in the anonymous data object of type refmesh, for which the object component selector is used. The references within the mesh are dereferenced implicitly.

TYPES:
  BEGIN OF MESH mesh,
    node1 TYPE itab1 ASSOCIATION _assoc2 TO node2 ON ...
    node2 TYPE itab2,
  END OF MESH mesh,
  BEGIN OF MESH refmesh,
    node1 TYPE REF TO itab1 ASSOCIATION _assoc2 TO node2 ON ...
    node2 TYPE REF TO itab2,
  END OF MESH refmesh.

DATA(mesh) =    VALUE mesh( ).
DATA(meshref) = NEW refmesh( VALUE refmesh( ) ).

... mesh-node1\_assoc2[ ... ] ...
... meshref->node1\_assoc2[ ... ] ...


Addition 2

... \_associ[ source $[cond$] ]

Effect

Initial mesh association of a mesh path. Each mesh path has an initial mesh association specified after its root node. For \_associ[ ... ], all mesh associations \_assoc[ ... ] suitable for the root node can be specified, namely:

The syntax used to specify the line of the entry node in the square brackets of the mesh association \_assoc[ ... ] is

[ source $[cond$] ]

A structure source of the line type of the root node must be specified as the source of the mesh association. This is a general expression position. When the mesh path is evaluated, the content of source is used as the starting point of the mesh association. Here, the evaluation of the ON condition of the mesh association used and any additional conditions cond produces a description of a set of lines of the follow-on node as a result.

Note

A structure specified as source does not need to occur as a line in the root node. It is a good idea to use a table expression that read a line from the root node. A mesh path expression can, however, also be specified to nest meshes.

Example

Forward associations and an inverse mesh association as initial mesh associations of mesh paths. Table expressions that read a line from the root node are used as sources of the mesh associations.

TYPES:
  BEGIN OF MESH mesh,
    node1 TYPE itab1 ASSOCIATION _assoc2 TO node2 ON ...
    node2 TYPE itab2,
  END OF MESH mesh.

DATA(mesh) = VALUE mesh( ... ).

... mesh-node1\_assoc2[ mesh-node1[ ... ] ].
... mesh-node1\_assoc2~node2[ mesh-node1[ ... ] ].
... mesh-node2\^_assoc2~node1[ mesh-node2[ ... ] ].


Addition 3

... \_assoc1[ $[cond$] ]\_assoc2[ $[cond$] ] ...

Effect

Path extension of a mesh path. Any number of further mesh associations can be chained after the initial mesh association. All mesh associations \_assoc can be specified for \_assoc1, \_assoc2, ... that match the entry node in question, namely:

The syntax used to specify the line of the start node in the square brackets of the mesh association \_assoc[ ... ] is

[ $[cond$] ]

When the mesh path is evaluated, the result of the preceding mesh association, that is, the description of a set of lines in the entry node, is used as the starting point of the mesh association. Here, the evaluation of the ON condition of the mesh association used and any additional conditions cond produces a description of a set of lines of the follow-on node as a result. If no further conditions are specified, the square brackets are empty.

Example

Path extension of the initial mesh association. The follow-on node of the initial mesh association is node2 and this node is the entry node of the path extension. The result of the entire mesh path is a description of lines in node3. The result of the initial mesh association, whose starting point is defined by a table expression, is the implicit source of the path extension.

TYPES:
  BEGIN OF MESH mesh,
    node1 TYPE itab1 ASSOCIATION _assoc2 TO node2 ON ...
    node2 TYPE itab2 ASSOCIATION _assoc3 TO node3 ON ...
    node3 TYPE itab3,
  END OF MESH mesh.

DATA(mesh) = VALUE mesh( ).

... mesh-node1\_assoc2[ mesh-node1[ ... ] ]\_assoc3[  ] ...






Addresses (Business Address Services)   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 11037 Date: 20240420 Time: 035233     sap01-206 ( 140 ms )