ORA-00947: Not Enough Values Error Running Allocation After Adding User Defined Non Key Field to LEDGER_STAT (Doc ID 1384230.1)

Last updated on JULY 28, 2017

Applies to:

Oracle Financial Services Profitability Management - Version 5.6 and later
Information in this document applies to any platform.
Oracle Financial Services Analytical Applications Infrastructure (OFSAAI)
Oracle Financial Services Analytical Applications (OFSAA)
Oracle Financial Services Profitability Management (PFT)



Symptoms

On Oracle Financial Services Profitability Management (PFT) 5.6, when attempting to run a Ledger_Stat allocation after adding a user defined field, FLAG (non key dimension), the following error occurs:

ERROR
Module Logging OFS errors: (203105) Oracle drv_oci error: OCI Function: [4] - oexec(),
oexn() SQL Function: [0] - SQL function not found! Oracle Error:
ORA- 00947: not enough
values Driver Function: drv_oci::Execute()

The cause is an incorrect SQL being generated:

Module Logging OFS Access module data: MERGE INTO LEDGER_STAT TARGET USING (SELECT (SUM
(IVW_SOURCE.IVWSRC_AMOUNT) * - 1 * DECODE (ISO_CURRENCY_CD,
'VND', 1, 1) ) BALANCE_AMOUNT, FINANCIAL_ELEM_ID, ORG_UNIT_ID,
GL_ACCOUNT_ID, COMMON_COA_ID, PRODUCT_ID, FROM_MIS_ORG_ID,
SEGMENT_ID, ISO_CURRENCY_CD
FROM (SELECT (Src.src_amount * Drv.drv_factor) IVWSRC_AMOUNT,
Src.FINANCIAL_ELEM_ID, Src.ORG_UNIT_ID, Src.GL_ACCOUNT_ID,
Src.COMMON_COA_ID, Src.PRODUCT_ID, Src.FROM_MIS_ORG_ID,
Src.SEGMENT_ID, Src.ISO_CURRENCY_CD
FROM (SELECT SUM(DECODE(a.year_s, 2011, a.month_08, 0) )
src_amount , a.FINANCIAL_ELEM_ID, a.ORG_UNIT_ID, a.GL_ACCOUNT_ID,
a.COMMON_COA_ID, a.PRODUCT_ID, a.FROM_MIS_ORG_ID, a.SEGMENT_ID,
a.ISO_CURRENCY_CD
from LEDGER_STAT a
...
UPDATE
SET TARGET.MONTH_08 = TARGET.MONTH_08 + SOURCE.BALANCE_AMOUNT,
BALANCE_TYPE_CD = 102, ytd_08 = ytd_07 + SOURCE.BALANCE_AMOUNT ,
ytd_09 = ( ytd_07 + SOURCE.BALANCE_AMOUNT) + month_09 , ytd_10 =
(( ytd_07 + SOURCE.BALANCE_AMOUNT) + month_09) + month_10 ,
ytd_11 = ((( ytd_07 + SOURCE.BALANCE_AMOUNT) + month_09) +
month_10) + month_11 , ytd_12 = (((( ytd_07 +
SOURCE.BALANCE_AMOUNT) + month_09) + month_10) + month_11) +
month_12 WHEN NOT MATCHED THEN
INSERT (FINANCIAL_ELEM_ID, ORG_UNIT_ID, GL_ACCOUNT_ID,
COMMON_COA_ID, PRODUCT_ID, FROM_MIS_ORG_ID, SEGMENT_ID,
ACCUM_TYPE_CD, BALANCE_TYPE_CD, CONSOLIDATION_CD,
CURRENCY_TYPE_CD, FLAG, ISO_CURRENCY_CD, IDENTITY_CODE, MONTH_01,
MONTH_02, MONTH_03, MONTH_04, MONTH_05, MONTH_06, MONTH_07,
MONTH_08, MONTH_09, MONTH_10, MONTH_11, MONTH_12, YTD_01, YTD_02,
YTD_03, YTD_04, YTD_05, YTD_06, YTD_07, YTD_08, YTD_09, YTD_10,
YTD_11, YTD_12, YEAR_S )
VALUES ( SOURCE.FINANCIAL_ELEM_ID, SOURCE.ORG_UNIT_ID,
SOURCE.GL_ACCOUNT_ID, SOURCE.COMMON_COA_ID, SOURCE.PRODUCT_ID,
SOURCE.FROM_MIS_ORG_ID, SOURCE.SEGMENT_ID, 'D' , 102 , 100 , 0 , <= Missing value for FLAG
SOURCE.ISO_CURRENCY_CD, 16202.000000 , 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, SOURCE.BALANCE_AMOUNT, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0,
0, 0, 0, SOURCE.BALANCE_AMOUNT , SOURCE.BALANCE_AMOUNT ,
SOURCE.BALANCE_AMOUNT , SOURCE.BALANCE_AMOUNT ,
SOURCE.BALANCE_AMOUNT , 2011)


The issue can be reproduced at will with the following steps:
1. Add a user defined non key leaf field to Ledger_Stat
2. Create and run and allocation which outputs to Ledger_Stat
==> Find the incorrect SQL.

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