Академический Документы
Профессиональный Документы
Культура Документы
Ramesh Prasad
Product Requirements Planning
R
SAP America
What is a Userexit?
A Userexit is a predefined point 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 was significantly improved with Release 3.1G
SAP America
TOP 10 SD Userexits
1. APPEND Structures 2. User Screens in Sales Order Processing 3. Determining Sales Orders Fields 4. Add New Fields for Pricing 5. Pricing Procedure Userexits 6. ATP Plant Selection 7. Partner for Customer/Material Info Record 8. Sales Document Save Userexits 9. Pricing Type with New Pricing 10. Influencing New Pricing
R
SAP America
SAP America
HEADER
ITEM
SAP America
MV45ATZZ
MV45AOZZ
MV45AIZZ
SAP America
USEREXIT_MOVE_FIELD_TO_VBAK
USEREXIT_MOVE_FIELD_TO_VBAP
MV45AFZB
VBKD
SAP America
SAP America
SAP America
KOMKAZ - User header fields for pricing KOMPAZ - User item fields for pricing
Add to pricing field catalog and create necessary pricing tables, access sequences. Next slide .
SAP America
TKOMK-ZZABC = VBAK-ZZABC.
USEREXIT_PRICING_PREPARE_TKOMP TKOMP-ZZABC = VBAP-ZZABC.
SAP America
SAP America
Requirements
Pricing Statistics
Formulas
Rounding rule
VOFM
Copying Requirements
Sales Orders Deliveries
SAP America
Data transfer
Sales Activities Texts Billing Documents
R
SAP America
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.
SAP America
This formula alters the value that the system uses to read the scales in the condition record.
Standard delivered formula 023 is used with condition type KP03 to compute the incremental surcharge for not ordering in full pallets. If 24.30 pallets are ordered, scale base formula 023 changes XKWERT to 0.30 which is then used to read the scales to determine the appropriate surcharge.
Scale Base
R
SAP America
After the condition record has been read and the scale value retrieved, it is possible to influence the condition basis to which the scale value will be applied. Standard delivered formula 022 is used with condition type KP00 to compute the discount based on full pallets ordered. If 24.30 pallets are ordered, condition base formula 022 changes XKWERT to 24 which is then multiplied by the scale rate.
SAP America
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
5- USD per CS 10- %
Condition Basis
X X 5 CS 1500 USD
Condition Value
= = 25- 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.
SAP America
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.
SAP America
RV03VFZZ
SAP America
Zip code (full or partial length) Delivery priority Plant 1 Plant 2, 3, 4, etc.
VBAP-WERKS = ZZSOURCE-PLNT1.
SAP America
SAP America
USEREXIT_CUST_MATERIAL_READ US_KUNNR = KUWEV-KUNNR (ship-to party) (or read any partner out of the table XVBPA)
SAP America
MV45AFZZ
8b USEREXIT_SAVE_DOCUMENT
R
SAP America
MV61AFZA
USEREXIT_CHANGE_PRICING_RULE PRICING_RULE = C.
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.
R
SAP America
USEREXIT_NEW_PRICING_VBAP (document item) Example: New pricing if the route is changed. IF VBAP-ROUTE NE *VBAP-ROUTE. NEW_PRICING = 'B'.
ENDIF.
SAP America