User exit training


Published on

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

User exit training

  1. 1. User-exit Training
  2. 2. INTRODUCTIONCustomization and enhancement becomes needed when the customer has certain requirements that is not in place in SAP. Hence, SAP allows the customer to change the system accordingly and add functionality to the SAP system.SAP created customer exits for specific programs, screens and menus within standard R/3 applications.
  3. 3. • Why do we need to use Exits? – You should use them because they do not affect the SAP source code but will still allow you to change the functionality of SAP to suit your needs. SAP has provided us with some standard exits that we could modify by adding our own functionality to them. The code and screens you create are encapsulated as separate objects. When you create Exits, they are encapsulated as separate objects. – Since they do not affect the source code and are named as per SAP naming conventions, the do affect future software upgrades. Hence, you do not have to save them and then re-enter add-ons attached to exits.
  4. 4. How to find a User-exitThere are several ways to find a User-exit. Below are some steps:A. 1. Go to the SAP standard transaction where you want to place a customized exit. Then from the menu bar, click System>status, then double click the program name. Then Go to Attributes, then get the Package or Development Class. 2. Go to Tcode CMOD, then from the menu bar, click Utilities>SAP Enhancements. 3. Enter the Development class you copied from Step 1, then click Execute. There you will find the user-exit.B. 1. Search for CALL CUSTOMER-FUNCTION and/or CALL CUSTOMER-EXIT in the program source code.C. 1. Go to SE37, Input EXIT_<Program Name>_* then press F4.D. 1. Attached is a program source code to find the user-exits involved in a transaction code. Microsoft Word Document
  5. 5. TYPES OF EXITS1. Function Module Exits2. Menu Exits3. Screen Exits4. Field Exit
  6. 6. Function Module ExitsFunction Module Exits are the most common type of User Exits you will ever encounter in SAP. From its name, they are called via a Function Module, and the codes are written in an Include program. Let’s create a sample Project.First, go to tcode CMOD, enter a Project name then click Create.
  7. 7. Enter a meaningful description, then click Enhancement assignments.Enter the User-exit in the Field (assuming you’ve already found the exit) then click the Save button. Then click the Components button afterwards.
  8. 8. Double click on the Function Module Exit and it will lead you to its source code. You will now see the Include program. Double click it, and click Create. (If there’s a warning message, just hit ENTER)Add e_kunnr = ‘2155’ to the source code then save the Include, then activate the Project.
  9. 9. Sold-to-party is automatically ‘2155’.
  10. 10. MENU EXITSUsing the menu exits, you can add menu items to the menus of standard R/3 Applications.The Menu Exit entries have function codes that begin with + (plus sign).Example steps on how to create an Exit for an Area Menu.• Go to TCODE SE43.• Type S000 in Area Menu Field then click the Change button. Ignore all warnings and choose your login Language.• Go to SAP R/3>Office>Double click Customer Function
  11. 11. 4. As you can see, the transaction code assigned to this customer function is +C01. Now, you must create the transaction code +C01 and assign a program to it.5. To create Transactions, go to TCODE SE93. Put +C01 as Transaction Code, then assign a program. In my example, I assigned ZJAYSON as the program.
  12. 12. Customer Function now added to Area Menu S000. Tcode +C01 calls program ZJAYSON.For Menu Exits that involves menus of R/3 Applications in ECC6, it is now part of BADI Enhancements.
  13. 13. SCREEN EXITSScreen Exits defines special areas called Subscreens within a screen. Using screen exits you can add subscreens to the screens within R/3 Applications.To modify the exits, just follow the steps written in the Function Module Exit part of this presentation. We will use User-exit COOMKA01. You should be able to see the screen below. I named the project ZCOEXIT.Double Click on the screen Number 999
  14. 14. Input a meaningful description in the Attributes tab, and choose subscreen as screen type, then click the Layout button. Add one Label and one Text field in the screen. Click Activate afterwards.We will also need to Activate structure CI_CSKB. Double click it also, then add a custom field.
  15. 15. Save and activate the structure, then activate the Project. Run tcode KA03 and let’s see what happens.
  16. 16. Now we can see our fields in the Addnl Fields tab in KA03. To input code, we have to modify the PBO and PAI section of the subscreen.
  17. 17. FIELD EXITSField Exits are no longer created via CMOD in higher versions of SAP. This is covered in BADIs.But the main use of Field Exits is for customers to add customized code when the user interacts with a certain Field in SAP, like hitting Enter upon entry of data. This is useful for validation purposes.
  18. 18. Questions?User-exit Training
  19. 19. Thank youUser-exit Training