Documente Academic
Documente Profesional
Documente Cultură
Scenario: Creation of Classic BADI definition with single use and creation of BADI
implementation and calling the BADI implementation from program.
The current SAP system release is 605.
Step2. Select radio button BADI Name and provide a BADI definition name and click on
Create button.
It gives a error message as 'Create operation is only possible for enhancement spots'.
As SAP provided a new concept of BADI as Kernal BADI, the classical BADI is restricted
but
still there is a way to go ahead in the system to create it.
Step3. Provide the BADI name and go to the menu Utilities and Click on Create Classic
BADI .
Step4. Provide a short description. In the properties section, the system automatically
generates a BADI Class based on the BADI name. In the TYPE section, as the multiple use
option is not selected, it means
that it is a single use BADI.
Step5. Click on the Interface tab. The system also generate a Interface with no method
based on the BADI name.Now double click on the interface name
'ZIF_EX_BADI_DEFN_DEMO1'.
Step6. It navigates to SE24 transaction. Now in the 'METHODS' tab, provide a method
name as 'DISPLAY_MESSAGE', select the level and provide the description and activate
the interface. At last Click on the BACK button.
Step7. Now the method is added to the interface. Up to this point the BADI definition is
created with interface containing an empty method.
Step9. Provide a implementation short text and click on the Interface Tab.
Step10. For this implementation the system automatically creates a Implementing Class
which implements the method 'DISPLAY_MESSAGE' of the interface associated with BADI
definition.Now double click on the method 'DISPLAY_MESSAGE' to implement the method.
Step11. Provide some statement here and then click on the activate button and at last click
on the back button.Now up to this point we crated a BADI implementation successfully.
Step12. Calling the BADI implementation form the program . Go to TCODE - SE38 and
create a report program.
Step13. Create a reference variable referring to the Interface name associated with the
BADI definition.
Then call the static method GET_INSTANCE of the class CL_EXITHANDLER. Pass the
BADI definition name and it ll return the object of the active implementing class to the
reference variable. Activate the program and run it.
_________________________________________________________________________
______
Step15. Further scenarios. As the badi is a single use BADI let's create another
implementation of it.
Go to TCODE- SE19 and in the Create Implementation Section provide the BADI definition
name and click on the Create Impl. Button. In the popup screen provide the Implementation
name and click on teh continue button.
Step16. Provide a implementation short text and then click on the interface button.
Step17. Now for this implementation a new implementing class is generated and the
interface associated with the BADI definition is implemented in this class. Now double click
on the method 'DISPLAY_MESSAGE'
to implement it.
Step18. Provide some statement and activate the same . At last click on the back button.
Step21. Now for this the sy-subrc = 5 [Single_exit_multiple_active]. As our BADI definition is
not a multiple use badi (single uses badi) and we have multiple implementations of it.
XXXXXXXXXXXXXXXXXXXXXXXXX
Posted 20th October 2013 by S Prasad
View comments
TECHSAP
Home
Topic Tutorials
FPM Tutorials
6.Smartfrom: How to call a Smartform progrmatically that works in development, quality & production?
Part4 : FPM OVP Application -Integrating Search UIBB and List UIBB: Displaying POPUP Screen
Part3 : FPM OVP Application -Integrating Search UIBB and List UIBB: Message Display
Part2 : FPM Integrating Search UIBB and List UIBB into FPM OVP Application : Link to action
Part1 : FPM Integrating Search UIBB and List UIBB into FPM OVP Application
qRFC with Outbound Queue & Inbound Queue between two different SAP systems - One LUW per mixed part of the
Queues
qRFC with Outbound Queue & Inbound Queue between two different SAP systems - One LUW per Queue Call
qRFC with Outbound Queue & Inbound Queue between two different SAP systems - One LUW for Multiple QUEUE Calls
ENDIF.
-------------------------------------------------------------------------------------------------------------Step1. cl_gui_frontend_services=>execute method can be used to call any URL. It can
be used to call any webdynpro/fpm application from the program as every
webdynpro/fpm application have an uniuqe URL.
Step3. Still we can open any document by specifying the appropriate executable file,
location of the directory of the file and providing the file name.
Step4. Here is one example how we can open a PDF file by the method
cl_gui_frontend_services=>execute.
View comments
Loading