SAP TYPES MESH ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• BEGIN OF MESH TYPES
• END OF MESH TYPES

TYPES, BEGIN OF MESH mesh_type
Short Reference

ABAP_SYNTAX
TYPES BEGIN OF MESH mesh_type.
...
TYPES node ${ TYPE ${$[REF TO$] table_type$}$|ref_type $}
$| ${ LIKE ${$[REF TO$] itab $}$|dref $}
$[association1$],
$[association2$],
...
...
TYPES END OF MESH mesh_type.

What does it do?
Definition of a mesh type for a mesh. A mesh type is a special structure type. The components of the structure type are referred to as mesh nodes and are subject to the following restrictions:
The type of a mesh node must be a non-generic table type or a reference type with the static type of a non-generic internal table. The node type can be defined as follows:
Using the addition TYPE, specifying a table type table_type with or without REF TO, or by specifying such a reference type ref_type directly.
Using the addition LIKE, specifying an internal table itab with or without REF TO, or by specifying such a reference variable dref directly.
The line type of a mesh node must be structured and cannot contain internal tables or reference variables as components. Elementary data types and substructures are allowed as components. Substructures must meet the same prerequisite.
A regular structure type can be enhanced by defining one or more mesh associations association for each mesh node. Each association connects two mesh nodes using a condition. The relationships between the tabular nodes of a mesh type defined using mesh associations are evaluated in the special expressions and statements used to process meshes in mesh paths.



Latest notes:

Meshes must be fully compatible for assignments, comparisons, and parameter passing. Meshes are compatible if their structures are compatible, the node names match, and the mesh associations match in names, ON conditions, and the table key used.
Using the structure component selector (-), mesh nodes can be addressed and used as the components of the corresponding structure. If field symbols or reference variables point to mesh nodes, they are also handled like regular structure components. In particular, the statement MOVE-CORRESPONDING can also be used between incompatible meshes and between meshes and structures.
A mesh type is always fully defined. Generic mesh types are not possible.
Reference types as components can be particularly useful when meshes are injected into existing programs in which suitable internal tables already exist.
The statements for defining a mesh type are usually summarized in a chained statement.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
Declaration of a mesh type with internal tables for the flight data model.
ABEXA 00730
ABAP_EXAMPLE_END

Return to menu