You have encountered an Unexpected Error. While Opening a Contract pending Approval or Submitting it for Approval (Doc ID 1962043.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle Procurement Contracts - Version 12.1.3 and later
Information in this document applies to any platform.

Symptoms

On :  12.1.3 version, Contracts Repository, there is an error while submitting a contract for Approval or opening a contract that has been submitted for approval. The following error occurs:

Error
You have encountered an Unexpected Error. Please contact the system administrator.
Click here for Exception details

Details show:
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation
Statement:
 SELECT DISTINCT orc.action_code action_code,
 decode(fl.meaning,'Cancel
 Contract','Cancel','Sign Contract','Sign','Terminate
 Contract','Terminate',fl.meaning) action_name
   FROM okc_rep_con_actions orc,
 fnd_lookups fl
   WHERE orc.status_code = :1
  AND fl.lookup_code =
 orc.action_code
   AND fl.lookup_type =
 'OKC_REP_CON_ACTIONS'
   AND (:2 is null OR orc.action_code <> :3)
   AND (:4 is null OR orc.action_code <> :5)
   AND nvl(disabled_flag, 'N') =
 'N'
   AND ((OKC_REP_UTIL_PVT.has_contract_access(:6,
 'OKC_REP_AU_UPDATE') = 'T' AND orc.page_mode = 'UPDATE')
   OR (OKC_REP_UTIL_PVT.has_contract_access(:7, 'OKC_REP_AU_SELECT') = 'T'
 AND orc.page_mode = 'VIEW'))
   AND (:8 is null OR orc.action_code <> :9)  
wf.plsql.WF_EVENT.raise2.Begin 2 Event Name:oracle.apps.fnd.framework.OAFatalError Event
 Key:2326174   ...

Steps to Reproduce:

The issue can be reproduced at will with the following steps:
A.
1) Go to Contract Workbench Administrator > Contracts > Create Contracts
2) Enter mandatory details and click submit for Approval  OR Open a contract in Pending Approval Status.
3) Error received.

B. Checking the Worklflow for a test contract '22222'
 Workflow has also failed with the following Error;
Workflow Errors: OKCREPMA, 10189, 22222:10189  
Failed Activity        Is Approval Complete
Activity Type        Function
Error Name        -20001
Error Message        ORA-20001: No rules are applicable to this transaction.
Atleast one rule must apply to this transaction when the value of the attribute AT_LEAST_ONE_RULE_MUST_APPLY is true.
Error Stack      
 AME_ENGINE.evaluateRules(8025439)
AME_ENGINE.updateTransactionState(8025440)
AME_ENGINE.getNextApprovers(8025441) AME_API2.getNextApprovers1(8025442)
 OKC_REP_WF_PVT.is_approval_complete(OKCREPMA, 10189, 286774, RUN)
Wf_Engine_Util.Function_Call(OKC_REP_WF_PVT.is_approval_complete,
OKCREPMA, 10189, 286774, RUN)

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms