cancel
Showing results for 
Search instead for 
Did you mean: 

Schedule line category not redetermining after custom code changes item category value on sales orde

10-19-2026 7:39 PM
Joanna1998 Discoverer
24 views 0 comments
0 Likes
Subscribe

 

Hello gurus,

I have searched the whole internet for this but with no luck, hence I am seeking your advice. 

Requirement is: if user manually changes plant (VBAP-WERKS) on sales order or the system changes plant based on ABC process (not enough stock in one plant, so system changes to another plant), then change item category value (VBAP-PSTYV). Item category should be derived from custom table.

 

We put our code in USEREXIT_MOVE_F8ELD_TO_VBAP and the code works fine when the user changes the plant.

 

But the problem is with ABC process. The ABC/ATP does not retrigger once the item category is changed in userexit. And the ABC/ATP process happens only for 'old' item category value and determines schedule line category only for old PSTYV. I debugged and saw that old schedule line is stored in MVERF structures. Even though the correct schedule line is derived later on in the code based on FM rv_scheduling _type_ determine, it gets later on overwritten with old schedule line values stored in MVERF.

 

Any ideas how to solve this would be highly appreciated, thank you

0 Likes

Accepted Solutions (0)

Answers (0)