on 05-11-2012 1:10 PM
Hi Experts,
Could you please tell me how to explicitly trigger or call DOC_CHECK_BADI?
Also is it a right way to explicitly call the check badi?
Regards,
Rohini
Hi,
even if you are in SRM 7.0, Kernel-BAdI are not available for BBP_DOC_CHECK_BADI.
So, you can follow below code to call BAdI instance:
CLASS cl_exithandler DEFINITION LOAD.
STATICS: sv_badi1 TYPE REF TO if_ex_bbp_doc_check_badi,
sv_st_badi_active,
st_badi_checked.
IF st_badi_checked IS INITIAL.
* Check if BADI has an active implementation
CALL FUNCTION 'SXC_EXIT_CHECK_ACTIVE'
EXPORTING
exit_name = 'BBP_DOC_CHECK_BADI'
EXCEPTIONS
not_active = 1
OTHERS = 2.
IF sy-subrc EQ 0.
* Initialize BADI BBP_DOC_CHECK_BADI
CALL METHOD cl_exithandler=>get_instance
EXPORTING
exit_name = 'BBP_DOC_CHECK_BADI'
null_instance_accepted = 'X'
CHANGING
instance = sv_badi1.
sv_st_badi_active = gc_on.
ELSE.
sv_st_badi_active = gc_off.
ENDIF.
st_badi_checked = gc_on.
ENDIF.
IF sv_st_badi_active = gc_on.
CALL METHOD sv_badi1->bbp_doc_check
EXPORTING
flt_val = 'BUS2121'
iv_doc_guid = iv_hdr_guid
iv_mode = iv_method
iv_park = iv_park
iv_save = iv_save
iv_cv_updated_active_doc = space
IMPORTING
et_messages = lt_messages.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Rohini,
what is your SRM release ?
Regards.
Laurent.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.