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

Re: Purchase Order Quantity Stored Procedure

$
0
0

IF @object_type= '22' AND @transaction_type in ('A')

BEGIN

IF EXISTS (select r.DocEntry from opor r inner join por1 r1 on r.docentry=r1.DocEntry

where  r1.Quantity > ISNULL(r1.YOUR_UDF_FIELD, 0) AND r.DOCENTRY= @list_of_cols_val_tab_del)

BEGIN

SELECT @Error = 1, @error_message = 'Change the Quantity'

END

END

 

 

It is better to add ISNULL to make sure the value is comparable.


Viewing all articles
Browse latest Browse all 3229

Trending Articles



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