cancel
Showing results for 
Search instead for 
Did you mean: 

BBP_DOC_CHECK_BADI

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

laurent_burtaire
Active Contributor
0 Kudos

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.

laurent_burtaire
Active Contributor
0 Kudos

Hello Rohini,

what is your SRM release ?

Regards.

Laurent.

Former Member
0 Kudos

Hi Laurent,

The Release which we are using is SRM 7.1