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

Re: SP_TN for Production Order

$
0
0

Use this,

 

IF @OBJECT_TYPE = '202' AND @TRANSACTION_TYPE = 'U'

BEGIN

IF EXISTS(

SELECT T0.DocEntry ,t0.CmpltQty , t1.IssuedQty FROM OWOR T0 inner join wor1 t1 on t0.DocEntry =t1.DocEntry

WHERE T0.DocEntry = @list_of_cols_val_tab_del and (t0.CmpltQty <1 or t1.IssuedQty <1 ) and t0.Status='L'

 

 

)

BEGIN

SELECT @ERROR=1,@ERROR_MESSAGE='You cant change the Document without issue or completion of production Order'

END

 

END


Viewing all articles
Browse latest Browse all 2878

Trending Articles



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