SD User Exit

March 25, 2018 | Author: krishnacfp232 | Category: Formula, Sap Se, Information Technology Management, Computing, Technology


Comments



Description

Top 10 SD UserexitsRamesh 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  Code written in userexits is not supported by SAP. R  SAP America Determining Sales Orders Fields 4. Add New Fields for Pricing 5. Sales Document “Save” Userexits 9. User Screens in Sales Order Processing 3. Partner for Customer/Material Info Record 8. Influencing “New Pricing” R  SAP America .TOP 10 SD Userexits 1. ATP Plant Selection 7. Pricing Procedure Userexits 6. APPEND Structures 2. Pricing Type with “New Pricing” 10. 0A APPEND STRUCTURES R  SAP America .Number 1: Append Structures 1 Can I add a new field to the sales order?  Release 3. How can I maintain / display it in the sales order?  HEADER  SAPMV45A 8309 This is an include dynpro in SAPMV45A 309  ITEM  SAPMV45A 8459 This is an include dynpro in SAPMV45A 459 R  SAP America .Number 2: User Screens in Sales Order Entry 2 I just added a field to the sales order header. Number 2: User Screens in Sales Order Entry 2 I just added a field to the sales order header. How can I maintain / display it in the sales order?  User dynpros exist as part of the “additional data” screens at header/item level in 3.0.0. They have their own tabs in Release 4.  Sales Installation Specific Data Definitions  MV45ATZZ  Sales Installation Specific PBO Modules  MV45AOZZ  Sales Installation Specific PAI Modules  MV45AIZZ R  SAP America . How do I fill it with a value? 3b How can I determine the payment terms different from standard?  MV45AFZZ  Sales Order Header Sales Order Item  Sales Order Schedule Line USEREXIT_MOVE_FIELD_TO_ VBEP USEREXIT_MOVE_FIELD_TO_VBAK   USEREXIT_MOVE_FIELD_TO_VBAP Sales Order Business Data USEREXIT_MOVE_FIELD_TO_  MV45AFZB  VBKD Sales Order Serial Numbers USEREXIT_MOVE_FIELD_TO_VBSN R  SAP America .Number 3: Determining Sales Order Fields 3a I just added a new field to the sales order header. Sold-to Party Information KUWEV .Number 3: Determining Sales Order Fields  MV45ATZZ  Use for general data declarations TABLES: YYYY.Material Master View: Sales Screen 2 R  SAP America .Bill-to Party Information MAAPV .Ship-to Party Information KURGV .Material Master View: Sales Screen 1 MAEPV .Payer Information KUREV .  Common Work Areas KUAGV . R  SAP America . 3b FORM USEREXIT_MOVE_FIELD_TO_VBKD. VBKD-ZTERM = YYYY-ZZFIELD2.Number 3: Determining Sales Order Fields  MV45AFZZ 3a FORM USEREXIT_MOVE_FIELD_TO_VBAK. IF SVBAK-TABIX = 0. IF SVBKD-TABIX = 0. ENDIF. VBAK-ZZFIELD = YYYY-ZZFIELD1. ENDIF. User header fields for pricing KOMPAZ .User item fields for pricing  Add to pricing field catalog and create necessary pricing tables.  Next slide ….Number 4: Add New Fields for Pricing 4 How can I price off of the new field I added to the sales order header?  Add new field to:   KOMKAZ . R  SAP America . access sequences.  MV45AFZZ .Billing Document USEREXIT_PRICING_PREPARE_TKOMK USEREXIT_PRICING_PREPARE_TKOMP R  SAP America .Number 4: Add New Fields for Pricing 4 How can I price off of the new field I added to the sales order header?  Fill value during order entry and billing. USEREXIT_PRICING_PREPARE_TKOMP TKOMP-ZZABC = VBAP-ZZABC.  RV60AFZZ .Sales Order USEREXIT_PRICING_PREPARE_TKOMK TKOMK-ZZABC = VBAK-ZZABC. Number 5: Pricing Procedure Userexits 5 What are all of the formulas. etc. requirements. in the pricing procedure for?  Pricing Procedure Requirement  Access Sequence Requirement  Scale Base Formula  Condition Base Formula  Condition Value Formula R  SAP America . Number 5: Pricing Procedure Userexits Account determination Output Control Material determination Listing / Exclusion Scale base Condition base Condition base value Structure of group key Requirements Pricing Statistics Formulas Rounding rule VOFM Copying Requirements Sales Orders Deliveries  SAP America Data transfer Sales Activities Texts Billing Documents R . Sales item communication structure XKOMV .  Important work areas:    KOMK .  Formulas are available to calculate values differently from the way they are calculated in the standard system or to set certain values.Sales header communication structure KOMP .  In formulas.Internal pricing table R  SAP America .Number 5: Pricing Procedure Userexits General Notes  Requirements are available to aid performance by eliminating unnecessary accesses to the database. the field XKWERT always stands for the number being determined. R  SAP America .  New Requirement: Discount is only relevant for items with material group „ABC‟.  The requirement routine defines the circumstances under which the access should be made.  CHECK: KOMP-KZNEP NE „X‟.  CHECK: KOMP-MATKL EQ „ABC‟. Examples  Requirement „6‟: Only perform the access if condition exclusion is not active.Number 5: Pricing Procedure Userexits Requirements  Definable at the pricing procedure and access sequence level. Standard delivered formula “023” is used with condition type KP03 to compute the incremental surcharge for not ordering in full pallets. If 24.30 which is then used to read the scales to determine the appropriate surcharge. scale base formula “023” changes XKWERT to 0.30 pallets are ordered.Number 5: Pricing Procedure Userexits Formulas  Scale Base Formula  This formula alters the value that the system uses to read the scales in the condition record.  Scale Base R  SAP America . it is possible to influence the condition basis to which the scale value will be applied. condition base formula “022” changes XKWERT to 24 which is then multiplied by the scale rate.Number 5: Pricing Procedure Userexits Formulas  Condition Base Formula  After the condition record has been read and the scale value retrieved.30 pallets are ordered. If 24. Standard delivered formula “022” is used with condition type KP00 to compute the discount based on full pallets ordered.  Condition Base Formula R  SAP America . USD per CS 10.Number 5: Pricing Procedure Userexits Formulas  Condition Value Formula  After the system has found the correct scale rate from the condition record and the condition basis for the calculation. It is also possible to use the formula to do comparisons and set flags.USD 150.  Scale Rate 5.USD  It is possible to influence the condition value calculated by the system using the condition value formula. the condition value is calculated.% Condition Basis X X 5 CS 1500 USD Condition Value = = 25. R  SAP America . XKWERT = 0. Based on the result.  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.  IF XXX = YYY.Examples  Under certain circumstances. ENDIF.Number 5: Pricing Procedure Userexits Formulas  Condition Value Formula . R  SAP America . the condition value should be set to zero. the “pricing ok” flag is used to block the line item. Number 6: ATP Plant Selection 6a My primary sourcing plant is determined by zip code and shipping conditions. Can I do this in SAP? 6b How can I automate the selection of plants on the “Other Plants” push button screen?  MV45AFZB  Selection of primary sourcing plant USEREXIT_SOURCE_DETERMINATION  RV03VFZZ  Selection of secondary sourcing plant USEREXIT_PLANT_SELECTION R  SAP America . Can I do this in SAP?  Define new table (ZZSOURCE) in data dictionary: ZIPCD LPRIO PLNT1 PLNT2  MV45AFZB FORM USEREXIT_SOURCE_DETERMINATION Zip code (full or partial length) Delivery priority Plant 1 Plant 2.  SAP America . 3. 4. SELECT SINGLE * FROM ZZSOURCE WHERE ZIPCD EQ KUWEV-PSTLZ AND LPRIO EQ KUWEV-VSBED. R VBAP-WERKS = ZZSOURCE-PLNT1.Number 6: ATP Plant Selection 6a My primary sourcing plant is determined by zip code and shipping conditions. etc. tertiary. selections). R  SAP America . (Mark SELKZ field in PLANTS internal table for the plant(s) that should be checked or rearrange plants to show secondary. etc.Number 6: ATP Plant Selection 6b How can I automate the selection of plants on the “Other Plants” push button?  RV03VFZZ FORM USEREXIT_PLANT_SELECTION SELECT SINGLE * FROM ZZSOURCE WHERE ZIPCD EQ KUWEV-PSTLZ AND LPRIO EQ KUWEV-VSBED. Can I use the ship-to party or some level of the customer hierarchy?  MV45AFZB  USEREXIT_CUST_MATERIAL_READ US_KUNNR = KUWEV-KUNNR (ship-to party) (or read any partner out of the table XVBPA) R  SAP America .Number 7: Partner for Cust/Mat Info Record 7 SAP uses the sold-to party to read the customer/ material info record. Where can I do that?  MV45AFZZ 8a USEREXIT_SAVE_DOCUMENT_PREPARE (Look at Note 64876 if you want to return the user to the transaction.Number 8: Sales Document “Save” Userexits 8a I have some special checks to perform before a sales order can be saved.)  MV45AFZZ 8b USEREXIT_SAVE_DOCUMENT R  SAP America . Where can I specify them? 8b I have some user tables to update when a sales order is saved.  Release 4. I lose all manually entered conditions. R  SAP America . Can I do anything about this?  MV61AFZA  USEREXIT_CHANGE_PRICING_RULE PRICING_RULE = „C‟.Number 9: Pricing Type with New Pricing 9 When I use “new pricing” in the sales order.  Refer to note 24832 for more examples.0C allows the pricing rule to be specified in a pop up window with “New Pricing”. the system does not automatically reprice the document.Number 10: Influencing “New Pricing” 10 When I change the value of field XXX. IF VBAP-ROUTE NE *VBAP-ROUTE.  USEREXIT_NEW_PRICING_VBKD (business data) R  SAP America . ENDIF. How can I accomplish this?  MV45AFZB  USEREXIT_NEW_PRICING_VBAP (document item) Example: New pricing if the “route” is changed. NEW_PRICING = 'B'.
Copyright © 2024 DOKUMEN.SITE Inc.