Advertising:
Value (ABAP keyword): Difference between revisions
From SAP Knowledge Base
m (Unirab moved page Keyword value to Value (ABAP keyword)) |
|||
Line 8: | Line 8: | ||
fldate = '20171219' ] OPTIONAL ). | fldate = '20171219' ] OPTIONAL ). | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Without optional and no row is | Without optional and no row is found, the exception cx_sy_itab_line_not_found is thrown. | ||
= Get field of single row = | = Get field of single row = |
Revision as of 02:00, 27 December 2024
Get single row
"sflight is an internal table of table sflight
DATA(single_row) = VALUE #( sflight[ carrid = 'AA'
connid = '0017'
fldate = '20171219' ] OPTIONAL ).
Without optional and no row is found, the exception cx_sy_itab_line_not_found is thrown.
Get field of single row
"sflight is an internal table of table sflight
DATA(single_row_field) = VALUE #( sflight[ carrid = 'AA'
connid = '0017'
fldate = '20171219' ]-price OPTIONAL ).
Without optional and no row is not found, the exception cx_sy_itab_line_not_found is thrown.
Append row to table
APPEND VALUE #( price = 123 ) TO lt_sflight.
lt_sflight = VALUE #( BASE lt_sflight ( price = 123 ) ).
Construct an internal table
flights_carrid_aa = VALUE #( FOR <flight> IN flights WHERE (carrid = 'AA' )
( price = <flight>-price ) ).