Kernel BAdI with Multiple use (Multiple Implementation) without Filter


 Enhancement Spot: In case of Kernel BADI, the Enhancement spot just acts like a container where the Kernel BADI definitions are stored.

Enhancement Implementation:  In case of Kernel BADI, the Enhancement Implementation just act like a container where the kernel BADI implementations are stored.

We can define multiple BADI definitions under a single Enhancement Spot and also we can define multiple BADI implementations under a single Enhancement implementation.

Scenario: Creating a Enhancement Spot and then creating a Kernel BADI definition with multiple Use.

Creating a report program to call this BADI.

Step1. Go to TCODE-SE20.

Step2. Select the Enhancement Spot Radio button, provide a spot name and click on the Create button.

Step3. Provide the short text, Select the Technology as Badi definition and click on the continue button.

Step4. Click on the Activate button to activate the Enhancement Spot.

Step5. Creating a BADI Definition inside Enhancement Spot. Click on  the Create Button(F5) as highlighted.

 Step6. Provide a BADI definition Name and the short text and at last click on the continue button.

Step7. Now select the Multiple Use option for multiple implementation. Now Double click on the Interface

to define an interface for the BADI definition.

Step8. Provide a Interface name in the right hand side section.

Step9. Provide a Interface name and double click on it to define. From the POPUP screen press YES to continue.

Step10. It navigates to SE24. Now in the METHODS section provide a method name , level and description and at last activate the same. Click on the BACK button.

  Step11. Now the created method appears in Below the Interface of the BADI definition.

Step12. Now up to this point the BADI definition is created with interface details.

  Step13. Creating a BADI Implementation. Expand the BADI definition and Select the Implementation and click on the Create BADI Implementation Icon.

Step14. A popup screen appears to create a Enhance Implementation before creating a BADI Implementation. Provide the Enhancement Implementation name and short text and at last click on the continue button.

 Step15. One more pop up screen appears for BADI Implementation. Provide the BADI implementation Name, Description and the Implementing class name and at last click on the continue button.

Step16. Under the BADI Implementation, double click on the implementing Class.

 Step17. This implementing class implements the interface defined in the BADI definition. Now Double click on the method name to implement it.

 Step18. Press YES to continue.

Step19. Provide some statement in the method. Activate it and at last click on the BACK button.

Step20. Activate the Enhancement implementation and click on the BACK button.

  Step21. Now inside the Enhancement spot, under the BADI definition, one implementation appears(right hand side).

 Step22. Go to TCODE-SE38 . Create a report program as shown below. Activate it and run it.

 Step23. The  Output is shown as below. It calls the implementation method.

 Step24.  As this is a multiple use BADI. Create another implementation of it.

 Step25. Under the BADI definition, select the Implementation and click on the highlighted icon to create a new implementation of it.

Step26. Selest the Previously created Enhancement implementation and click on the continue button.

Step27. In the popup screen, provide a BADI implementation name, description and the implementing class name. at last click on the continue button.

Step28. Now double click on the Implementing class .

 Step29. The implementing class implements the interface of the BADI definition. Now double click on the method to implement it.

 Step30. Proceed with YES.

 Step31. Provide some statement. Activate it and click on the back button.

Step32. Now activate it.

 Step33. Run the same above created report in SE38.

 Step34. The out put is shown below. It calls all the active implementations of the BADI as it is a multiple use.


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s