![]() Introduction Customer exits (aka user exits) are possibilites offered by SAP at strategic moments to call customer ABAP code so that to enhance the standard. Hence, customer exits acts as 'Hook' points for the custom business functionality. These exits are function modules called by SAP, with fixed input and output parameters, and only containing an INCLUDE ZX. SAP uses an User Exit (SMOD/CMOD) in order to make an enhancement of customers a lot more convenient. There are very many user exits available within SAP. ABAP statement, that the client may create. The exit belongs to exactly one Enhancement (an 8 characters code), that SAP creates using SMOD transaction. To add ABAP code, the client has to create a Project via CMOD transaction, link it to the Enhancement, create the ZX. Include where he puts ABAP code, and activate both the include and the project. Note: since NetWeaver 7.0, this concept is obsolete because replaced by the classic and new BAdIs, and SAP does not create any more customer exit. Moreover, SAP may have migrated some customer exits to classic BAdIs (an enhancement is migrated into a BAdI definition, and its customer exits are migrated into methods with the same names and signatures, i.e. List of parameters). • More documentation is provided in. • For more general documentation on Enhancements, go to • This shows screen captures of how to create a project 2. How SAP calls the exit The call to an exit is implemented by SAP as. CALL CUSTOMER-FUNCTION ' [EXPORTING ] [IMPORTING ] [CHANGING ] [TABLES ] [EXCEPTIONS ]. Which calls function module EXIT__ (where is the program which calls the customer function). Notes: • Sometimes, SAP uses directly CALL FUNCTION statement because the exit needs to be called from 2 different programs. • The difference between the 2 ABAP statements is that CALL CUSTOMER-FUNCTION does NOT call the function module if it is not linked to an active project (see below 'how to implement an exit'). Thus, a break-point in the function module will be ineffective. ![]() In this function module, SAP usually puts this code. CALL CUSTOMER-FUNCTION '003' exporting xvbak = vbak xvbuk = vbuk xkomk = tkomk importing lvf_subrc = lvf_subrc tables xvbfa = xvbfa xvbap = xvbap xvbup = xvbup. • It means that it will call the function module 'EXIT_SAPMV45A_003', which only contains this code: INCLUDE zxvvau05. • (as already said, this include is not initially delivered by SAP, but it may be created by the client) 3. How to implement an exit First of all, the client must check whether an existing customer exit fits his requirements. There are 2 main ways to do this: • Use transaction SPRO (SAP IMG reference guide) and look for activities named 'enhancement' or 'extension' and display its documentation. • OR get the main program which corresponds to the transaction (status option in system menu), so that you know the potential exit function module names (EXIT__*), then look at their documentation (SE37 transaction) or at the documentation of their corresponding enhancement (SMOD transaction). • You may get the enhancement and enhancement projects associated to the customer exit by using the extended options of the search help, or by using transaction SE84 - Repository Information System. Now, you may implement the exit this way: • Go to transaction CMOD • Create a project • Go to the Enhancement screen, and enter the Enhancement code which contains the user exit.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
April 2018
Categories |