# SAP SD User Exits List: MV45AFZZ, RV60AFZZ and MV50AFZ1 Form Routines

> Source: https://netray.co/tools/sap-ecc-sd-user-exit-forms-mv45afzz-rv60afzz-reference
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Lookup table of the classic SD user exit FORM routines for sales orders, deliveries and billing on SAP ECC 6.0: include, transaction, when it fires, structures available and the usual gotcha.

## Category

sap

## Erp

SAP ECC 6.0

## Audience

- ABAP developer
- SAP SD consultant
- SAP technical lead

## Tool

**Kind:** worksheet

**Mode:** reference

**Columns:**

#### Include

**Key:** include

**Type:** text

#### Form routine

**Key:** form

**Type:** text

#### Transactions

**Key:** tcode

**Type:** text

#### When it fires

**Key:** fires

**Type:** text

#### Typical use

**Key:** use

**Type:** text

#### Main data available

**Key:** data

**Type:** text

#### Gotcha

**Key:** gotcha

**Type:** text

**Rows:**

**Include:** MV45AFZZ

**Form:** USEREXIT_SAVE_DOCUMENT_PREPARE

**Tcode:** VA01, VA02, VA41, VA42

**Fires:** Inside BELEG_SICHERN, before the document is posted

**Use:** Final checks or last field changes before save, e.g. force a Z field, block save on a missing PO number

**Data:** VBAK, XVBAP, XVBKD, XVBEP, XVBPA, XKOMV

**Gotcha:** 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

**Include:** MV45AFZZ

**Form:** USEREXIT_SAVE_DOCUMENT

**Tcode:** VA01, VA02

**Fires:** Inside BELEG_SICHERN, before COMMIT WORK, after the document number is final

**Use:** Write Z tables or statistics tables with the final VBELN

**Data:** VBAK-VBELN (final), XVBAP, YVBAP, XVBKD

**Gotcha:** No COMMIT WORK, no dialog messages; the standard COMMIT follows

**Include:** MV45AFZZ

**Form:** USEREXIT_MOVE_FIELD_TO_VBAK

**Tcode:** VA01, VA02

**Fires:** End of VBAK_FUELLEN when header data is filled

**Use:** Default a Z header field (VBAK-ZZ...) from the customer or sales area

**Data:** VBAK, *VBAK, KUAGV, KURGV, TVAK

**Gotcha:** Runs again on header changes; guard defaults so user input is not overwritten

**Include:** MV45AFZZ

**Form:** USEREXIT_MOVE_FIELD_TO_VBAP

**Tcode:** VA01, VA02

**Fires:** End of VBAP_FUELLEN when an item is filled

**Use:** Default Z item fields from the material or header

**Data:** VBAP, *VBAP, VBAK, MAAPV, TVAP

**Gotcha:** Called per item; avoid SELECT inside loops over XVBAP

**Include:** MV45AFZZ

**Form:** USEREXIT_MOVE_FIELD_TO_VBEP

**Tcode:** VA01, VA02

**Fires:** End of VBEP_FUELLEN when a schedule line is filled

**Use:** Fill Z schedule line fields

**Data:** VBEP, *VBEP, VBAP

**Gotcha:** Schedule lines are rebuilt by ATP; values set here can be redetermined

**Include:** MV45AFZZ

**Form:** USEREXIT_MOVE_FIELD_TO_VBKD

**Tcode:** VA01, VA02

**Fires:** End of VBKD_FUELLEN when business data is filled

**Use:** Default business data such as a Z field on VBKD

**Data:** VBKD, *VBKD, VBAK

**Gotcha:** Header VBKD (POSNR 000000) and item VBKD both pass here; check POSNR

**Include:** MV45AFZZ

**Form:** USEREXIT_FIELD_MODIFICATION

**Tcode:** VA01, VA02, VA03

**Fires:** FELDAUSWAHL, once per screen field at PBO

**Use:** Make fields display-only or hidden by order type or user

**Data:** SCREEN (with SCREEN-GROUP1 to GROUP4), VBAK, VBAP, T180-TRTYP

**Gotcha:** Only SCREEN attributes are changed; no MODIFY SCREEN needed, the standard does it

**Include:** MV45AFZZ

**Form:** USEREXIT_NUMBER_RANGE

**Tcode:** VA01

**Fires:** BELEG_SICHERN before number assignment

**Use:** Choose a different internal number range (parameter US_RANGE_INTERN) by VKORG or VKBUR

**Data:** VBAK, TVAK

**Gotcha:** Only internal number ranges; the range must exist in VN01

**Include:** MV45AFZZ

**Form:** USEREXIT_PRICING_PREPARE_TKOMK

**Tcode:** VA01, VA02

**Fires:** Before pricing, when the header communication structure is prepared

**Use:** Move a Z header field into TKOMK for a custom condition table field

**Data:** TKOMK, VBAK, VBKD

**Gotcha:** The field must first be added to KOMK via append KOMKAZ and to the field catalog

**Include:** MV45AFZZ

**Form:** USEREXIT_PRICING_PREPARE_TKOMP

**Tcode:** VA01, VA02

**Fires:** Before item pricing, when the item communication structure is prepared

**Use:** Move a Z item field into TKOMP for access sequences

**Data:** TKOMP, VBAP, VBKD, MAAPV

**Gotcha:** Add the field to KOMP via append KOMPAZ; also fill it in RV60AFZZ for billing

**Include:** MV45AFZZ

**Form:** USEREXIT_DELETE_DOCUMENT

**Tcode:** VA02

**Fires:** End of BELEG_LOESCHEN when an order is deleted

**Use:** Delete matching entries in Z tables

**Data:** VBAK, XVBAP

**Gotcha:** Delete in the same LUW; no COMMIT

**Include:** MV45AFZZ

**Form:** USEREXIT_READ_DOCUMENT

**Tcode:** VA02, VA03

**Fires:** End of BELEG_LESEN when an existing order is read

**Use:** Read Z tables into global memory for later exits

**Data:** VBAK, XVBAP

**Gotcha:** Clear your globals in USEREXIT_REFRESH_DOCUMENT

**Include:** MV45AFZA

**Form:** USEREXIT_REFRESH_DOCUMENT

**Tcode:** VA01, VA02, VA03

**Fires:** End of BELEG_INITIALISIEREN before the next document

**Use:** Reset customer globals and buffers

**Data:** Program globals

**Gotcha:** Without it, Z data leaks into the next order in the same session

**Include:** MV45AFZA

**Form:** USEREXIT_MOVE_FIELD_TO_KOMKD

**Tcode:** VA01, VA02

**Fires:** Before material determination, header structure

**Use:** Fill a Z field for material determination conditions

**Data:** KOMKD, VBAK

**Gotcha:** Companion USEREXIT_MOVE_FIELD_TO_KOMPD exists for item level

**Include:** MV45AFZB

**Form:** USEREXIT_CHECK_VBAK

**Tcode:** VA01, VA02

**Fires:** Header checks after header input

**Use:** Validate header fields, e.g. customer group vs order type

**Data:** VBAK, *VBAK

**Gotcha:** Use messages that keep the user on the screen; do not raise in the update task

**Include:** MV45AFZB

**Form:** USEREXIT_CHECK_VBAP

**Tcode:** VA01, VA02

**Fires:** Item checks after item input

**Use:** Validate item fields such as plant or route

**Data:** VBAP, VBAK

**Gotcha:** Fires for every item processed in the dialog

**Include:** MV45AFZB

**Form:** USEREXIT_CHECK_XVBAP_FOR_DELET

**Tcode:** VA02

**Fires:** When an item is about to be deleted

**Use:** Prevent deletion of items that meet a custom condition

**Data:** XVBAP

**Gotcha:** Companion exits exist for schedule lines (XVBEP) and serial numbers (XVBSN)

**Include:** MV45AFZB

**Form:** USEREXIT_SOURCE_DETERMINATION

**Tcode:** VA01, VA02

**Fires:** When the delivering plant is determined for an item

**Use:** Override plant determination by custom rule

**Data:** VBAP, VBAK, MAAPV

**Gotcha:** Check interaction with customer-material info and material master defaults

**Include:** MV45AFZB

**Form:** USEREXIT_MOVE_FIELD_TO_ME_REQ

**Tcode:** VA01, VA02 (third-party, individual PO)

**Fires:** When a purchase requisition is created from an order item

**Use:** Pass order data to EBAN or EBKN fields

**Data:** EBAN, EBKN, VBAP

**Gotcha:** Only for items that create requisitions, e.g. TAS or TAB items

**Include:** MV45AFZB

**Form:** USEREXIT_NEW_PRICING_VBAP

**Tcode:** VA02

**Fires:** When an item field changes, to decide on new pricing

**Use:** Trigger repricing (NEW_PRICING) when a Z field changes

**Data:** VBAP, *VBAP

**Gotcha:** Companion USEREXIT_NEW_PRICING_VBKD for business data changes

**Include:** RV45PFZA

**Form:** USEREXIT_SET_STATUS_VBUK

**Tcode:** VA01, VA02

**Fires:** When header status is set

**Use:** Set reserve status fields in VBUK (UVK01 to UVK05)

**Data:** VBUK, XVBUP

**Gotcha:** Companion USEREXIT_SET_STATUS_VBUP for item status

**Include:** RV60AFZC

**Form:** USEREXIT_NUMBER_RANGE_INV_DATE

**Tcode:** VF01, VF04

**Fires:** Before a billing document number is assigned

**Use:** Different billing number ranges by billing date or period

**Data:** VBRK, XVBRK

**Gotcha:** The number range intervals must exist (object RV_BELEG)

**Include:** RV60AFZZ

**Form:** USEREXIT_PRICING_PREPARE_TKOMK

**Tcode:** VF01, VF04

**Fires:** Before billing pricing, header communication structure

**Use:** Fill the same Z KOMK field used in the order so billing pricing finds the record

**Data:** TKOMK, VBRK

**Gotcha:** If you fill a field only in MV45AFZZ, billing redetermination will not find it

**Include:** RV60AFZZ

**Form:** USEREXIT_PRICING_PREPARE_TKOMP

**Tcode:** VF01, VF04

**Fires:** Before billing item pricing

**Use:** Fill the Z KOMP field for billing

**Data:** TKOMP, VBRP

**Gotcha:** Keep the logic identical to the order version

**Include:** RV60AFZC

**Form:** USEREXIT_FILL_VBRK_VBRP

**Tcode:** VF01, VF04

**Fires:** When VBRK and VBRP are filled from the reference document

**Use:** Copy Z fields from order or delivery into billing header or item

**Data:** VBRK, VBRP, reference document data

**Gotcha:** Copy control (VTFL, VTFA) data transfer routines are often the cleaner option

**Include:** MV50AFZ1

**Form:** USEREXIT_SAVE_DOCUMENT_PREPARE

**Tcode:** VL01N, VL02N

**Fires:** Before the delivery is saved

**Use:** Final checks or changes on delivery data

**Data:** LIKP, XLIKP, XLIPS

**Gotcha:** For new work prefer BAdI LE_SHP_DELIVERY_PROC method SAVE_DOCUMENT_PREPARE

**Include:** MV50AFZ1

**Form:** USEREXIT_SAVE_DOCUMENT

**Tcode:** VL01N, VL02N

**Fires:** Before COMMIT when the delivery is saved

**Use:** Update Z tables with the final delivery number

**Data:** LIKP, XLIKP, XLIPS, YLIPS

**Gotcha:** No COMMIT WORK; confirm with a breakpoint whether it is reached for VL10 collective creation on your release

**Include:** MV50AFZ1

**Form:** USEREXIT_MOVE_FIELD_TO_LIKP

**Tcode:** VL01N, VL02N

**Fires:** When the delivery header is filled

**Use:** Default Z delivery header fields

**Data:** LIKP, VBAK (reference)

**Gotcha:** Avoid dialog output so the code is safe if it is reached in background processing

**Include:** MV50AFZ1

**Form:** USEREXIT_MOVE_FIELD_TO_LIPS

**Tcode:** VL01N, VL02N

**Fires:** When a delivery item is filled

**Use:** Copy Z item fields from the order item

**Data:** LIPS, VBAP (reference)

**Gotcha:** Per item; buffer reads

**Include:** MV50AFZ1

**Form:** USEREXIT_DELETE_DOCUMENT

**Tcode:** VL02N

**Fires:** When a delivery is deleted

**Use:** Clean up Z tables for the delivery

**Data:** LIKP, XLIPS

**Gotcha:** Delete in the same LUW

**Notes:** 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.

## Content

**Intro:** 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.

**Sections:**

#### How to use it

**Body:** 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.

**Bullets:**

- 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

**Body:** 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

**Body:** 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

**Body:** 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.

**Cta:** 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.

**Faq:**

#### What is the user exit for VA01 after save?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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.

## Search terms

sap sd user exits list, user exits in sap sd, sap user exit va01, sap user exit vf01 after save, sap user exit for sales order, pricing user exits in sap sd, mv45afzz user exits, userexit_save_document_prepare

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
