"The following example assumes that there are multiple flights
"from a city of the specified carrier with the particular destination.
"Assume there are 5 flights available from Frankfurt (cityfrom) that
"matches the WHERE clause. The first statement only returns one entry
"in the internal table, the second 5 (all).
"Using the DISTINCT addition
SELECT DISTINCT cityfrom
FROM zdemo_abap_flsch
WHERE carrid = 'LH' AND
cityto = 'NEW YORK'
INTO TABLE @DATA(itab_distinct).
"Not using the DISTINCT addition
SELECT cityfrom
FROM zdemo_abap_flsch
WHERE carrid = 'LH' AND
cityto = 'NEW YORK'
INTO TABLE @DATA(itab_no_distinct).
Serkan AKKAVAK
Computer Engineer BSc
Head of SAP & Software Department
Contact : serkurumsal@yandex.com

0 Comments