What is the most common words you hear from your seniors when you go with your doubts regarding any new requirment in standard SAP functionality.
“Hamm….You need to do enhancement!!!!!!! ”.
Sounds simple right?? But it is as complex as kissing your own chicks.
We have many options for it : BTE (business transaction events) , Field exit, customer exit , user exit , BADI ,New enhancement frame work to achieve such functionality.
It is mostly used to put validation checks on input field.
Suppose you want to put the validation on company’s international location number. You might want to set up your R/3 System so that all international location numbers are larger than 100. The field exit concept lets you create a special function module that contains thevalidation logic.
You assign this special function module to the data element BBBNR(data element for the international location number). You then assign this module to the programs and screens in which users can add new international location numbers. When you activate your field exit, the system automatically triggers your special routine whenever a user enters a company location number.
Read out this article “How to create a Field EXIT”.
Note: you can’t use call screen or any popup in field exit function module so you need to satisfy with very limited options like error message.
Meet our two heroes SMOD and CMOD for customer EXIT.
In simple word SMOD transaction code is used to check what EXITs are available in a particular package.
And CMOD transaction code is used to implement these EXITs.
Exits are provided in components. To use these components you need to create a new project in CMOD transaction.
There are three types of Customer EXITs.
- Function module EXIT
- Screen EXIT
- Menu EXIT
How to find the Enhancement:
Go to SMOD. Press F4 in the Enhancement field. In the next popup window, click pushbutton ‘SAP Applications’. A list will appear that contains information on all the enhancements, categorized under functional areas. Developer must search for the enhancements relevant to his functional area of interest – for e.g., Purchasing, Asset Accounting, etc.
Note down the enhancements. Then, come to the initial screen of SMOD and view the documentation of each enhancement to find out which one is required for your development.
As an example take BATCHCHK and open it in SMOD transaction .you can see that it can be used for the Batch validation.
Function EXIT :
Function module exits add functions to R/3 applications. Function module exits play a role in both menu and screen exits. When you add a new menu item to a standard pull down menu, you use a function module exit to define the actions that should take place once your menu is activated. Function module exits also control the data flow between standard programs and screen exit fields.
SAP application developers create function module exits by writing calls to customer functions into the source code of standard R/3 programs. These calls have the following syntax: CALL CUSTOMER-FUNCTION ‘001’.
When it comes to the standard screen modification you can use screen EXIT.
Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special sub screen areas on a standard R/3 screen and calling a customer sub screen from the standard screen’s flow logic. Read out this article to know how to work with screen EXIT.
Menu exits add items to the pull down menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications.
Read out this article to know How to work with Menu EXIT.
User Exit :
If you search into google you will end up with thousands definition of user exit. Even according to the name everything which is used to enhance the SAP standard is user EXIT!!!!!!.
After reading so many articles i ended up with the following definition:
User Exits allow us to add our own functionality to SAP standard program without modifying it. These are implemented in the form of subroutines and hence are also known as FORM EXITs. The user exits are generally collected in includes and attached to the standard program by the SAP.
All User exits start with the word USEREXIT_…
The problem lies in finding the correct user exit and how to find it if one exists for the purpose. Once the correct user exit is found the necessary customer code is inserted in the customer include starting with the z.. in the form routine.
Certain application like SD still provide this form of enhancement using user exit but this practice is no longer being followed for newer extensions instead they are using EXITs which come bundled in enhancement packages . Nevertheless existing USEREXITS will be supported by SAP an all the newer versions of SAP.
HOW TO FIND USEREXITS
User exits can be found in number of ways:
To find user exits in SD module , goto object navigator(SE80) and select development class from the list and enter VMOD in it. All of the user exits in SD are contained in the development class VMOD. Press
enter and you will find all the includes which contain user exits in SD for different functions like PRICING, ORDER PROCESSING etc. Select the user exit according to the requirement and read the comment inserted in it and start coding.
Read this article to know How to work with USER EXIT.
Bussiness Add ins : (BADI):
Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the Standard logic to accommodate user requirements .Since specific industries often require special functions that can be achieved via BADI so it called Business Addins.
(i hope the definition didn’t went over your head like Brett lee’s Bouncer !!!!!!! ).
In order to enhance a program, a Business Add-In must first be defined. Application developers create an interface for the add-in. Enhancement management takes this interface and generates an adapter class for implementing it, thus opening a path for implementations created by partners or customers. AS a developer you need to create an instance of the adapter class in the application program and calls the corresponding method at the appropriate time.
Customers can find the enhancements present in their system in the IMG and in the component hierarchy. Whenever they want to use a Business Add-In, they must create their own implementation of the add-in. Customers must first implement methods and user interface enhancements, and then activate their implementations of the enhancement. The enhancement’s active components are then called at runtime.
Normally, a Business Add-In contains an interface and other additional components such as function codes for menu enhancements. In some cases, Business Add-Ins also includes enhancements for screens. The enhancement, interface, and associated classes generated all lie in the appropriate application development namespace. Business Add-In implementations lie in the respective namespaces of the people who created them.
How to search a Classic badi.
As per the above diagram Adapter class calls the appropriate BADI implementation which you have created. To get the instance of adapter class, CL_EXITHANDLER class’s static method GET_INSTANCE is used.
To find the Classic BADI put the break point into GET_INSTANCE method of class CL_EXITHANDLER. Check the value of EXIT_NAME variable while executing your current application (Suppose you want to find badi while creating batch so run Tcode MSC1N ).Collect all those exit_name. Go to SE18 and try to find the proper BADI which can help to solve ur problem.
Check out the article to know how to work with BADIs.
From ECC 6.0 we got New Enhancement frame work with Kernel BADI, Switch Frame work, Implicit and Explicit enhancement (enhancement POINT and Enhancement SECTION).
I think you had a heavy dose of learning already So let’s keep these advance topics for another post.