1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
CLEAR lgort. SELECT * FROM ztwms_lgort_def INTO TABLE @DATA(t_ztwms_lgort_def) WHERE werks IN ('', @werks ) AND type_lgort = @type_lgort ORDER BY werks DESCENDING. CHECK sy-subrc = 0. lgort = t_ztwms_lgort_def[ 1 ]-lgort. SELECT SINGLE 1 AS n FROM t001l INTO @DATA(n) WHERE werks = @werks AND lgort = @lgort. IF sy-subrc <> 0. CLEAR lgort. ENDIF. |