Quantcast
Channel: ABAP Development
Viewing all articles
Browse latest Browse all 948

How to Implement Function Module Exits using BADI

$
0
0

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.


      1.png

 

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

 

     2.png

       3.png

 

         4.png

 

c)   Go to SE18 and create a BADI definition.

       5.png

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

        

       6.png

          7.png

 

e)  Create implementation for the BSDI.

 

                8.png

 

                    

                     9.png

 

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

 

               10.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.

         

               11.png

 

                 12.png


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

                         

                       

a)  Go to your customer exit program.

                      

                     13.png

 

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

      

                     14.png

                       15.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


Viewing all articles
Browse latest Browse all 948

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>