SAP Tutorials Blog


 


Note that, since database tables are flat, the target structure must also be flat. In the example below, the SINGLE addition reads only a single row into the structure. It returns the first entry that matches the WHERE condition.


"Creating a structure with a compatible type

DATA ls_fli1 TYPE zdemo_abap_fli.


SELECT SINGLE FROM zdemo_abap_fli

  FIELDS *

  WHERE carrid = 'LH'

  INTO @ls_fli1.


"Target structure declared inline

SELECT SINGLE FROM zdemo_abap_fli

  FIELDS *

  WHERE carrid = 'LH'

  INTO @DATA(ls_fli2).



Serkan AKKAVAK

Computer Engineer BSc

Head of SAP & Software Department

Contact : serkurumsal@yandex.com