SAP MESH INSERT ABEXA



Get Example source ABAP code based on a different SAP table
  



ABAP_MESH - Insertions in Mesh Paths
This example demonstrates how lines are inserted in mesh paths.

ABAP_SOURCE_CODE
DEMO CL_DEMO_MESH_INSERT_NUMBERS

ABAP_DESCRIPTION
Line insertions are demonstrated using previously filled mesh nodes mesh-node1, mesh-node2, and mesh-node3.
The statement INSERT for inserting a work area into a mesh path with an initial mesh association. INSERT VALUE line2( col2 = 3333 ) INTO TABLE
mesh-node1 _node2[ mesh-node1[ 1 ] ]. The work area is created by a constructor expression in which only the component col2 needs to be filled since the other component is filled implicitly when the mesh association is evaluated. If specified in the square brackets of the mesh association, source is a table expression that reads the first line of the root node. In the follow-on node mesh-node2, a line is inserted whose first column matches the root node and whose third column has a new value.
The statement INSERT for inserting the lines of an internal table into a mesh path with an initial mesh association. INSERT LINES OF VALUE t_itab2( ( col2 = 1 )
( col2 = 2 )
( col2 = 3 ) ) INTO TABLE
mesh-node1 _node2[ mesh-node1[ 2 ] ]. The internal table is created by a constructor expression in which only the column col2 needs to be filled since the other component is filled implicitly when the mesh association is evaluated. If specified in the square brackets of the initial mesh association, source is a table expression that reads the second line of the root node. In the follow-on node mesh-node2, lines are inserted whose first column matches that of the entry node and whose third column has new values.
The statement INSERT for inserting initial lines into a mesh path with a path extension. INSERT INITIAL LINE INTO TABLE
mesh-node1 _node2[ mesh-node1[ 3 ] ] _node3[ ]. If specified in the square brackets of the initial mesh association, source is a table expression that reads the third line of the root node. Two lines in the follow-on node mesh-node2 match the result of the initial mesh association. Accordingly, two lines are inserted in mesh-node3, where the first two columns are determined by the mesh association and the third column col3 is initial.
The statement INSERT for inserting multiple lines into a mesh path with a path extension. INSERT LINES OF VALUE t_itab3( ( col3 = 10 )
( col3 = 20 )
( col3 = 30 ) ) INTO TABLE
mesh-node1 _node2[ mesh-node1[ 3 ] ] _node3[ ]. As in the previous step, but here three lines of an internal table are inserted for each described line. Only the value of the third column col3 is taken from the table.