REPORT ztest_set.
DATA:
v_setname TYPE setheader-setname VALUE 'Z_DS_EXTZONE',
s_setheader TYPE setheader,
t_setleaf TYPE STANDARD TABLE OF setleaf.
FIELD-SYMBOLS:
<sl> TYPE setleaf.
RANGES: r_zexcd FOR t7cl13-zexcd.
CLEAR: s_setheader, r_zexcd. REFRESH: t_setleaf[], r_zexcd[].
SELECT SINGLE * FROM setheader INTO s_setheader
WHERE setname EQ v_setname.
IF sy-subrc EQ 0.
SELECT * FROM setleaf INTO TABLE t_setleaf
WHERE setclass EQ s_setheader-setclass
AND subclass EQ s_setheader-subclass
AND setname EQ s_setheader-setname.
IF sy-subrc EQ 0.
UNASSIGN: <sl>.
LOOP AT t_setleaf ASSIGNING <sl>.
r_zexcd-sign = <sl>-valsign.
r_zexcd-option = <sl>-valoption.
r_zexcd-low = <sl>-valfrom.
r_zexcd-high = <sl>-valto.
APPEND r_zexcd.
CLEAR r_zexcd.
ENDLOOP.
ENDIF.
ENDIF.
DATA:
v_setname TYPE setheader-setname VALUE 'Z_DS_EXTZONE',
s_setheader TYPE setheader,
t_setleaf TYPE STANDARD TABLE OF setleaf.
FIELD-SYMBOLS:
<sl> TYPE setleaf.
RANGES: r_zexcd FOR t7cl13-zexcd.
CLEAR: s_setheader, r_zexcd. REFRESH: t_setleaf[], r_zexcd[].
SELECT SINGLE * FROM setheader INTO s_setheader
WHERE setname EQ v_setname.
IF sy-subrc EQ 0.
SELECT * FROM setleaf INTO TABLE t_setleaf
WHERE setclass EQ s_setheader-setclass
AND subclass EQ s_setheader-subclass
AND setname EQ s_setheader-setname.
IF sy-subrc EQ 0.
UNASSIGN: <sl>.
LOOP AT t_setleaf ASSIGNING <sl>.
r_zexcd-sign = <sl>-valsign.
r_zexcd-option = <sl>-valoption.
r_zexcd-low = <sl>-valfrom.
r_zexcd-high = <sl>-valto.
APPEND r_zexcd.
CLEAR r_zexcd.
ENDLOOP.
ENDIF.
ENDIF.
No hay comentarios:
Publicar un comentario