Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member184146
Active Contributor
2,557

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

1 Comment
Labels in this area