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

SP notification for service type GRPO blocking if Total Line is greater than Open amount

$
0
0

Hi Expert,

 

I need your help for this request,

 

I try to block adding a Service type Good receipt PO if the total Line is greater than the Open Amount for this line in the Purchase Order. I can make it work with the Quantity in the Item type but that doesn't work for the value in the Service type.

 

Here it's my code in my SP_TransactionNotification:

===========================================================================================================

IFEXISTS(SELECT a.BaseEntry FROM PDN1 a, POR1 b WHERE a.DocEntry=@list_of_cols_val_tab_del

AND a.BaseEntry=b.DocEntry AND a.BaseLine=b.LineNum

AND(a.linetotal >=b.OpenSum))


BEGIN

 

SET @error_message='Cannot be greater than Open Amount'


RETURN (1)

 

END

=============================================================================================================

Last thing if more than 1 GRPO is created base on the same PO we need to be sure the total of each line of all the GRPO are not exceeding the PO value.

 

Hope I'm clear enough.

 

Thanks

 

Eric


Viewing all articles
Browse latest Browse all 9052

Trending Articles



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