Professional Documents
Culture Documents
Top 10 Userexits in SD
Top 10 Userexits in SD
SD
A Userexit is a predefined place in the SAP standard code where
the user can write code to influence processing.
Code written in userexits is not overwritten during an upgrade.
A list of most userexits can be found in the IMG.
SD -> System Modification -> Userexits
This list grows with every new release.
Code written in userexits is not supported by SAP.
Release 3.0A APPEND STRUCTURES
HEADER
SAPMV45A 8309
This is an include dynpro in SAPMV45A 309
ITEM
SAPMV45A 8459
This is an include dynpro in SAPMV45A 459
Sales Installation Specific PBO Modules
MV45AOZZ
Sales Installation Specific PAI Modules
MV45AIZZ
MV45AFZB
Sales Order Serial Numbers
USEREXIT_MOVE_FIELD_TO_VBSN
Common Work Areas
KUAGV - Sold-to Party Information
KUWEV - Ship-to Party Information
KURGV - Payer Information
KUREV - Bill-to Party Information
MAAPV - Material Master View: Sales Org Data 1
MAEPV - Material Master View: Sales Org Data 2
Next slide ….
TKOMK_ZZABC=VBAK-ZZABC
USEREXIT_PRICING_PREPARE_TKOMP
TKOMP-ZZABC=VBAP-ZZABC
RV60AFZZ – Billing Document
USEREXIT_PRICING_PREPARE_TKOMK
USEREXIT_PRICING_PREPARE_TKOMP
Pricing Procedure Requirement
Access Sequence Requirement
Scale Base Formula
Condition Base Formula
Condition Value Formula
Pricing
Pricing procedure
procedure
1 5 4
Step
Step Condition
Condition type
type Name
Name Requirement
Requirement Calc.type
Calc.type Base
Base value
value
1 Price 2
10 XXX1 Gross value
15 Sales deal 2 14
16 XXX2 % discount 6 17
17 XXX3 Value discount 8 12
100 XXX4 Net value
Access
Access Access
Access Table
Table Requirement
Requirement
2
Sequence
Sequence
10 Sales Org / Customer / Material 14
20 Sales Org / Material
Condition
Condition XXX4 Scale
3
Type XXX4 Scale Base
Base Formula:
Formula: 15
15
Type
SAP AG 2001, Title of Presentation, Speaker Name 13
Number 5: Pricing Procedure Userexits
Account Material Listing / Scale Condition Condition
determination determination Exclusion base base base value
Output Structure of
Control group key
Requirements Formulas
Pricing Rounding
rule
Statistics
VOFM
Examples
Requirement ‘6’: Only perform the access if condition
exclusion is not active.
CHECK: KOMP-KZNEP NE ‘X’.
New Requirement: Discount is only relevant for items with
material group ‘ABC’.
CHECK: KOMP-MATKL EQ ‘ABC’.
Scale
Base
Condition
Base Formula
Formulas
Condition Value Formula
After the system has found the correct scale rate from the
condition record and the condition basis for the calculation, the
condition value is calculated.
Scale Rate Condition Basis Condition Value
5- USD per CS X 5 CS = 25- USD
10- % X 1500 USD = 150- USD
It is possible to influence the condition value calculated by the
system using the condition value formula. It is also possible to
use the formula to do comparisons and set flags.
Formulas
Condition Value Formula - Examples
Under certain circumstances, the condition value should be set to
zero.
IF XXX = YYY.
XKWERT = 0.
ENDIF.
Standard formulas “8” and “9” are used with customer expected
price to compare the expected value / price with the net value of
the sales order item. Based on the result, the “pricing ok” flag is
used to block the line item.
RV03VFZZ
Selection of secondary sourcing plant
USEREXIT_PLANT_SELECTION
RV03VFZZ
FORM USEREXIT_PLANT_SELECTION
SELECT SINGLE * FROM ZZSOURCE
WHERE ZIPCD EQ KUWEV-PSTLZ
AND LPRIO EQ KUWEV-VSBED.
(Mark SELKZ field in PLANTS internal table for the plant(s)
that should be checked or rearrange plants to show secondary,
tertiary, etc. selections).
MV45AFZZ
8b USEREXIT_SAVE_DOCUMENT
Release 4.0C allows the pricing rule to be specified in a
pop up window with “New Pricing”.
Refer to note 24832 for more examples.
MV45AFZB
USEREXIT_NEW_PRICING_VBAP (document item)
Example: New pricing if the “route” is changed.
IF VBAP-ROUTE NE *VBAP-ROUTE.
NEW_PRICING = 'B'.
ENDIF.
USEREXIT_NEW_PRICING_VBKD (business data)
Product Manager
Tel: 610-661-8575
Fax: 610-661-8576
Pager: 877-630-9366
Email: patricia.kimler@sap.com