I have the following SQL statement and was wondering if I could rewrite it using the VALUE operator to avoid the DATA statement at the beginning.
DATA(lv_initial) = VALUE /scwm/guid_hu( ).
SELECT * FROM /scwm/tu_dlv
WHERE lgnum = @lv_lgnum
AND top_hu = @lv_initial
INTO TABLE @DATA(lt).
I.e., I would like to have something like the following, which gives the error: "Field 'VALUE' unknown. [...]", unfortunately.
SELECT * FROM /scwm/tu_dlv
WHERE lgnum = @lv_lgnum
AND top_hu = @VALUE #( )
INTO TABLE @DATA(lt).
Is this possible? I want to get rid of the DATA statement because it can lead to bugs easily if the variable is reused.
I searched on Google and in the ABAP key word documentation, specifically for "SELECT", "VALUE, Operator" and "DATA, Operator", but to no avail.
Any suggestions are appreciated.
Kind regards, Stefan