SAP Note 334524 - Reason for rejection on item not set automatically

Component : Sales and Distribution -

Solution : https://service.sap.com/sap/support/notes/334524 (SAP Service marketplace login required)

Summary :
Although all schedule lines in a sales order are rejected, the sales order item does not automatically update to "rejected", leaving the overall document status incomplete. The solution involves customizing the item rejection logic in the USEREXIT_SAVE_DOCUMENT_PREPARE user exit, where a specific code example provided allows setting the rejection reason 'ZL' for an item if all its schedule lines are rejected. This code ensures that the reason 'ZL' is also set to be irrelevant for billing purposes. Keywords include VA01, VA02, ABGRU, SAPMV45A.

Key words :
additional key words va01, customer-specific rules, v_tvag-fk_erl = 'x', document status remain, sets item reason, item status, item reason, item categories, schedule lines, sales order

Related Notes :

177219Configuration of reason f.rejection in sales orders