cancel
Showing results for 
Search instead for 
Did you mean: 

Update sales order item route on save

former_member355261
Participant

Hello gurus,

My requirement is to update every sales order item route VBAP-ROUTE on the save of the sales order :

I am using userexit USEREXIT_SAVE_DOCUMENT_PREPARE and I update table XVBAP[] (field ROUTE)

Everything is working fine but the schedule line dates are not updated !

If it's done manually :

How can I update schedule line dates programatically in the user exit USEREXIT_SAVE_DOCUMENT_PREPARE ?

PS: It's mandatory to do it on save.

0 Kudos

Were you able to resolve this issue? How did you resolve? If you could please elaborate, it would be very helpful.

former_member34
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Jai,

If you haven't already, please consider clicking the "I have a similar Question" button above. By doing this you will upvote and follow the question so you can be notified when updates to this question are made.

Thank you

Accepted Solutions (0)

Answers (3)

Answers (3)

jignesh_mehta3
Active Contributor
0 Kudos

Hello,

At the Client site I working, the Development for Re-determination of Route from a Z-table is placed in Program MV45AFZB,

May you can find one of the appropriate User Exits under MV45ZFZB and try.

Thanks,

VeselinaPeykova
Active Contributor
0 Kudos

Does it really have to be SAVE_DOCUMENT_PREPARE?

Probably the custom logic does not work as expected because by then scheduling is already done based on the information without any route?

I searched with criterion SAP route determination order exit and there is 0VRF0001, which seems to be a more appropriate option. Is there a particular reason why you cannot use 0VRF0001 instead of MV45AFZZ, SAVE_DOCUMENT_PREPARE?

former_member355261
Participant
0 Kudos

Yes it has to be SAVE_DOCUMENT_PREPARE because the data needed to read the custom Z table is available only when saving the document.

The exit 0VRF0001 doesn't provide the schedule lines table VBEP needed to read my custom Z table.

VeselinaPeykova
Active Contributor
0 Kudos

occoromomis in this case maybe it is safer to rethink the solution design (I understand that you are reluctant to do this, but still)... I am not sure if it is possible to trigger again scheduling at this point of document processing and if it is - how this would affect other areas depending on the data that was already determined.

Lakshmipathi
Active Contributor
0 Kudos

You have not explained, in the first instance, as to why you have gone for user exit. What is the Business Requirement and what you tried to achieve with the standard configuration?

former_member355261
Participant
0 Kudos

The business requirement is to update the item route on sales order save based on a custom Z table