Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Processing Internal Data →  Assignments →  Assigning Structure Components →  Assigning Components: Examples 

Component Operator for Table Expression

This example demonstrates the component operator for a table expression.

Other versions: 7.31 | 7.40 | 7.54

Source Code

    input( ).
    TRY.

        struct =
          CORRESPONDING #( itab[ carrid = carrid connid = connid ] ).

        cl_demo_output=>display( struct ).
      CATCH cx_sy_itab_line_not_found.
        cl_demo_output=>display( 'Nothing found' ).
    ENDTRY.

Description

This example shows a table expression that reads a row of an internal table (as the parameter of a constructor expression) with the component operator CORRESPONDING. After the assignment is complete, the components of the target structure struct contain the values of the corresponding column of the row read by the table expression.