User Exits Part 4: MV45AFZZ — Sales Order Exits and Save Logic
Preview · a free account unlocks the full lesson
Use the main sales order exits correctly: USEREXIT MOVE FIELD TO VBAK/VBAP/VBKD for defaults, USEREXIT SAVE DOCUMENT PREPARE for checks and final changes, USEREXIT SAVE DOCUMENT for own tables, custom fields via VBAK/VBAP appends, and working with XVBAP/YVBAP and UPDKZ.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 3 of this series showed how to find the exits available in a transaction; MV45AFZZ is the most used user-exit include in SD, and this lesson covers its key FORMs.
During entry, defaults are set in three places: USEREXIT_MOVE_FIELD_TO_VBAK handles the header, setting a custom ZZ field or a default derived from customer data; USEREXIT_MOVE_FIELD_TO_VBAP handles the item level and runs whenever an item is created or changed, with VBAP holding the current item; and USEREXIT_MOVE_FIELD_TO_VBKD handles business data such as payment terms and incoterms. In all three, only set a field if it's still initial or clearly derived, so that user input never gets overwritten.
Custom fields are added by appending a structure with ZZ fields to VBAK or VBAP in SE11. On the screen side, they're placed on customer subscreens — the "Additional data B" tabs — inside SAPMV45A screens 8309 (header) and 8459 (item), with code living in MV45AFZZ, MV45AFZB, or the screen's own PBO/PAI logic. For copy control, data transfer routines are used when values need to be copied from a quotation to an order.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Full explanation
- Code example
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
Interview questions on this topic
Related SAP topics
Referenced SAP objects
Reviewed reference pages for the objects this page mentions.
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.