User Exits Part 5: MV50AFZ1 — Delivery User Exit Patterns
Preview · a free account unlocks the full lesson
Apply delivery user exits in MV50AFZ1: USEREXIT SAVE DOCUMENT PREPARE for checks and changes with LIKP and XLIPS, USEREXIT SAVE DOCUMENT for own tables, batch split items, background delivery creation (VL10) and when the BAdI LE SHP DELIVERY PROC is the better choice.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 4 covered sales orders. Deliveries follow the same user-exit pattern, but with different tables, and considerably more background processing to account for.
MV50AFZ1 contains the delivery exits of SAPMV50A: USEREXIT_SAVE_DOCUMENT_PREPARE and USEREXIT_SAVE_DOCUMENT are the most used. USEREXIT_SAVE_DOCUMENT_PREPARE handles checks and final changes right before save — blocking a delivery, setting a Z field, validating batch assignments. USEREXIT_SAVE_DOCUMENT runs during the save itself, typically writing to your own custom tables through the update task. USEREXIT_MOVE_FIELD_TO_LIKP and its _LIPS counterpart fill header and item fields during creation, and depending on release these FORMs live in MV50AFZ1 or a related include.
On data: LIKP (header), XLIPS/YLIPS (items new/old with UPDKZ), XVBPA (partners), XVBFA (document flow). XLIPS specifically holds both the main delivery items and any batch-split sub-items, where UECHA points to the higher-level item. For quantity checks, use either the main item or the sum of its split items — never both at once, or quantities get double-counted — and deleted items, marked with UPDKZ = 'D', should be skipped entirely.
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.