Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Processing Internal Data →  Meshes →  Meshes - Using Mesh Paths →  DELETE mesh_path 

Deleting Multiple Rows in Mesh Paths

This example demonstrates how multiple rows are deleted in mesh paths.

Other versions: 7.31 | 7.40 | 7.54

Source Code

    DATA(out) = cl_demo_output=>new(
      )->begin_section( 'Initial node1'
      )->write( mesh-node1
      )->next_section( 'Initial node2'
      )->write( mesh-node2 ).

    out->next_section( 'Delete Multiple Lines Using ON' ).
    DELETE mesh-node1\_node2[ mesh-node1[ 1 ] ].
    out->write( mesh-node2 ).

    out->next_section( 'Delete Multiple Lines Using ON and WHERE' ).
    DELETE mesh-node1\_node2[ mesh-node1[ 2 ] WHERE col3 > 23 ].
    out->write( mesh-node2 ).

    out->display( ).

Description

Starting from the filled mesh nodes mesh-node1 and mesh-node2, multiple rows from mesh-node2 are deleted:

  • Statement DELETE for deleting multiple rows using the ON condition.
DELETE mesh-node1\_node2[ mesh-node1[ 1 ] ].
All rows of the node mesh-node2 identified using the initial mesh association \_node2 starting with the first row of the node mesh-node1 are deleted.
  • Statement DELETE for deleting multiple rows using the ON condition with an additional WHERE condition.
DELETE mesh-node1\_node2[ mesh-node1[ 2 ] WHERE col3 > 23 ].
All rows of the node mesh-node2 identified using the initial mesh association \_node2 starting with the second row of the node mesh-node1 and which meet the additional WHERE condition are deleted.