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

Re: Stored Procedure

$
0
0

Hi

 

Try This

IF @transaction_type IN (N'A', N'U') AND

(@Object_type = N'20')

begin

if exists (SELECT T0.BaseEntry, SUM(T0.Quantity)

FROM [dbo].[PDN1] T0 INNER

JOIN [dbo].[POR1] T1 ON T1.DOCENTRY =

T0.BASEENTRY

WHERE T0.BaseType = 22 AND T0.ItemCode =

T1.ItemCode AND T0.BaseLine = T1.LineNum

and T0.DOCENTRY = @list_of_cols_val_tab_del

GROUP BY T0.BaseEntry

HAVING (SUM(T0.Price)> SUM((T1.Price /100*110))))

begin

select @Error = 10, @error_message = 'GRPO Unit Price is greater than PO quantity'

end

end

 

With Regards

 

Balaji Sampath


Viewing all articles
Browse latest Browse all 8902

Trending Articles



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