ABAP Keyword Documentation → ABAP − Reference → Processing Internal Data → Internal Tables → Expressions and Functions for Internal Tables → Table Functions → line_index - Index Function
Internal Tables, Index Function
The example demonstrates the table function line_index
.
Other versions:
7.31 | 7.40 | 7.54
Source Code
DATA idx TYPE TABLE OF i.
idx = VALUE #(
( line_index( flight_tab[ carrid = 'UA'
connid = '0941'
##primkey[id] ] ) )
( line_index( flight_tab[ KEY id
carrid = 'UA'
connid = '0941' ] ) )
( line_index( flight_tab[ KEY id
carrid = 'xx'
connid = 'yyyy' ] ) )
( line_index( flight_tab[ cityfrom = 'FRANKFURT'
cityto = 'NEW YORK'
##primkey[cities] ] ) )
( line_index( flight_tab[ KEY cities
cityfrom = 'FRANKFURT'
cityto = 'NEW YORK' ] ) )
( line_index( flight_tab[ KEY cities
cityfrom = 'xxxxxxxx'
cityto = 'yyyyyyyy' ] ) ) ).
cl_demo_output=>display( idx ).
Description
Various row numbers in the same internal table as used in the executable example for
specified rows are read and inserted in an internal table, idx
:
id
is used.
cities
.