I need help regarding the Sales order item category redetermination.
we are having two item categories YNAE and YNAG and it contains schedule line categories CP and CB ( i.e for item category YNAE schedule line category is CP and for item category YNAG schedule line category is CB),
for YNAG Purchase Requisition is automatically created becz of functional setting on save and it is working fine.
For every line item in sales order line item level item category YNAE will be determined by default as per functional settings.
Now my requirement is that, if sales order line item doesn't contain 100% confirmed quantity, than i needs to change the default line item category YNAE to YNAG which i am trying to do it in USEREXIT_PRICING_PREPARE_TKOMP becz in this exit i am getting the values in XVBAP and XVBEP and it is working fine .
But schedule line category is not getting redetermined automatically what i mean is, if i change the item category to YNAG from YNAE in user exit corresponding schedule line category CB of YNAG is getting determined automatically at the schedule line level and if ichange the schedule line categories in XVBEP in exit USEREXIT_PRICING_PREPARE_TKOMP, changes are reflecting at the schedule line level but Purchase requisation is not getting created for schedule line on SAVE and its delivary dates are also not getting determined properly. If i press the option ATP check at the schedule line level than very things will getting corrected.
I feel that i am not doing this in proper way, do u have any idea about how to redetermine item category. please let me know if u have any idea .
USEREXIT_PRICING_PREPARE_TKOMP is the wrong location - that exit is for pricing communication preparation only. Your primary location for item category determination is USEREXIT_SOURCE_DETERMINATION (MV45AFZB). In your simple scenario, you could consider making an availability check at this point with some assumptions and then assign the item category accordingly. Otherwise, you can re-assign item category and schedule line category in USEREXIT_MOVE_FIELD_TO_VBEP. The exit is called once before ATP (for ATP-relevant schedule line categories) and once afterwards. The call is recursive if you re-assign another ATP-relevant category.
If i change the sales order line and schedule line's item catergories in the user exit USEREXIT_MOVE_FIELD_TO_VBEP. it is item categories are updating properly but schedule line items are not determining properly, i.e system showing only one shedule line which is created for YNAE before i am did the changes in the user exit USEREXIT_MOVE_FIELD_TO_VBEP.
Kindly help me.
I am having two item categories YNAE and YNAG, for YNAG Purchase Requisation will be created and assigned automatically according to functional configuration. when i change the item cat from YNAG to YNAE at shedule line level, Purchase Requisation which is created for YNAG is not getting deleted from shedule line.