*I_STEP = 1 Call takes place directly before variable entry
*I_STEP = 2 Call takes place directly after variable entry. This step is only started up when the same
*variable is not input ready and could not be filled at I_STEP=1.
*I_STEP = 3 In this call, you can check the values of the variables. Triggering an exception (RAISE)
*causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called again.
*I_STEP = 0 The enhancement is not called from the variable screen. The call can come from
*the authorization check or from the Monitor.
DATA: l_d_fmname(30) TYPE c.
CASE i_step.
WHEN 0.
CONCATENATE 'Z_VAR0_' i_vnam INTO l_d_fmname.
WHEN 1.
CONCATENATE 'Z_VAR1_' i_vnam INTO l_d_fmname.
WHEN 2.
CONCATENATE 'Z_VAR2_' i_vnam INTO l_d_fmname.
WHEN 3.
l_d_fmname = 'Z_VAR3'.
ENDCASE.
TRY.
CALL FUNCTION l_d_fmname
EXPORTING
i_vnam = i_vnam
i_vartyp = i_vartyp
i_iobjnm = i_iobjnm
i_s_cob_pro = i_s_cob_pro
i_s_rkb1d = i_s_rkb1d
i_periv = i_periv
i_t_var_range = i_t_var_range
i_step = i_step
IMPORTING
e_t_range = e_t_range
e_meeht = e_meeht
e_mefac = e_mefac
e_waers = e_waers
e_whfac = e_whfac
CHANGING
c_s_customer = c_s_customer
EXCEPTIONS
OTHERS = 1.
CATCH cx_sy_dyn_call_illegal_func.
ENDTRY.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgid
NUMBER sy-msgno
WITH
sy-msgv1 sy-msgv2
sy-msgv3 sy-msgv4
RAISING ERROR_IN_VARIABLE.
ENDIF.
No hay comentarios:
Publicar un comentario