Skip to main content

User Exits in Delivery




FORM routine USEREXIT_REFRESH_DOCUMENT (include MV50AFZ1)

Purpose
The FORM routine USEREXIT_REFRESH_DOCUMENT is used for the initialization of your own data areas before the processing of a new delivery document.

Call
The routine is called from within the standard routine BELEG_DATEN_INIT (SAPMV50A).
Basically, the data initialization is called on the following occasions:

FORM routine USEREXIT_DELETE_DOCUMENT (include MV50AFZ1)

Purpose
If a delivery is deleted, you can delete your own dependent data using this FORM routine.

Call
The FORM routine is called from the FORM routine BELEG_LOESCHEN (SAPMV50A) if the document can be deleted completely. Immediately after the FORM routine 

USEREXIT_DELETE_DOCUMENT is called, the document backup is called for which the logically deleted delivery is removed from the database.

FORM routine USEREXIT_READ_DOCUMENT (include MV50AFZ1)

Purpose
The exit is used to make your own data available for processing in the delivery.

Call
The routine is run exactly once every time the delivery document data is read in change or display mode of the delivery. Exception: The routine is not executed when reading deliveries during the subsequent delivery split and when enhancing deliveries.


FORM routine USEREXIT_MOVE_FIELD_TO_LIKP (include MV50AFZ1)

Purpose
The exit is used to provide your own additional fields of the header table LIKP with data.

Call
The FORM routine is run exactly once when creating a new delivery. The FORM routine USEREXIT_MOVE_FIELD_TO_LIKP is always called at the end of the routines LIKP_FUELLEN (SAPFV50K; delivery creation with predecessor reference) and LIKP_FUELLEN_OR (SAPFV50K; delivery creation without predecessor reference). In the case of deliveries with predecessor reference, the copy routine for transferring the preceding data is called once before and once after this exit.

FORM routine USEREXIT_MOVE_FIELD_TO_LIPS (include MV50AFZ1)

Purpose
The routine is used to provide your own additional fields of the table LIPS with data.

Call
The routine is run exactly once for each item during the creation of delivery items. The FORM routine USEREXIT_MOVE_FIELD_TO_LIPS is always called at the end of the routines LIPS_FUELLEN (creation of items with predecessor reference) and LIPS_FUELLEN_OR (creation of items without predecessor reference and creation of additional items in the delivery such as batch split items or packaging items). When you create items with predecessor reference, the routines of the copy control are called before and after this user exit.

FORM routine USEREXIT_BATCH_DETERMINATION (include MV50AFZZ)
Purpose
You can use the routine to determine the batch, which is to be assigned to the delivery item, in accordance with your own criteria.

Call
The user exit is called during item creation within the routine LIPS_BEARBEITEN (program SAPFV50P).

FORM routine USEREXIT_SAVE_DOC_BEFORE_PREP (include MV50AFZ1)

This routine is available only after you implement Note 751000.

Purpose
This routine can be used for the final change of all delivery data. At the time of the call, the delivery is complete and consistent; only the document number has not yet been determined in the creation case and the final processing of the requirements has not yet taken place. Therefore, changes to the delivery at this time must be made with particular care because no subsequent checks can prevent possible data inconsistencies.
Since requirements processing has not yet occurred, this user exit is, in particular, suitable for changes relevant for requirements when the delivery is saved.

For example, changes to delivery quantities and items during save_document_prepare might create inconsistencies at times due to that we can leverage this exit.

USEREXIT_SAVE_DOCUMENT_PREPARE (include MV50AFZ1).

Purpose
This routine is the most powerful exit in delivery processing and can be used for the final change of all delivery data. At the time of the call, the delivery is complete and consistent, only the document number has not yet been determined in the creation case. Therefore, changes to the delivery at this time must be made with particular care because no subsequent checks can prevent possible data inconsistencies.

Call
This exit is called from the routine BELEG_SICHERN (SAPMV50A) before deliveries are saved in the dialog and during delivery creation in collective processing.

FORM routine USEREXIT_SAVE_DOCUMENT (include MV50AFZ1)

Purpose
The routine is used to save your own data when saving deliveries. Delivery data cannot be changed here anymore since it has already been transferred to the update.

Call
The call occurs when the document is saved (routine BELEG_SICHERN, program SAPMV50A) immediately before the COMMIT WORK statement.

Comments

Post a Comment

Popular posts from this blog

M7021 : Deficit of stock relevant error message during Material Document Cancellation

Issue : When posting a Cancellation for a Material Document in transaction MIGO, you see error 'M7021 Deficit of not stock relevant' although the Purchase Order is setup with an Account assignment. Material / Batch is not managed on Stock Level even though material is valuated. Resolution : The issue is due to program bug and require to implement note - 2502183 - Slog: correction for quantity check. This note is applicable for S/4 HANA 1610 (S4CORE 101) and 1709 (S4CORE 102).

Revenue Account Determination - SAP SD

Revenue account determination is one critical integration point between Sales & Distribution and Financial Module. Here on posting a billing document to account, based on this revenue account determination, system determines relevant G/L accounts for revenue posting. As like any other basic function configuration like pricing, its configuration also based on condition technique. The condition technique is used in account determination in order to allocate the correct GL account and account key assigned in the pricing procedure against condition types carries the condition values from SD to FI. IMG -> SD -> Basic Function -> Account Assignment -> Revenue account determination -> Check master data relevant for account assignment. Through check master data relevant for account assignment, one has the opportunity to create account assignment grouping criteria. This grouping criteria provides the system with an extra variable in determ

Determinations in SAP SD

Plant Determination in Sales Order 1st Preference: System fetches Delivering plant from Customer Material Info Record if Plant is not found at this level then system will look into 2nd Preference:   Delivering plant from Customer Master data if Plant is not found at this level then system will look into 3rd Preference : the Delivering plant for Material Master data If business user overwrites Plant at sales document level then this will be given highest preference. Shipping Point Determination Delivering Plant (Based on above conditions) + Shipping Conditions ( Sales Document Type or  Customer Master Data) + Loading Group ( Material Master ) Storage Location Determination Plant + Shipping Point + Storage Conditions ( Material Master )  ( MALA) Plant + Shipping Point + Situation  ( RETA) Route Determination Departure Zone or Country of the Delivering Plant + Destination Zone or Country of the Ship to Party + Shipping Condition from the Customer Master + Transport