SAP ABAP MESHES



Get Example source ABAP code based on a different SAP table
  


VERSION 5 IN

Meshes
Meshes are instances of mesh types defined as follows: TYPES BEGIN OF MESH
...
TYPES snode ... ASSOCIATION _assoc
TO tnode ON tcomp1 = scomp1 $[AND ...$].
...
TYPES END OF MESH
These are special structures whose components, which are referred to as nodes, are either structured internal tables or reference variables that refer to such internal tables.
The addition ASSOCIATION can be used to declare mesh associations defined using ON conditions between start nodes and target nodes of the mesh. These semantic relationships between the mesh nodes can be evaluated in mesh paths. The mesh paths can be used in expressions and processing statements for meshes.
Mesh paths
Results of mesh paths



Latest notes:

A mesh node is addressed in the same way as a regular structure component; by using the structure component selector (-) or the object component selector (->). Mesh associations are evaluated in mesh paths. If no path is specified, a mesh node is handled in the same way as a regular structure component. The same applies to field symbols or reference variables that point to mesh nodes. The statement MOVE-CORRESPONDING also handles a mesh like a regular structure.
In the simplest case, the relationships implemented between mesh nodes using mesh associations can be compared to foreign key dependencies. Here, the start node of a mesh association is the check table and the target node is the foreign key table. The use of mesh paths makes it easier to evaluate these relationships, without the need to program the relevant selections.
NON_V5_HINTS
ABAP_HINT_END
VX_EXA_ONLY



Example ABAP Coding

The program DEMO_MESH_PACK demonstrates an application based on meshes, which analyses the repository objects in packages. All the possible uses of meshes are demonstrated and can be specifically analyzed in the debugger.
ABAP_EXAMPLE_END