Skip to Content
0
Former Member
Nov 10, 2005 at 04:29 PM

Date change problem in UserExit (mv45afzz)

494 Views

Hi,

Here is one scenario which i have to write coding....If any body knows, where to start my coding that would be great...

This is a UserExit , writing code in USEREXIT_SAVE_DOCUMENT_PREPARE in mv45afzz.

Loading date(VBEP-LDDAT) will be Read Only field at any time in the order life cycle.

User can manipulate the Loading date only by changing the requested delivery date in the header.

If Sales Order is Open:( delivery not yet created )

Allow the system to calculate the loading date based on the Ship To, Requested Delivery Date of the document and Plant(VBAP-WERKS). Once the Loading date is defaulted, check if Loading Date is Saturday or Sunday.If yes, change the calculated Loading date to preceding Friday.

If Sales Order is Closed: ( delivery is created )

If User changes the Requested Delivery Date of the document, then find the new Requested Delivery Date and the Requested Delivery Date on the corresponding delivery document matches.If yes allow the user to change the Requested Delivery Date of the document,If no, Flag error message and prevent from Saving the new Requested Delivery Date of the document.

Thanks in advance,

fractal.