R12: JBO-27122 Error Clicking on the Details Tab for Expense Report in iExpenses Enquiry (Doc ID 1385038.1)

Last updated on SEPTEMBER 14, 2016

Applies to:

Oracle Internet Expenses - Version 12.1.3 and later
Information in this document applies to any platform.

Symptoms

Clicking on the Details Tab for Expense Report in iExpenses Enquiry, the following error occurs.

ERROR
-----------------------

oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT erp.PARAMETER_ID AS PARAMETER_ID,
nvl(erp.WEB_FRIENDLY_PROMPT, erp.PROMPT) AS WEB_PROMPT,
erp.PROMPT AS PROMPT, erp.REQUIRE_RECEIPT_AMOUNT AS REQUIRE_RECEIPT_AMOUNT,
nvl(erp.prompt, 'ITEM') AS ITEM_DESCRIPTION,
nvl(erp.line_type_lookup_code, 'ITEM') AS LINE_TYPE_LOOKUP_CODE,
erp.CARD_EXP_TYPE_LOOKUP_CODE AS CARD_EXP_TYPE_LOOKUP_CODE,
nvl(erp.JUSTIFICATION_REQUIRED_FLAG,'N') AS JUSTIFICATION_REQUIRED, erp.CALCULATE_AMOUNT_FLAG
AS CALCULATE_AMOUNT_FLAG,
erp.AMOUNT_INCLUDES_TAX_FLAG AS AMOUNT_INCLUDES_TAX_FLAG,
erp.PA_EXPENDITURE_TYPE AS PA_EXPENDITURE_TYPE,
erp.COMPANY_POLICY_ID,
erp.CATEGORY_CODE,
erp.END_DATE,
erp.ITEMIZATION_REQUIRED_FLAG,
erp.ITEMIZATION_ALL_FLAG,
erp.RECEIPT_REQUIRED_FLAG,
erp.data_capture_rule_id
FROM AP_EXPENSE_REPORT_PARAMS erp, AP_EXPENSE_REPORTS er
WHERE erp.EXPENSE_REPORT_ID = er.EXPENSE_REPORT_ID
-- Include Expense Type if it either belongs to the requested Template
-- or if it is marked as "Viewable From All Tempaltes
AND (erp.EXPENSE_REPORT_ID = :1 OR
erp.WEB_ENABLED_FLAG = 'Y')
AND erp.CATEGORY_CODE IS NOT NULL
AND (('PER_DIEM' = :2 AND erp.CATEGORY_CODE = 'PER_DIEM') OR
('MILEAGE' = :3 AND erp.CATEGORY_CODE = 'MILEAGE') OR
(erp.CATEGORY_CODE <> 'PER_DIEM' AND erp.CATEGORY_CODE <> 'MILEAGE'))
AND er.WEB_ENABLED_FLAG = 'Y'
AND ('READ_ONLY_MODE' = :4 OR
(trunc(sysdate) <= trunc(nvl(er.INACTIVE_DATE, sysdate)) + nvl(fnd_profile.value('AP_WEB_POLICY_GRACE_PERIOD'), 0) AND
('AUDIT' = :5
or
trunc(sysdate) <= trunc(nvl(erp.END_DATE, sysdate)) + nvl(fnd_profile.value('AP_WEB_POLICY_GRACE_PERIOD'), 0))))) QRSLT ORDER BY WEB_PROMPT


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Query the expense report.
2. Click on details in the expense report
3. Error appears.

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