SAP SD User Exits List: MV45AFZZ, RV60AFZZ and MV50AFZ1 Form Routines
A searchable list of the classic form-routine user exits for SAP ECC 6.0 sales orders, deliveries and billing documents, with the include, transaction, timing and the structures you can read or change. Use it to pick the right exit before you request a modification key.
| Include | Form routine | Transactions | When it fires | Typical use | Main data available | Gotcha |
|---|---|---|---|---|---|---|
MV45AFZZ | USEREXIT_SAVE_DOCUMENT_PREPARE | VA01, VA02, VA41, VA42 | Inside BELEG_SICHERN, before the document is posted | Final checks or last field changes before save, e.g. force a Z field, block save on a missing PO number | VBAK, XVBAP, XVBKD, XVBEP, XVBPA, XKOMV | To stop the save, set a message and send the user back to the screen; an E message here can leave the order in an odd state |
MV45AFZZ | USEREXIT_SAVE_DOCUMENT | VA01, VA02 | Inside BELEG_SICHERN, before COMMIT WORK, after the document number is final | Write Z tables or statistics tables with the final VBELN | VBAK-VBELN (final), XVBAP, YVBAP, XVBKD | No COMMIT WORK, no dialog messages; the standard COMMIT follows |
MV45AFZZ | USEREXIT_MOVE_FIELD_TO_VBAK | VA01, VA02 | End of VBAK_FUELLEN when header data is filled | Default a Z header field (VBAK-ZZ...) from the customer or sales area | VBAK, *VBAK, KUAGV, KURGV, TVAK | Runs again on header changes; guard defaults so user input is not overwritten |
MV45AFZZ | USEREXIT_MOVE_FIELD_TO_VBAP | VA01, VA02 | End of VBAP_FUELLEN when an item is filled | Default Z item fields from the material or header | VBAP, *VBAP, VBAK, MAAPV, TVAP | Called per item; avoid SELECT inside loops over XVBAP |
MV45AFZZ | USEREXIT_MOVE_FIELD_TO_VBEP | VA01, VA02 | End of VBEP_FUELLEN when a schedule line is filled | Fill Z schedule line fields | VBEP, *VBEP, VBAP | Schedule lines are rebuilt by ATP; values set here can be redetermined |
MV45AFZZ | USEREXIT_MOVE_FIELD_TO_VBKD | VA01, VA02 | End of VBKD_FUELLEN when business data is filled | Default business data such as a Z field on VBKD | VBKD, *VBKD, VBAK | Header VBKD (POSNR 000000) and item VBKD both pass here; check POSNR |
MV45AFZZ | USEREXIT_FIELD_MODIFICATION | VA01, VA02, VA03 | FELDAUSWAHL, once per screen field at PBO | Make fields display-only or hidden by order type or user | SCREEN (with SCREEN-GROUP1 to GROUP4), VBAK, VBAP, T180-TRTYP | Only SCREEN attributes are changed; no MODIFY SCREEN needed, the standard does it |
MV45AFZZ | USEREXIT_NUMBER_RANGE | VA01 | BELEG_SICHERN before number assignment | Choose a different internal number range (parameter US_RANGE_INTERN) by VKORG or VKBUR | VBAK, TVAK | Only internal number ranges; the range must exist in VN01 |
MV45AFZZ | USEREXIT_PRICING_PREPARE_TKOMK | VA01, VA02 | Before pricing, when the header communication structure is prepared | Move a Z header field into TKOMK for a custom condition table field | TKOMK, VBAK, VBKD | The field must first be added to KOMK via append KOMKAZ and to the field catalog |
MV45AFZZ | USEREXIT_PRICING_PREPARE_TKOMP | VA01, VA02 | Before item pricing, when the item communication structure is prepared | Move a Z item field into TKOMP for access sequences | TKOMP, VBAP, VBKD, MAAPV | Add the field to KOMP via append KOMPAZ; also fill it in RV60AFZZ for billing |
MV45AFZZ | USEREXIT_DELETE_DOCUMENT | VA02 | End of BELEG_LOESCHEN when an order is deleted | Delete matching entries in Z tables | VBAK, XVBAP | Delete in the same LUW; no COMMIT |
MV45AFZZ | USEREXIT_READ_DOCUMENT | VA02, VA03 | End of BELEG_LESEN when an existing order is read | Read Z tables into global memory for later exits | VBAK, XVBAP | Clear your globals in USEREXIT_REFRESH_DOCUMENT |
MV45AFZA | USEREXIT_REFRESH_DOCUMENT | VA01, VA02, VA03 | End of BELEG_INITIALISIEREN before the next document | Reset customer globals and buffers | Program globals | Without it, Z data leaks into the next order in the same session |
MV45AFZA | USEREXIT_MOVE_FIELD_TO_KOMKD | VA01, VA02 | Before material determination, header structure | Fill a Z field for material determination conditions | KOMKD, VBAK | Companion USEREXIT_MOVE_FIELD_TO_KOMPD exists for item level |
MV45AFZB | USEREXIT_CHECK_VBAK | VA01, VA02 | Header checks after header input | Validate header fields, e.g. customer group vs order type | VBAK, *VBAK | Use messages that keep the user on the screen; do not raise in the update task |
MV45AFZB | USEREXIT_CHECK_VBAP | VA01, VA02 | Item checks after item input | Validate item fields such as plant or route | VBAP, VBAK | Fires for every item processed in the dialog |
MV45AFZB | USEREXIT_CHECK_XVBAP_FOR_DELET | VA02 | When an item is about to be deleted | Prevent deletion of items that meet a custom condition | XVBAP | Companion exits exist for schedule lines (XVBEP) and serial numbers (XVBSN) |
MV45AFZB | USEREXIT_SOURCE_DETERMINATION | VA01, VA02 | When the delivering plant is determined for an item | Override plant determination by custom rule | VBAP, VBAK, MAAPV | Check interaction with customer-material info and material master defaults |
MV45AFZB | USEREXIT_MOVE_FIELD_TO_ME_REQ | VA01, VA02 (third-party, individual PO) | When a purchase requisition is created from an order item | Pass order data to EBAN or EBKN fields | EBAN, EBKN, VBAP | Only for items that create requisitions, e.g. TAS or TAB items |
MV45AFZB | USEREXIT_NEW_PRICING_VBAP | VA02 | When an item field changes, to decide on new pricing | Trigger repricing (NEW_PRICING) when a Z field changes | VBAP, *VBAP | Companion USEREXIT_NEW_PRICING_VBKD for business data changes |
RV45PFZA | USEREXIT_SET_STATUS_VBUK | VA01, VA02 | When header status is set | Set reserve status fields in VBUK (UVK01 to UVK05) | VBUK, XVBUP | Companion USEREXIT_SET_STATUS_VBUP for item status |
RV60AFZC | USEREXIT_NUMBER_RANGE_INV_DATE | VF01, VF04 | Before a billing document number is assigned | Different billing number ranges by billing date or period | VBRK, XVBRK | The number range intervals must exist (object RV_BELEG) |
RV60AFZZ | USEREXIT_PRICING_PREPARE_TKOMK | VF01, VF04 | Before billing pricing, header communication structure | Fill the same Z KOMK field used in the order so billing pricing finds the record | TKOMK, VBRK | If you fill a field only in MV45AFZZ, billing redetermination will not find it |
RV60AFZZ | USEREXIT_PRICING_PREPARE_TKOMP | VF01, VF04 | Before billing item pricing | Fill the Z KOMP field for billing | TKOMP, VBRP | Keep the logic identical to the order version |
RV60AFZC | USEREXIT_FILL_VBRK_VBRP | VF01, VF04 | When VBRK and VBRP are filled from the reference document | Copy Z fields from order or delivery into billing header or item | VBRK, VBRP, reference document data | Copy control (VTFL, VTFA) data transfer routines are often the cleaner option |
MV50AFZ1 | USEREXIT_SAVE_DOCUMENT_PREPARE | VL01N, VL02N | Before the delivery is saved | Final checks or changes on delivery data | LIKP, XLIKP, XLIPS | For new work prefer BAdI LE_SHP_DELIVERY_PROC method SAVE_DOCUMENT_PREPARE |
MV50AFZ1 | USEREXIT_SAVE_DOCUMENT | VL01N, VL02N | Before COMMIT when the delivery is saved | Update Z tables with the final delivery number | LIKP, XLIKP, XLIPS, YLIPS | No COMMIT WORK; confirm with a breakpoint whether it is reached for VL10 collective creation on your release |
MV50AFZ1 | USEREXIT_MOVE_FIELD_TO_LIKP | VL01N, VL02N | When the delivery header is filled | Default Z delivery header fields | LIKP, VBAK (reference) | Avoid dialog output so the code is safe if it is reached in background processing |
MV50AFZ1 | USEREXIT_MOVE_FIELD_TO_LIPS | VL01N, VL02N | When a delivery item is filled | Copy Z item fields from the order item | LIPS, VBAP (reference) | Per item; buffer reads |
MV50AFZ1 | USEREXIT_DELETE_DOCUMENT | VL02N | When a delivery is deleted | Clean up Z tables for the delivery | LIKP, XLIPS | Delete in the same LUW |
All rows are FORM routines in SAP modification includes, not CMOD customer exits. Changing them needs an SSCR object key (modification) and is reviewed in SPAU after upgrades. IMG path: SPRO > Sales and Distribution > System Modifications > User Exits. Confirm each form in SE38 on your release before coding.
Get your MV45AFZZ code reviewed
Send us an export of your SD user exit includes and we will map what each block does and flag logic that belongs in a BAdI or copy routine.
Optional. The tool and every export work without this. No spam.
How to use it
Search by transaction (VA01, VL02N, VF01) or by goal (pricing, save, number range). Each row tells you which include holds the FORM, when the standard program calls it and what is in memory at that point. Pick the latest point that still has the data you need: a field default belongs in USEREXIT_MOVE_FIELD_TO_VBAP, a cross-item check belongs in USEREXIT_SAVE_DOCUMENT_PREPARE, and a write to a Z table belongs in USEREXIT_SAVE_DOCUMENT, where the final document number is known. Export the filtered list to Excel to attach to a functional specification.
- Defaults: MOVE_FIELD_TO_VBAK, VBAP, VBKD, VBEP
- Checks: MV45AFZB CHECK_ forms and SAVE_DOCUMENT_PREPARE
- Pricing: PRICING_PREPARE_TKOMK and TKOMP in both MV45AFZZ and RV60AFZZ
- Z tables: SAVE_DOCUMENT and DELETE_DOCUMENT
Where this lives in ECC
Sales document processing is module pool SAPMV45A; its user exit includes are MV45AFZZ (main form exits), MV45AFZA, MV45AFZB and MV45AFZD, plus MV45ATZZ for data declarations and MV45AOZZ and MV45AIZZ for PBO and PAI modules. Additional header and item data screens are 8309 and 8459. Billing uses RV60AFZZ and RV60AFZC, deliveries use MV50AFZ1. These are SAP objects delivered empty for customer use: editing them is a modification, so you need an SSCR object key and the change appears in SPAU at upgrade time. SMOD enhancements such as V45A0001 or V60A0001 and BAdIs are the alternatives that do not need a key.
Worked example: a custom pricing field
To price by a Z field on the order header, add ZZREGION to VBAK via an append, add it to KOMK through append structure KOMKAZ, and add it to the condition field catalog. In MV45AFZZ, USEREXIT_PRICING_PREPARE_TKOMK sets tkomk-zzregion = vbak-zzregion. Then repeat the same assignment in RV60AFZZ USEREXIT_PRICING_PREPARE_TKOMK, reading the value from the billing source, because billing builds its own TKOMK. Teams that skip the billing side see the condition in the order but a missing or different price when the invoice is created with pricing type B or C.
Gotchas worth knowing
Never code COMMIT WORK in SAVE_DOCUMENT or any form called from BELEG_SICHERN; the standard commit follows and an early commit splits the LUW. Dialog messages in SAVE_DOCUMENT are too late to be useful, so do checks in SAVE_DOCUMENT_PREPARE. Exits are called for every order type, so filter on VBAK-AUART or T180-TRTYP early. Collective and BAPI processing (VF04, BAPI_SALESORDER_CREATEFROMDAT2) calls the same forms without a screen, so avoid POPUP functions. For deliveries on ECC 6.0, BAdI LE_SHP_DELIVERY_PROC covers most of MV50AFZ1 without a modification.
Frequently Asked Questions
What is the user exit for VA01 after save?
USEREXIT_SAVE_DOCUMENT in include MV45AFZZ runs just before the COMMIT, after the order number is assigned, so it is the place to write Z tables keyed by VBELN. If you need to check or change data before posting, use USEREXIT_SAVE_DOCUMENT_PREPARE instead. Neither should contain COMMIT WORK.
Which user exit is used for VF01 billing?
Classic billing form exits are in RV60AFZZ (the pricing prepare forms USEREXIT_PRICING_PREPARE_TKOMK and TKOMP) and RV60AFZC (USEREXIT_NUMBER_RANGE_INV_DATE and USEREXIT_FILL_VBRK_VBRP). For changes at accounting transfer, look at SMOD enhancement SDVFX001 and related SDVFX enhancements, or BAdI AC_DOCUMENT for the FI document.
Do I need an access key for MV45AFZZ?
Yes. MV45AFZZ is an SAP-delivered include, so changing it is a modification and needs an SSCR object key registered for that object on the SAP support portal. The change will appear in SPAU during upgrades. Customer exits from SMOD and BAdIs do not need a key.
What are the pricing user exits in SAP SD?
USEREXIT_PRICING_PREPARE_TKOMK and USEREXIT_PRICING_PREPARE_TKOMP fill custom fields into the pricing communication structures for the order (MV45AFZZ) and billing (RV60AFZZ). The fields themselves go into append structures KOMKAZ and KOMPAZ. Pricing program exits in RV61AFZA and RV61AFZB and VOFM routines cover changes inside the condition calculation.
If you want your team to ask SAP ECC which exits are already coded and what they do, in plain English on your own servers, we can set that up.
Related Tools
SAP ECC Customer Exits (SMOD Enhancements) by Module Reference
Lookup table of widely used SMOD enhancements on SAP ECC 6.0 by module, with transactions, components and typical use, plus how to find the exit for any transaction.
SAPSAP ECC Classic BAdI Definitions Reference (MIGO, ME21N, MIRO, Deliveries, PM Orders)
Reference table of widely used BAdI definitions on SAP ECC 6.0 with interface, key methods, transactions and typical use, plus how to find a BAdI and where error messages are allowed.
Developer ToolsSAP ECC Enhancement Transactions and Exit Tables Reference (SMOD, CMOD, SE18, MODSAP, SXC_EXIT)
Lookup table of the transactions, tables and classes used to find, implement and audit customer exits, BAdIs and enhancement implementations on SAP ECC 6.0.
SAPSAP SD Enhancement Functional Specification Template
A fill-in functional spec for SD enhancements: requirement, trigger point, logic rules, data touched, test cases and sign-off. Exports to PDF or Word.
More SAP tools
See all- SAP ECC Private AI Layer Blueprint Generator
- SAP ECC AI Assistant Sizing and Value Calculator
- SAP ECC Background Job Tables Reference (TBTCO, TBTCP, Job Status Codes)
- SAP ECC Output Determination Tables and Codes Reference (NAST, TNAPR, NACE)
- SAP ECC Movement Type Configuration Tables Reference (T156, T156T, T157D)
- SAP ECC Stock Type and Location Transfer Movement Type Matrix
- SAP ECC Movement Type to OBYC Transaction Key and GBB Account Modifier Reference
- SAP ECC 6.0 Enhancement Packages and Maintenance Dates Reference (EHP1 to EHP8, 2027, 2030, 2033)
- SAP ECC ORDERS05 IDoc Segments and Qualifiers Reference
Keep exploring
Free tools
- SAP ECC User Exit (CMOD/SMOD) Implementation ChecklistFind the right exit, decide between customer exit, form user exit, BAdI or BTE, then implement, activate, transport and test a CMOD project in SAP ECC.
- SAP ECC MM and SD Tables Replaced in S/4HANA ReferenceLook up which ECC 6.0 logistics tables (MM inventory, SD, credit, rebates, PP planning file) were replaced or turned into compatibility views in S/4HANA, and what that means for custom code.
- SAP SD Transaction Codes ReferenceA searchable list of common SAP sales and distribution transaction codes, grouped by process area, for daily use and onboarding.
ERP fixes and how-tos
- SAP VF04 Billing Due List Is Empty: Why Documents Do Not AppearVF04 shows nothing to bill? Walk through goods issue status, billing blocks, incompletion, billing relevance and selection dates that hide deliveries and orders.
- How to add AI to SAP ECC 6.0 on-prem without moving data to a cloudReference architecture for a private on-prem AI assistant on SAP ECC 6.0: RFC and BAPI reads, SLT replica, retrieval index, local LLM, permission mirroring.
- SAP PP and MM Enhancement Examples: User Exits, BAdIs and Enhancement SpotsPractical SAP PP and MM enhancement examples: user exits, BAdIs such as ME_PROCESS_PO_CUST and WORKORDER_UPDATE, how to find them and a PO validation sketch.
AI on your ERP
- AI for SAP S/4HANA Sales and Distribution (SD) That Explains Orders, Pricing and BlocksAI for SAP S/4HANA SD: order status, delivery and billing blocks, pricing explanations and credit holds in plain English. Read-only, on-prem option.
- Get AI Value From SAP ECC Now, and Use It to De-Risk the Move to S/4HANASAP ECC 6.0 mainstream maintenance ends in 2027. Add AI value on ECC now, using its existing BAPIs and IDocs, and use it to de-risk the S/4HANA migration.
Integrations
- How to use ChatGPT with SAP ECC 6.0Using ChatGPT with SAP ECC 6.0: custom GPT actions, exports versus live access, an OData or MCP bridge, enterprise data controls, and when a private model is safer.
- How to add Slack to SAP ECC 6.0Build a Slack app for SAP ECC 6.0: slash commands that read stock and orders via BAPIs, interactive approvals, alert channels and Socket Mode for on-prem.