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

Re: Resstrict production qty more than sale order

$
0
0

Hi,

 

Please try this:

 

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

(@Object_type = 202)

BEGIN

If EXISTS (SELECT T0.Docentry FROM OWOR T0 LEFT join RDR1 T1 on  T0.[Project]  =  T1.[Project] INNER JOIN ORDR T2 ON T1.[DocEntry] = T2.[DocEntry]

WHERE T1.[Quantity] <> T0.[PlannedQty] and  T2.[DocNum]  =  T0.[OriginNum]   and  T0.[ItemCode]  =  T1.[ItemCode] and  T0.[Status]  = 'P' and T0.[Docentry] = @list_of_cols_val_tab_del)

 

 

Begin

SET @error = -1

SET @error_message = N'Planned quantity is more than sales order quantity'

End

END

 

Thanks


Viewing all articles
Browse latest Browse all 2800

Trending Articles



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