Step by Step guide for BADI Multiple use implementation

...Previous

To call the method you can use the PATTERN option as shown below from the ABAP editor.

Do a CTRL + F6 to get the pattern button or click on the PATTERN button from the application tool bar. Select the ABAP OBJECT patterns radiobutton and click on the continue button.

On the next screen enter the class name and the method to be called as shown below

It does not matter whether you are calling the static method or the instance method.  Click on the continue button.

Make changes as required and pass the respective parameters. In the above case we changed the EXIT_NAME and the INSTANCE parameters.

Now call the method from the interface using the interface reference l_BADI_INSTANCE as shown below

Enter the parameters required and any additional code required for the report.

Run the report and you will get the output as shown below

Now lets go back and create a new IMPLEMENTATION in SE19 as we have enabled MULTIPLE USE in the BADI DEFINITION.

Go to SE19 and enter a new name and click on the create button

And when asked for the definition enter the same definition name.

And click on the continue button.

Enter a meaningful description and save and activate the second implementation. Next double click on the method you wish to implement and write the code.

 

As seen above in the second implementation we have hard coded the value for the email id instead of getting the value from the tables. Save and activate the method and then return to the main screen and activate the implantation again.

Now try to go to each of the implementation and place a breakpoint at the methods. So we first go to the implementation 1 and place a break point as shown below.

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image