Notifications
Clear all
Nov 29, 2024 8:32 am
Tình huống: ngăn người dùng thay đổi Planned Qty của các thành phần (component) trong lệnh sản xuất (Production Order)
Giải pháp: tạo Transaction Notification để phát hiện và chặn tình huống trên.
IF @object_type='202' AND @transaction_type = 'U' BEGIN IF exists ( SELECT T0.DocEntry FROM OWOR T0 inner join WOR1 T1 on T0.DocEntry = T1.DocEntry left join AWOR T2 on T2.DocEntry = T0.DocEntry left join AWO1 T3 on T3.LogInstanc = T2.LogInstanc and T3.DocEntry=T2.DocEntry and T1.LineNum=T3.LineNum WHERE T0.DocEntry = @list_of_cols_val_tab_del and T0.Status = 'R' and T3.LogInstanc = (Select MAX(AWO1.loginstanc) from AWO1 where AWO1.docentry =@list_of_cols_val_tab_del ) and T1.PlannedQty<>T3.PlannedQty ) BEGIN SET @error = 20201 SET @error_message = 'You are not allowed to change Planned Qty of components in Released Production Order' END END
8 Replies
Dec 27, 2024 7:20 pm
@Trungagain Nếu xuất các nguyên liệu thành phần luôn đúng theo định lượng của BOM, bạn có thể sử dụng phương thức Issue Method là Backflush. Theo đó, khi thực hiện nhập kho thành phẩm, hệ thống SAP B1 sẽ thực hiện xuất kho tự động theo số lượng đã được khai báo.