on 09-23-2019 4:32 PM
Hi guys,
Wondering if anyone can give some pointers. In our system, we want to prohibit users from canceling a sales order if there is already a picknote linked to the document. Or maybe a warning to pop up to notify them that the Sale order they want to cancel has a pick note linked to it.
Thank you
Hi Mohd Danish and thank you for your help.
I`ve tried your code, but since we are not using the PickRmrk field, when I implemented the code, it wouldn`t allow to cancel any orders, no matter if they were on pick lists or not. So I`ve replaced the PickRmrk field with PickStatus from RDR1, but with the new code it allows to cancel. Below is your code with my amends:
IF :Object_Type ='17' AND (:Transaction_Type = 'L' or :Transaction_Type = 'C')
THEN declare SOCL_var_0 varchar(100);
SELECT (SELECT Count (T0."DocEntry")
FROM ORDR T0 INNER JOIN OUSR T1 ON T0."UserSign" = T1."USERID" INNER JOIN RDR1 T2 ON T0."DocEntry" = T2."DocEntry"
WHERE T2."PickStatus"='R' and T0."DocEntry" = :list_of_cols_val_tab_del)
INTO SOCL_var_0 FROM DUMMY;
IF :SOCL_var_0 > 0 THEN SELECT 5076, 'Order has been release to pick list' INTO error, error_message FROM DUMMY;
END IF;
END IF;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear
try this TN
SAP HANA
IF :Object_Type ='17' AND (:Transaction_Type = 'L' or :Transaction_Type = 'C') THEN
declare SOCL_var_0 varchar(100);
SELECT
(SELECT Count (T0."DocEntry")
FROM ORDR T0
INNER JOIN OUSR T1 ON T0."UserSign" = T1."USERID"
WHERE T0."PicRmrk" IS NULL and T0."DocEntry" = :list_of_cols_val_tab_del) INTO SOCL_var_0 FROM DUMMY;
IF :SOCL_var_0 > 0 THEN
SELECT 5076, 'Cancelled/Close Remarks is must' INTO error, error_message
FROM DUMMY;
END IF;
END IF;
Danish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
the easiest way is using the Transaction Notification store procedure.
Kind regards
Agustín
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.