ABAP - Keyword Documentation →  ABAP - Reference →  Declarations →  Declaration Statements →  Data Types and Data Objects →  Declaring Data Types →  TYPES → 

TYPES - BEGIN OF MESH mesh_type

Quick Reference

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.

Effect

Defines 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:

A regular structure type can be enhanced by defining one or more associations association for every mesh node. These associations link two mesh nodes using a condition. The relationships between the tabular nodes of a mesh type defined using associations are evaluated in the special expressions and statements used to process meshes in mesh paths.

Notes

Example

Declares a mesh type with internal tables for the flight data model.

TYPES:
  t_scarr    TYPE HASHED TABLE OF scarr
             WITH UNIQUE KEY carrid,
  t_spfli    TYPE HASHED TABLE OF spfli
             WITH UNIQUE KEY carrid connid,
  t_sflight  TYPE HASHED TABLE OF sflight
             WITH UNIQUE KEY carrid connid fldate,
  t_sairport TYPE HASHED TABLE OF sairport
             WITH UNIQUE KEY id,
  BEGIN OF MESH t_flights,
    scarr TYPE t_scarr
      ASSOCIATION _spfli TO spfli
               ON carrid = carrid,
    spfli TYPE t_spfli
      ASSOCIATION _sflight TO sflight
               ON carrid = carrid AND
                  connid = connid
      ASSOCIATION _sairport TO sairport
               ON id = airpfrom,
    sflight TYPE t_sflight,
    sairport TYPE t_sairport,
  END OF MESH t_flights.





Continue
TYPES - association