Beruflich Dokumente
Kultur Dokumente
User Exits
User Exits |
Dec-2008
Objectives
The participants will be able to:
Discuss the procedure of modifying SAP Standard program through procedure SSCR
(SAP Software Change Registration).
Locate, code and implement Function exits.
Differentiate between CALL FUNCTION and CALL CUSTOMER-FUNCTION
statements.
Identify Projects and Enhancements and use the transactions CMOD and SMOD.
User Exits |
Dec-2008
Overview
It mandatory for users to register all manual changes to SAP source coding and
SAP Dictionary objects through a procedure called SSCR.
User Exits |
Dec-2008
SAP Modification
After you enter the appropriate access key, you will be able to modify a SAP
standard object. You should avoid making repairs to SAP objects/code.
User Exits |
Dec-2008
User Exits |
Dec-2008
User Exits |
Dec-2008
User Exits |
Dec-2008
APPLICATION:
Program exits ( Function Exits, BAdis, Business
Transaction Events, Substitution Exits )
DATABASE
Append Structure
User Exits |
Dec-2008
User Exits |
Dec-2008
Function-Exits
SAP Original Code
SAPMF02K
call customer-function
001...
Function Module
function
exit_sapmf02k_001.
include zxf05u01.
endfunction.
INCLUDE Program
*---------------------------------*
* include zxf05u01.
*
*---------------------------------*
This INCLUDE
program is where you
will write the
This
INCLUDE program
customer-specific
will
not be overwritten
code.
with an SAP upgrade
because it is not SAP
original code.
10
User Exits |
Dec-2008
11
User Exits |
Dec-2008
12
User Exits |
UPDATE LOG
Vendor #
Vendor name
Dec-2008
1. Locate Function-Exit(s)
2. Go to Function Module
3. Create INCLUDE Program
4. Code in INCLUDE Program
5. Activate Function-Exit
13
User Exits |
Dec-2008
Locate Function-Exit(s)
14
User Exits |
Dec-2008
Locate Function-Exit(s)
15
User Exits |
Dec-2008
Locate Function-Exit(s)
Double-click anywhere on
the call customer-function
001 statement to go to that
line in the SAP program.
16
User Exits |
Dec-2008
Go to Function Module
17
User Exits |
Dec-2008
18
User Exits |
Dec-2008
if sy-uname = SANGRAMC.
endif.
19
User Exits |
Dec-2008
Activating Function-Exit
You do not actually activate a single function-exit; instead, you activate a
PROJECT that will include your user-exit(s).
PROJECT 1
(can be activated/deactivated)
Enhancement
1
Functio
n
Exit
20
Screen
Exit
User Exits |
Enhancement
2
Functio
n
Exit
PROJECT 2
(can be activated/deactivated)
X
X
Enhancement
3
Functio
n
Exit
Dec-2008
User-Exit Transactions
CMOD : This transaction allows you to create a PROJECT by identifying its
ENHANCEMENT(S). After determining all of the ENHANCEMENTS that are part
of the PROJECT, you will have to activate the PROJECT. You will still need to code
your user-exit; therefore, you may want to wait until this step is completed before
activating the PROJECT.
SMOD : This transaction allows you to create an ENHANCEMENT, which you will
include in a PROJECT, by identifying its COMPONENT(S). In the case where SAP
has already created an ENHANCEMENT for its pre-defined user-exits, you will not
need to use transaction SMOD; instead, you should just use transaction CMOD.
21
User Exits |
Dec-2008
Transaction CMOD
22
User Exits |
Dec-2008
Transaction CMOD
23
User Exits |
Dec-2008
Transaction CMOD
24
User Exits |
Dec-2008
Transaction CMOD
25
User Exits |
Dec-2008
Transaction SMOD
26
User Exits |
Dec-2008
Transaction SMOD
27
User Exits |
Dec-2008
Additional Information
You can use table MODACT to find the Project an Enhancement is included in.
You can use table MODSAP to find the Enhancement for a Function Exit.
28
User Exits |
Dec-2008
Summary
You should avoid making modifications/repairs to SAP objects/code whenever
possible.
It mandatory for users to register all manual changes to SAP source coding and
SAP Dictionary objects through a procedure called SSCR.
To obtain the access key for changing a SAP Standard object, either run
transaction OSS1 or go to the site www.service.sap.com.
The concept of a function-exit involves various points in original SAP programs
that have calls to specific function modules.
CALL CUSTOMER-FUNCTION statement will only execute a function module if
the function module is activated.
CMOD : This transaction allows you to create a PROJECT by identifying its
ENHANCEMENT(S).
SMOD : This transaction allows you to create an ENHANCEMENT, which you will
include in a PROJECT, by identifying its COMPONENT(S).
29
User Exits |
Dec-2008
Questions
How do you obtain access key for changing a SAP standard object ?
What are the steps for coding a Function Exits ?
What does CMOD and SMOD do ?
30
User Exits |
Dec-2008