Skip to Content
avatar image
Former Member

Create a filter BUKRS in the BADI definition

Hello Experts,

Iu2019ve a requirement and according to it I need to Create a filter BUKRS in the BADI definition which makes the BADI call acceptable only when Company Code is XXXX and XXXX.

Can somebody tell me which BADI I should use?

Thanks,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 05, 2008 at 05:05 AM

    Hello

    What is the purpose of using BADI...??? For which area you are looking it ??

    Thanks

    Amol Lohade

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 05, 2008 at 05:34 AM

    Hello

    Either your BAdI is already filter-dependent or you have to use a little trick to achieve filtering without this BAdI property.

    " Create a macros within the implementing class which does the validation of the company code, e.g.:
    
    DEFINE mac_validate_companycode.
      CHECK ( &1 = 'XXXX'  or
              &1 = 'YYYY' ).
    END-OF-DEFINITION.
    

    Within each BAdI method the first statement is to call this macro:

    METHOD if_ex...~name_of_method.
    
      mac_validate_companycode.
    
    " Put in your coding here...
    ENDMETHOD.
    

    Regards

    Uwe

    Add comment
    10|10000 characters needed characters exceeded