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'
Begin
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
)
BEGIN
SELECT @Error = 1, @error_message = 'Actual Issued must be equal to planned quantity'
END
END
Hope this will help to block the Transaction :smile: .
Thanks & Regards,
Manish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
3 | |
3 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 |