Code: Alles auswählen.
types:
begin of test_daten_type,
matnr type matnr,
text type string,
werk type werks,
end of test_daten_type.
data:
test_daten type table of test_daten_type.
test_daten = value #(
( matnr = '4711' text = 'Schraube' werk = '0001' )
( matnr = '4712' text = 'Bolzen' werk = '0001' )
( matnr = '4711' text = 'Schraube' werk = '0011' )
( matnr = '4712' text = 'Hammer' werk = '0011' )
).
" funktioniert
data found type abap_bool.
if ( line_exists( test_daten[ matnr = '4711' werk = '0011' ] ) ).
found = abap_true.
endif.
cl_demo_output=>display( found ).
Code: Alles auswählen.
data(found2) = line_exists( test_daten[ matnr = '4711' werk = '0011' ] ).
Code: Alles auswählen.
data found2 type abap_bool.
found2 = line_exists( test_daten[ matnr = '4711' werk = '0011' ] ).
Code: Alles auswählen.
DATA(found) = xsdbool( line_exists( test_daten[ matnr = '4711' werk = '0011' ] ) ).
Folgende Benutzer bedankten sich beim Autor rob_abc für den Beitrag (Insgesamt 4):
a-dead-trousers • Radinator • edwin • ewx