We will check various methods to find customer exit with example in standard SAP. Let’s first get the basics about customer exit. In the end, we will check one example of customer exit in VA02 Transaction.
Details of Customer exit: It is a type of enhancement that will enable us to enhance the functionality of Programs, screens & menus. Hence there are three types of enhancement under the hood of customer exit that are
- Function Exit : It is in the form of Function module,which will enhance the standard functionality of a program.
- Screen Exit: It is used to enhance the standard screen
- Menu Exit : It is used to enhance the menu option
Customer exits are of function modules with naming conventions like EXIT_<Program_name>_<number> for example customer exit in sales order in SD module EXIT_SAPMV45A_004
Customer exits are being called inside the standard program using the following statement CALL CUSTOMER-FUNCTION ‘<NUMBER>’ e.g. CALL CUSTOMER-FUNCTION ‘004’
Methods to Find out customer exit in the standard program:
- Find out the program name and do global search keyword ‘CALL CUSTOMER’ in the program like below in SAPMV45A (Sales Order Program)

- Set break point at statement ‘CALL CUSTOMER’ during execution standard tcode.Suppose VA02 is the Tcode in which we need to find out the customer exit. while executing the tcode VA02, put /h to initiate debugging and set the break point at statement (menu breakpoint -> breakpoint at -> statement ) or shift + F5

- Use the transaction SMOD : Do F4 in the ehancment and provide the details to find out the enahcement

- Check the table MODSAP to find out the enhacement name

If non of the way worked for you then google it out 😉 to get the enhancement
Let’s check out one example:
Requirement: Make the customer reference field (VBKD-BSTKD) non-editable in the VA02 Screen if the order type is OR1

So from the above method, we found out that the EXIT_SAPMV45_004 is suitable for this based on the importing and changing parameters

IF i_screen_name EQ 'VBKD-BSTKD' AND sy-tcode EQ 'VA02'.
"Read the order type VBAK-AUART from ABAP stack
DATA:lv_string TYPE string VALUE '(SAPMV45A)VBAK-AUART'.
FIELD-SYMBOLS:<lv_auart> TYPE any.
ASSIGN (lv_string) TO <lv_auart>.
IF <lv_auart> IS ASSIGNED AND <lv_auart> EQ 'OR1'.
c_screen_input = 0. "make the field non editable
ENDIF.
ENDIF.
After implementing the above code in the include. Result is below

Well, customer exit is the successor of user exit. It has an additional feature called switch framework, which can be used to on-off the enhancement. To add such a feature you need to follow the below steps
- Create a Project in CMOD Transaction

- Assign the enhancement to the project


- Activate the component


Now you can play with the switch framework by activating and deactivating the project. Check out the difference

Note: Once the enhancement is assigned to a project, it can not be re-assigned to another. To check the project name and enhancement attached to it use the table MODACT

Check out our OData series OData – ABAP Skill
Check out our CDS View Series CDS – ABAP Skill
Check out ABAP Blogs ABAP – ABAP Skill
SAP Document: Link
1 Comment
How to implement BTE with example in SAP ABAP - ABAP Skill · August 22, 2021 at 4:39 pm
[…] customer exit (detail can be found in the link ) it has also the feature of switch on-off functionality. The BTE can be disabled by deactivating […]