Advertising:
Value (ABAP keyword): Difference between revisions
From SAP Knowledge Base
m (Unirab moved page Keyword value to Value (ABAP keyword)) |
|
(No difference)
|
Revision as of 16:42, 21 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 not 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 ) ).