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

Re: SP_TN for Production Order

$
0
0

Use this,

 

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

BEGIN

IF EXISTS(

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

WHERE T0.DocEntry = @LIST_OF_COLS_VAL_TAB_DEL and (t0.CmpltQty >0 or t1.IssuedQty >0 and t0.Status='R')

 

 

)

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 2695

Trending Articles



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