Skip to Content
0
Former Member
Jun 15, 2011 at 03:18 PM

Question about VOFM -> Scheduling Formula

98 Views

Howdy,

I'm working on a task where the Sales Document: Schedule Line Data table (VBEP) needs to be updated with a custom rejection reason (field j_3aabgru) when certain criteria are met. I've created a customer scheduling formula and in that formula, I am doing the following:

LOOP AT xvbep INTO vbepvb.

Within this loop, I check whether specific criteria are met and if they are, the following code is executed:

vbepvb-j_3aabgru = 'Y0'.
MODIFY xvbep FROM vbepvb.

Everything runs correctly and my expectation is that behind the scenes at some point, VBEP is populated from XVBEP and the records are updated in the database table. In some cases, this works fine; however there are other cases where this logic fires, XVBEP is updated correctly in the formula but when the scheduling strategy that this formula is assigned to finishes and control is returned to the calling program (e.g. VA02), the rejection reason field is blank.

I am at a loss to explain why this is.

Alternatively, for those orders where the VBEP logic does not work I tried performing the same logic using table XOSHE. The custom rejection codes show up for the schedule line items correctly in VA02 once the scheduling strategy is complete, but when I save my data the message "No data was changed" is issued and VBEP is not updated.

I am clearly missing some critical mechanic here, and admittedly SD is not my strong suit. Can some one please explain to me what's going on? Is there a different table I should be using within this formula to update the schedule line table?

Thanks in advance!