on 09-10-2014 3:47 PM
Hello Guru's,
I just want to know if it is possible to force system to redetermine route every time I change Request Delivery Date, Any user exit?
Actually what is happening right now
I have maintained three routes against each Shipping Condition and with the help of a User exit system is selecting appropriate route based on Request Delivery date and gives us confirmed Schedule line.
Now if I change delivery date from 15th to 12th, I want system to do that process again and select the appropriate route.
Any thoughts please? Mind you we always meet Customer Requested Delivery Date
Regards,
Khawar
Function Module SD_ROUTE_DETERMINATION is where the route gets determined in the code. The problem for you is that when you change the delivery date, this function will not get re-triggered. It is correct that it is not being called after a change to the delivery date as the delivery date is not one of the criteria for determining the route.
The following could be an approach:
1) Copy FM SD_ROUTE_DETERMINATION to a Z Function. This is necessary because FM SD_ROUTE_DETERMINATION is not released.
2) In user exit USER_EXIT_MOVE_FIELD_TO_VBEP, you could call function Z_SD_ROUTE_DETERMINATION. In here, you have access to all the parameters required for a successful route determination:
KUWEV-LAND1
KUWEV-LZONE
VBAK-VSBED
MAAPV-TRAGR
TVST-ALAND
TVST-AZONE
3) Get the route determined by Z_SD_ROUTE_DETERMINATION (the user exits within this function should determine it according to your own logic) and pass the value to VBAP-ROUTE.
I am not sure that the above will work as I have not tested it. But it may give you an idea on the direction you wish to take.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Noel,
Just to keep you posted, your idea is working perfectly we copied FM SD_ROUTE_DETERMINATION to Z_SD_ROUTE_DETERMINATION and we modified it according to our own logic besides that we used exit_move_field_to_vbap, there was another problem while we were creating sales order with reference at that time system was overwriting our route and taking route from the original document that we managed by writing a new routine as per our requirement at item level and replaced with routine 151.
Now system is determining route based on Requested delivery date, once user enters Request delivery date system selects the best available route based on that date and if user changes the delivery date system redetermines the best available route to get confirmed schedule line.
Thanks again for your help!
Best Regards,
Khawar
Since you already had some exit in place, you can certainly add this logic also in the same exit.
G. Lakshmipathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.