Transaction Notification before Reciept of Final Product (Actual Issued must be equal to Actual Planned quantity in Production Order)
Hi all SAP experts,
Some days before i needed a Transaction Notification to Block the Receipt of final product whose actual issued quantity is not equal to planned quantity in production order. So first of all i tried to find on SCN and some other B1 sites but did not find any solution,then after that i made a Store procedure which i am sharing with you all.
IF @object_type=’59’ AND @transaction_type = ‘A’
IF EXISTS(SELECT B1.DocEntry
FROM OWOR A INNER JOIN
WOR1 A1 ON A.DocEntry = A1.DocEntry INNER JOIN
IGN1 B1 ON A.ItemCode = B1.ItemCode AND A.DocNum=B1.BaseRef
WHERE A1.PlannedQty<>A1.IssuedQty and a.ItemCode=B1.ItemCode
and B1.DocEntry = @list_of_cols_val_tab_del
GROUP BY A.DocNum,B1.ItemCode,A1.ItemCode,A1.PlannedQty,A1.IssuedQty,b1.DocEntry
SELECT @Error = 1, @error_message = ‘Actual Issued must be equal to planned quantity’
Hope this will help to block the Transaction 🙂 .
Thanks & Regards,