on 2024 May 29 9:55 AM
I Want to Restrict users to close Production Order If Issue for Production is not completed even of Receipt for production is Not done both are mandatory.
Below is my SP_Transaction Notification
IF (@object_type = '202' AND @transaction_type= 'U')
BEGIN
if exists (
SELECT T0.[DocNum]
FROM OWOR T0 INNER JOIN WOR1 T1 ON T0.[DocEntry] = T1.[DocEntry]
WHERE T0.[CmpltQty] =0
and T1.[PlannedQty] > T1.[IssuedQty]
and T0.[Status] = 'L' and T0.DocEntry = @List_of_cols_val_tab_del)
Begin
set @error =1
set @error_message = 'Production Order can not be Closed,until issue and receipt done'
End
END
Request clarification before answering.
Hi,
What is the issue over here are you facing. Since I don't have system right now, I can't execute and check
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just a bracket issue. Check with this.
SELECT T0.[DocNum]
FROM OWOR T0 INNER JOIN WOR1 T1 ON T0.[DocEntry] = T1.[DocEntry]
WHERE (T0.[CmpltQty] =0
or T1.[PlannedQty] > T1.[IssuedQty])
and T0.[Status] = 'L' and T0.DocEntry = @List_of_cols_val_tab_del)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 26 | |
| 18 | |
| 14 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.