DATA variant TYPE vim_vari.
DATA lt_rtab TYPE TABLE OF vimsellist.
DATA ls_rtab TYPE vimsellist.
DATA lt_fu_to_excl TYPE TABLE OF vimexclfun.
*
DATA lr_ydegr TYPE LINE OF r_ydegr.
*
ls_rtab-viewfield = 'BUKRS'.
ls_rtab-operator = 'EQ'.
ls_rtab-value = g_bukrs.
APPEND ls_rtab TO lt_rtab.
*
ls_rtab-viewfield = 'GJAHR'.
ls_rtab-operator = 'EQ'.
ls_rtab-value = g_gjahr.
APPEND ls_rtab TO lt_rtab.
*" from, from ~ to, ~
LOOP AT gr_ydegr INTO lr_ydegr.
CASE lr_ydegr-option.
WHEN 'BT'.
ls_rtab-viewfield = 'YDEGR'.
ls_rtab-operator = 'GE'.
ls_rtab-value = LR_YDEGR-LOW.
ls_rtab-AND_OR = 'AND'.
APPEND ls_rtab TO lt_rtab.
ls_rtab-viewfield = 'YDEGR'.
ls_rtab-operator = 'LE'.
ls_rtab-value = LR_YDEGR-HIGH.
APPEND ls_rtab TO lt_rtab.
WHEN 'EQ'.
ls_rtab-viewfield = 'YDEGR'.
ls_rtab-operator = 'EQ'.
ls_rtab-value = LR_YDEGR-LOW.
APPEND ls_rtab TO lt_rtab.
WHEN OTHERS.
ENDCASE.
ENDLOOP.
ins_br_blank( ).
ins_entry_by_change_degree( ).
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = 'S'
show_selection_popup = ''
view_name = 'ZVCO0430'
variant_for_selection = variant
check_ddic_mainflag = 'X'
TABLES
dba_sellist = lt_rtab[]
excl_cua_funct = lt_fu_to_excl[]
EXCEPTIONS
foreign_lock = 2
no_tvdir_entry = 8.