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

Re: TN to block WO Planned quantity more than SO quantity

$
0
0

revised version

 

IF(@object_type ='68')and(@transaction_type in('A','U'))

  BEGIN

   IFExists(SELECT T0.DocEntry

     FROM OWOR T0

INNERJOIN ORDR T1 ON T0.OriginNum = T1.DocNum

INNERJOIN RDR1 T2 ON T1.DocEntry = T2.DocEntry

   WHERE  T0.PlannedQty > T2.Quantity AND T0.OriginNum = T1.DocNum AND T0.ItemCode = T2.ItemCode

     AND T0.DocEntry = @list_of_cols_val_tab_del)

  Begin

   SET @error = 14999

   SET @error_message ='Planned quantity more than SO quantity'

End

End


Viewing all articles
Browse latest Browse all 9129

Trending Articles



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