Skip to Content

How to Implement Function Module Exits using BADI

Hi Developers ,

Consider a scenario in which you are going to create BADI definition as well for a customer exit.

Here are the steps:

a ) Find out the correct customer exit for your requirement from the functional team.


      /wp-content/uploads/2013/09/1_281728.png

b ) Create enhancement in CMOD and activate the components. (See below screens)

     /wp-content/uploads/2013/09/2_281867.png

       /wp-content/uploads/2013/09/3_281868.png

         /wp-content/uploads/2013/09/4_281869.png

c)   Go to SE18 and create a BADI definition.

       /wp-content/uploads/2013/09/5_281870.png

d)  Create an instance method (public) for the BADI with parameters (if needed).

        

       /wp-content/uploads/2013/09/6_281871.png

          /wp-content/uploads/2013/09/7_281872.png

e)  Create implementation for the BSDI.

                /wp-content/uploads/2013/09/8_281873.png

                    

                     /wp-content/uploads/2013/09/9_281874.png

f)     Here, see the method (public) created in definition is already assigned to your implementation (EXIT_SAPLFMR4_002).

               /wp-content/uploads/2013/09/10_281875.png

               

g )  Apply the validation in the public method and business logic in private method. Call the private method in the public method after validation.

         

               /wp-content/uploads/2013/09/11_281876.png

                 /wp-content/uploads/2013/09/12_281877.png


Now, next step is how to call the BADI from the customer exit.

                         

                       

a)  Go to your customer exit program.

                      

                     /wp-content/uploads/2013/09/13_281878.png

b)  Create an instance of your BADI interface and call the public method (e.g. EXIT_SAPLFMR4_002).

      

                     /wp-content/uploads/2013/09/14_281879.png

                       /wp-content/uploads/2013/09/15_281880.png

c) The BADI (ZBADI_ZXFMCU08) is multiple uses BADI. In future if there requirements for the same customer exit, create a new implementation and a private method to apply logic in the BADI.


Hope this blog will prove helpful ,Pls feel free to reach out for anything ! 😉

Thanks and Regards,

Praveen Srivastava

17 Comments
You must be Logged on to comment or reply to a post.