HI
Can you please tell me when act_imp_existing is set during cl_exithandler->get_instance method call. We are on 46C.
I have debugged and also checked the code of get_instance. act_imp_existing is not set at all. Now I have seen that wherever in SAP standard code BADI method is invoked based on whether act_imp_existing is not initial BADI is not called at all. Is it by design or I have not implemented BADI properly.
Consider this case.
1) MB_DOCUMENT_BADI (called from mb_post_document)
SAP code is
call method cl_exithandler=>get_instance
changing instance = mb_document_badi.
call method mb_document_badi->mb_document_update
exporting
xmkpf = zmkpf[]
xmseg = zmseg[]
xvm07m = zvm07m[].
Here since act_imp_existing is not being used call goes thru whereas
in
2) BADI me_define_caltype (called from me21n, me22n). SAP code is
if static_calctype_instance is initial.
call method cl_exithandler=>get_instance
importing
act_imp_existing = static_calctype_active
changing
instance = static_calctype_instance.
endif.
if not static_calctype_active is initial.
call method static_calctype_instance->define_calctype
exporting
im_x_nekko = p_im_nekko
im_x_oekko = p_im_oekko
im_x_nekpo = p_im_nekpo
im_x_oekpo = p_im_oekpo
im_x_nbekpo = p_im_nbekpo
im_x_obekpo = p_im_obekpo
changing
ch_x_lf_calctype = p_lf_calctype.
endif.
Here since static_calctype_active is not set badi won't be invoked. Please tell me how to invoke define_calctype which I need to manually do repricing during me21n/me22n.
Regards
Saurav Choudhury