Skip to Content
0

Receipt from Production without Issue for Production (Manual Use)

Oct 02, 2017 at 06:59 AM

34

avatar image

Hi All,

I am using SAP B1 9.2 and i have a issue where a client wishes to issue additional quantities after he has already issued the initially planned quantity and am using this code below to stop doing receipts from production before the planned quantities have been issued. can someone help me edit this SP so that even after i have done a first issue and then i edit the order to add more quantities i can issue them and report completion? 
IF @transaction_type = 'A' AND @Object_type = '59'
BEGIN
IF EXISTS (SELECT T0.DOCENTRY FROM dbo.IGN1 T0 WHERE T0.DOCENTRY = @list_of_cols_val_tab_del)
BEGIN
DECLARE @entry INT
SELECT @entry = T0.BASEENTRY FROM dbo.IGN1 T0 WHERE T0.DOCENTRY = @list_of_cols_val_tab_del
IF EXISTS (SELECT T1.ITEMCODE, T1.PLANNEDQTY, T2.QUANTITY, T2.BASEENTRY AS ISSUED QTY FROM dbo.OWOR T0 INNER JOIN dbo.WOR1 T1
ON T0.DOCENTRY = T1.DOCENTRY LEFT OUTER JOIN dbo.IGE1 T2 ON T2.BASEENTRY = T0.DOCENTRY AND T1.ITEMCODE = T2.ITEMCODE
WHERE T1.PLANNEDQTY > ISNULL(T2.QUANTITY, 0) AND T0.DOCENTRY = @entry)
SELECT @Error = 1, @error_message = 'Components NOT ISSUED'
END
ELSE
SELECT @Error = 1, @error_message = 'Components NOT ISSUED'
END
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers