Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9269

Re: Is it possible to restrict creation of Issue Component and Report Completion against a Production Order ?

$
0
0

Hi Sameer Ji,

Try this SP...

I have testes at my end it's working fine.

 

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 = 'Please Complete Issue For Production First'

END

ELSE

SELECT @Error = 1, @error_message = 'Please Complete Issue For Production First'

END

 

11.JPG


Viewing all articles
Browse latest Browse all 9269

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>