Hi experts,
Please see screenshots and code below.
I would like to be able to restrict the Categories of Sales Contracts that can be awarded by users that have allocated a permission (NP_CM_L1_AWARD) set that allows them to Award Sales Contracts.
For instance I do not want them to be able to Award Contracts category L2 or L3.
I am having the “mutating” issue.
Could you please advise on any ideas on how to overcome this issue?
Many thanks
Miguel
DECLARE
invalid_code EXCEPTION;
invalid_str VARCHAR2(100);
CATEGORY1_NAME VARCHAR2(100);
category_ VARCHAR2(100);
BEGIN
select CATEGORY1_NAME into category_
from
IFSAPP.SALES_CONTRACT;
IF category_ in ('NP_STANDARD_L2','NP_STANDARD_L3')
THEN
invalid_str := 'NP Error - You cannot Award a Sales Contract Category L2 or L3!';
RAISE INVALID_CODE;
END IF;
EXCEPTION
WHEN INVALID_CODE THEN
Error_SYS.system_general('System Error: '||INVALID_STR);
END;