Skip to Content

VALUE Operator in SQL Statement

Hi,

I have the following SQL statement and was wondering if it is possible to rewrite it using the VALUE operator to avoid the DATA statement.

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:

SELECT * FROM /scwm/tu_dlv
      WHERE lgnum     = @lv_lgnum
        AND top_hu    = @VALUE #( )
      INTO TABLE @DATA(lt).

Is this possible? Any suggestions?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 22, 2017 at 01:03 PM

    On 7.50 this should work:

    SELECT * FROM /scwm/tu_dlv
      WHERE lgnum  = @lv_lgnum
        AND top_hu = @( VALUE #( ) )
      INTO TABLE @DATA(lt).
    Add comment
    10|10000 characters needed characters exceeded