New syntax reading internal table with field symbol
The below syntax used to read internal table to a structure but it is also possible read and assign to the field symbol
SELECT FROM spfli INTO TABLE @DATA(lt_spfli).
DATA(ls_spfli) = lt_spfli[ carrid = ‘AA’ connid = ‘0017’ ].
IF sy–subrc IS INITIAL.
New syntax of read and assign field symbol:
SELECT * FROM scarr INTO TABLE @DATA(lt_scarr).
IF lt_scarr IS NOT INITIAL.
ASSIGN lt_scarr[ carrid = |AA| ] TO FIELD–SYMBOL(<fs_scarr>).
Read successful -> sy-subrc = 0 and field symbol assigned
Read unsuccessful -> sy-subrc = 4 and field symbol not assigned