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.
b ) Create enhancement in CMOD and activate the components. (See below screens)
c) Go to SE18 and create a BADI definition.
d) Create an instance method (public) for the BADI with parameters (if needed).
e) Create implementation for the BSDI.
f) Here, see the method (public) created in definition is already assigned to your implementation (EXIT_SAPLFMR4_002).
g ) Apply the validation in the public method and business logic in private method. Call the private method in the public method after validation.
Now, next step is how to call the BADI from the customer exit.
a) Go to your customer exit program.
b) Create an instance of your BADI interface and call the public method (e.g. EXIT_SAPLFMR4_002).
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,