PFT 5.6 Static Driver and Static Driver Table Allocation On Ledger Stat Errors With ORA-01722 invalid number Driver Function (Doc ID 1405426.1)

Last updated on FEBRUARY 03, 2014

Applies to:

Oracle Financial Services Profitability Management - Version 5.6 to 6.0 [Release 5 to 6]
Information in this document applies to any platform.
Oracle Financial Services Analytical Applications Infrastructure (OFSAAI) - Version 7.2
Oracle Financial Services Analytical Applications (OFSAA) - Version 5.x

Checked for relevance on 03-Feb-2014.


Symptoms

On Oracle Financial Services Profitability Management (PFT) 5.6 a simple Static Driver allocations filtering on specific financial element in Ledger Stat and output to Ledger Stat is creating an incorrect merge insert SQL. The column order generated is incorrect for YEAR_S. This triggers an error when running the allocation.

ERROR
Module Logging OFS errors: (203105) Oracle drv_oci error: OCI Function: [4] - oexec(),
oexn() SQL Function: [189] - SQL function not found! Oracle
Error: ORA- 01722: invalid number Driver Function:
drv_oci::Execute()


The incorrect SQL generated is the last part of the Merge-Insert SQL:

Module Logging OFS Access module data: MERGE INTO LEDGER_STAT TARGET USING (
SELECT 11366.000000 identity_code, 2010 year_s , 'D'
accum_type_cd , 101 consolidation_cd , 101 balance_type_cd, 'EUR'
ISO_CURRENCY_CD , 60038.000000 FINANCIAL_ELEM_ID, GL_ACCOUNT_ID,
COMMON_COA_ID, PRODUCT_ID, SOURCE_AMOUNT * 1 * AMOUNT
BALANCE_AMOUNT , LEAF_NODE ORG_UNIT_ID
FROM (SELECT *
from (SELECT row_number() over (partition by a.PRODUCT_ID, a.COMMON_COA_ID, a.GL_ACCOUNT_ID order by a.PRODUCT_ID, a.COMMON_COA_ID, a.GL_ACCOUNT_ID) rw,
SUM(DECODE(a.year_s, 2010, a.month_08, 0) ) over (partition by a.PRODUCT_ID, a.COMMON_COA_ID, a.GL_ACCOUNT_ID) SOURCE_AMOUNT, a.PRODUCT_ID,
a.COMMON_COA_ID, a.GL_ACCOUNT_ID
from LEDGER_STAT a
where a.FINANCIAL_ELEM_ID=20039
and (a.identity_code) IN (select distinct a.parent_identity_code
from FSI_M_DATA_IDENTITY_DETAIL a
where a.identity_code in (11366)
and a.as_of_date = '08/ 31/ 2010'
and a.src_drv_type = 'S' )
and a.year_s IN (2010) )
where rw = 1 ) IVW_SOURCE1, (
SELECT LEVEL_NUM, PARENT_ROW_NUM, LEAF_NODE, AMOUNT
FROM FSI_M_ALLOC_TABLE_DETAILS T1
WHERE SYS_ID_NUM=208073.000000
AND ((T1.LEVEL_NUM=2)
OR EXISTS (SELECT NULL
FROM FSI_M_ALLOC_TABLE_DETAILS T2
WHERE T2.SYS_ID_NUM=T1.SYS_ID_NUM
AND T2.PARENT_ROW_NUM = T1.ROW_NUM
AND T2.PARENT_ROW_NUM = - 1)) CONNECT BY PRIOR ROW_NUM =
PARENT_ROW_NUM
AND SYS_ID_NUM=208073.000000 START WITH LEVEL_NUM=1
AND SYS_ID_NUM=208073.000000 ) IVW_SOURCE2
WHERE SOURCE_AMOUNT <> 0 ) SOURCE ON (TARGET.FINANCIAL_ELEM_ID =
60038.000000
AND TARGET.ORG_UNIT_ID = SOURCE.ORG_UNIT_ID
AND TARGET.GL_ACCOUNT_ID = SOURCE.GL_ACCOUNT_ID
AND TARGET.COMMON_COA_ID = SOURCE.COMMON_COA_ID
AND TARGET.PRODUCT_ID = SOURCE.PRODUCT_ID
AND TARGET.YEAR_S = 2010
AND TARGET.IDENTITY_CODE = 11366.000000
AND TARGET.ISO_CURRENCY_CD = 'EUR'
AND TARGET.CONSOLIDATION_CD = 101
AND TARGET.ACCUM_TYPE_CD = 'D' ) WHEN MATCHED THEN
UPDATE
SET TARGET.MONTH_08 = TARGET.MONTH_08 + SOURCE.BALANCE_AMOUNT,
BALANCE_TYPE_CD = 101, 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, ACCUM_TYPE_CD, BALANCE_TYPE_CD,
CONSOLIDATION_CD, CURRENCY_TYPE_CD, IDENTITY_CODE,
ISO_CURRENCY_CD, MONTH_01, MONTH_02, MONTH_03, MONTH_04,
MONTH_05, MONTH_06, MONTH_07, MONTH_08, MONTH_09, MONTH_10,
MONTH_11, MONTH_12, YEAR_S, YTD_01, YTD_02, YTD_03, YTD_04, <== YEAR_S appears here, when it should appear at the end after YTD_12
YTD_05, YTD_06, YTD_07, YTD_08, YTD_09, YTD_10, YTD_11, YTD_12 )
VALUES ( 60038.000000, SOURCE.ORG_UNIT_ID, SOURCE.GL_ACCOUNT_ID,
SOURCE.COMMON_COA_ID, SOURCE.PRODUCT_ID, 'D' , 101 , 101 , 0 , 'EUR' , 11366.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 , 2010) <== YEAR_S value is the last column

Steps to reproduce
The issue can be reproduced at will with the following steps:
1. Create a simple ledger_stat static driver * constant allocation
2. Run the allocation

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