SAP MESH LOOPS ABEXA



Get Example source ABAP code based on a different SAP table
  



ABAP_MESH - Loops Across Mesh Paths
This example demonstrates loops across mesh paths.

ABAP_SOURCE_CODE
DEMO CL_DEMO_MESH_LOOP_AT_FLIGHTS

ABAP_DESCRIPTION
Loops are performed across the following mesh paths:
Mesh path with forward association as its initial mesh association. The source in the square brackets is a table expression, supplemented by a WHERE condition. flights-scarr _spfli[ flights-scarr[ carrname = name ]
WHERE countryto = country ] The result set consists of all lines of the node spfli that meet the condition.
Mesh path with forward associations as its initial mesh association and path extension. The source in the square brackets of the initial mesh association is a table expression, supplemented by a WHERE condition. A key is specified in the square brackets of the path extension for evaluating the mesh association. flights-scarr _spfli[ flights-scarr[ carrname = name ]
WHERE countryto = country
] _sairport[ USING KEY primary_key ] The result set consists of all lines of the node sairport that match the column airpfrom in the result set of the entry node spfli. Duplicate lines are removed automatically.
Mesh path with forward associations as its initial mesh association and two path extensions. The last path extension is an inverse mesh association that leads back to the entry node. flights-scarr _spfli[ flights-scarr[ carrname = name ]
WHERE countryto = country
] _sflight[
HERE planetype = plane1 OR
planetype = plane2
] ^_sflight~spfli[ ] The result set consists of all lines of the node spfli for which the lines in the result set of sflight have specific values in the column plane_type.
See also the executable example for table comprehensions for meshes.

What does it do?