Skip to Content
avatar image
Former Member

Multiple use BADI benefit

Hi GURUs,

Can you please tell me a scenario where multiple active implementation of a BADI is absolutely necessary? For example, we have a BADI ME_PURCHDOC_POSTED which is multiple-use. But why do we need this as multi-use, is there any functionality that we would have missed if it was a single implementation BADI?

Thanks,

Sariful

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Oct 23, 2015 at 10:38 AM

    Off course we will miss. The advantage of multiple implementation is that you can deactivate any implementation you want without affecting others and it is very easy. If you go for a single implementation in order to deactivate your change you have make a change in your code which includes the cost of testing along with it and usually take more time.

    Also for filter dependent BADIs you can call different implementation based of different condition. This is another advantage.

    R

    Add comment
    10|10000 characters needed characters exceeded

    • In addition.

      Do you put all your code into a single method or subroutine? Of course not. If you have two separate pieces of functionality, not particularly connected to each other, you put them into separate methods or subroutines. In the same way you put logically independent functionality using the same BADI into separate BADI implementations.


      Secondly, multiple use BADIs often have provision for filtering. This means that one implementation can apply to one specific entity, and another to a different one without having to code an "IF entity1 ... ELSEIF entity2...". It also allows entity3 to use entity1's coding without additional programming.