TYPES: BEGIN OF s,
comp1 TYPE i,
comp2 TYPE c LENGTH 3,
END OF s.
DATA itab TYPE TABLE OF s WITH EMPTY KEY.
itab = VALUE #( ( comp1 = 1 comp2 = 'aaa' ) ( comp1 = 2 comp2 = 'bbb' ) ( comp1 = 3 comp2 = 'ccc' ) ).
DATA(str_tab) = VALUE string_table( ( `abc` ) ( `def` ) ( `ghi` ) ).
"abap_true
DATA(line_exists1) = xsdbool( line_exists( itab[ 1 ] ) ).
"abap_false
DATA(line_exists2) = xsdbool( line_exists( itab[ 4 ] ) ).
"abap_true
DATA(line_exists3) = xsdbool( line_exists( itab[ comp1 = 2 ] ) ).
"abap_true
DATA(line_exists4) = xsdbool( line_exists( str_tab[ 2 ] ) ).
"abap_false
DATA(line_exists5) = xsdbool( line_exists( str_tab[ table_line = `xxx` ] ) ).
Serkan AKKAVAK
Computer Engineer BSc
Head of SAP & Software Department
Contact : serkurumsal@yandex.com

0 Comments