on 05-28-2016 9:08 AM
Dear Experts,
If for item A having 50 qty in sale order no 1. Then production order is added for that sale order selecting that sale order and project code. if sale order no and project code matches then production planning qty should not more than sale order qty.
Thanks & Regards,
Hiren
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sir,
Thanks a lot for your quick response!
it is not allowing for more quantity in one production order but in case if add more production orders it is allowing.
eg: sale order qty is 5. in production order no 1 , if I add qty 6 it is not allowing . but if i add qty 4 in this production order and opening other production order and now I am giving qty 2 this time it is allowing.
any solution for this
Thanks & regards,
Hiren
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.