Mapping Deployment Warning - ORA-06550, PLW-07204

While deploying a mapping, I receive a warning
ORA-06550 and PLW-07204: conversion away from column type may result in sub-optimal query plan.
Any ideas on why this might be happening?
Thanks!

Hi,
I think you are trying to conert the datatype of your column
Amrit

Similar Messages

  • Warning (22,14): PLW-07204: may not be the conversion rate as a column.....

    Good morning
    To implement the following procedure from Oracle XE not me taking the last block, which shows me the following error at line 22 -> Warning (22,14): PLW-07204: may not be the conversion of column type will result in a suboptimal query plan
    create or replace Procedure Parse_EAN( pi_EAN In Number
    , pi_Banco In Number
    , pi_Num_Cuenta In Number )
    As
    v1 utl_file.file_type;
    v2 varchar2(100);
    Begin
    v1 := utl_file.fopen('PUBLIC_ACCESS','prueb' || to_char(sysdate, 'yyyymmdd') || '.dba', 'w');
    v2 := '01' || LPAD(pi_EAN, 13, 0) || TO_CHAR(TRUNC(SYSDATE), 'YYYYMMDD') ||
    LPAD(pi_Banco, 3, 0) || LPAD(pi_Num_Cuenta, 15, 0) || ' ';
    utl_file.put_line(v1, v2);
    For rec in (SELECT '02' || LPAD(PG.CODIGO_CUENTA, 25, 0) || LPAD(PG.VALOR_PAGO, 13, 0) ||
    LPAD(PG.COD_PROCEDENCIA, 2, 0) || LPAD(ROWNUM + 1, 7, 0) || ' ' cuerpo
    FROM PAGOS PG
    WHERE PG.EAN = pi_EAN) Loop
    utl_file.put_line(v1, rec.cuerpo);
    End Loop;
    For rec in _(SELECT '09' || LPAD(COUNT(PG.CODIGO_CUENTA), 9, 0) ||_
    LPAD(SUM(PG.VALOR_PAGO), 18, 0) || ' ' final1
    FROM PAGOS PG
    WHERE PG.FECHA_PAGO = (SELECT TO_CHAR(SYSDATE,'DD/MM/YYYY') FROM DUAL)
    AND PG.EAN = pi_EAN) Loop
    utl_file.put_line(v1, rec.final1);
    End Loop;
    utl_file.fclose(v1);
    Exception
    when others then
    dbms_output.put_line(sqlerrm);
    End;
    What should I do to run the whole procedure?
    tables...
    CREATE TABLE "PAGOS"
    (     "ID_PAGOS" NUMBER NOT NULL ENABLE,
         "CODIGO_BARRAS" VARCHAR2(62),
         "EAN" NUMBER(13,0),
         "CODIGO_CUENTA" NUMBER(18,0) NOT NULL ENABLE,
         "VALOR_PAGO" NUMBER(13,0) NOT NULL ENABLE,
         "FECHA_PAGO" DATE DEFAULT SYSDATE NOT NULL ENABLE,
         "NUM_LOTE" NUMBER DEFAULT NULL NOT NULL ENABLE,
         "COD_PROCEDENCIA" NUMBER DEFAULT 1 NOT NULL ENABLE,
         "FECHA_MODIFICACION" DATE DEFAULT SYSDATE NOT NULL ENABLE,
         "MODIFICADO_POR" VARCHAR2(50) DEFAULT USER NOT NULL ENABLE,
         "NRO_DOCUMENTO" NUMBER(9,0) NOT NULL ENABLE,
         CONSTRAINT "PAGOS_PK" PRIMARY KEY ("ID_PAGOS") ENABLE,
         CONSTRAINT "PAGOS_UK2" UNIQUE ("CODIGO_CUENTA", "NUM_LOTE", "FECHA_PAGO", "VALOR_PAGO") ENABLE,
         CONSTRAINT "PAGOS_UK1" UNIQUE ("CODIGO_BARRAS", "FECHA_PAGO") ENABLE
    ALTER TABLE "PAGOS" ADD CONSTRAINT "PAGOS_PROCEDENCIA_PAGO_FK1" FOREIGN KEY ("COD_PROCEDENCIA")
         REFERENCES "PROCEDENCIA_PAGO" ("ID_PROC_PAGOS") ENABLE
    and...
    CREATE TABLE "PROCEDENCIA_PAGO"
    (     "ID_PROC_PAGOS" NUMBER NOT NULL ENABLE,
         "DESCRIPCION_PAGO" VARCHAR2(80) NOT NULL ENABLE,
         "FECHA_MODIFICACION" DATE DEFAULT SYSDATE NOT NULL ENABLE,
         "MODIFICADO_POR" VARCHAR2(60) DEFAULT USER NOT NULL ENABLE,
         CONSTRAINT "PROCEDENCIA_PAGO_PK" PRIMARY KEY ("ID_PROC_PAGOS") ENABLE,
         CONSTRAINT "PROCEDENCIA_PAGO_UK1" UNIQUE ("ID_PROC_PAGOS", "DESCRIPCION_PAGO") ENABLE,
         CONSTRAINT "PROCEDENCIA_PAGO_UK2" UNIQUE ("DESCRIPCION_PAGO") ENABLE
    CREATE OR REPLACE TRIGGER "PROCEDENCIA_PAGO_TRG"
    before insert on PROCEDENCIA_PAGO
    for each row
    BEGIN
    SELECT PROCEDENCIA_PAGO_SEQ.NEXTVAL INTO :NEW.ID_PROC_PAGOS FROM DUAL;
    END;
    ALTER TRIGGER "PROCEDENCIA_PAGO_TRG" ENABLE
    Thank you very much for your cooperation_
    GOOD DAY ..._

    this is my solution
    trunc (pi_Fecha) the variable
    truncated variable that goes into the procedure trunc (variable) Parse_ean (x, y, z, variable)
    in this case the variable that enters pi_Fecha
    create or replace
    Procedure Parse_EAN( pi_EAN In Number
    , pi_Banco In Number
    , pi_Num_Cuenta In Number
    , pi_Fecha In Date)
    As
    v1 utl_file.file_type;
    v2 varchar2(100);
    fecha varchar2(8);
    Begin
    -- Aqui inicia el bloque de proceso que generar el archivo de Acuavalle.
    IF (pi_Ean = 7709998001589) then
    v1 := utl_file.fopen('PUBLIC_ACCESS','0'|| LPAD(pi_Banco,3,0)
    || to_char(pi_Fecha, 'yyyymmdd') || '.dba', 'w');
    v2 := '01' || LPAD(pi_EAN, 13, 0) || TO_CHAR(TRUNC(pi_Fecha), 'YYYYMMDD')
    || LPAD(pi_Banco, 3, 0) || LPAD(pi_Num_Cuenta, 15, 0)
    || ' ';
    utl_file.put_line(v1, v2);
    For rec in (SELECT '02' || LPAD((PG.CODIGO_CUENTA)||(NRO_DOCUMENTO), 25, 0)
    || LPAD(PG.VALOR_PAGO, 13, 0) || LPAD(PG.COD_PROCEDENCIA, 2, 0)
    || LPAD(ROWNUM + 1, 7, 0) || ' ' cuerpo
    FROM PAGOS PG
    WHERE PG.EAN = pi_EAN) Loop
    utl_file.put_line(v1, rec.cuerpo);
    End Loop;
    select to_char(sysdate,'DD/MM/RR')
    into Fecha
    from dual;
    For rec in (Select '09'
    || LPAD(COUNT(VALOR_PAGO), 9, 0)
    || lpad(sum(PG.VALOR_PAGO), 18,0)
    ||' ' final1
    From pagos PG
    Where PG.FECHA_PAGO = pi_Fecha
    AND PG.EAN = pi_EAN) Loop
    utl_file.put_line(v1, rec.final1);
    End Loop;
    utl_file.fclose(v1);
    end if;
    -- Aqui termina el bloque de proceso que generar el archivo de Acuavalle.
    Exception
    when others then
    dbms_output.put_line(sqlerrm);
    End;
    Edited by: Rey-user6318244 on 24/03/2009 11:47 PM

  • Deployment error ( ORA - 06550 )

    Oracle Lite 10.2.0.1
    Windows XP 2002
    We have published an application for the Oracle Lite WEB platform. When attempting to deploy to a laptop with a Windows XP operating system, the setup goes until the sync step and then ABENDS with the following error:
    Sync session exception stack trace:
    java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'CONS_EXT.SET_CURR_CLIENT' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ORA-06550: line 1, column 38:
    PLS-00201: identifier 'CONS_EXT.SET_CURR_DEVICE' must be declared
    ORA-06550: line 1, column 38:
    PL/SQL: Statement ignored
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:242)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:554)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1478)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:888)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2077)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1987)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2704)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:458)
         at oracle.lite.sync.Subscription.executeAndClose(Unknown Source)
         at oracle.lite.sync.HeliosSession.startSession(Unknown Source)
         at oracle.lite.sync.resume.Client$1.run(Unknown Source)
         at oracle.lite.sync.resume.ThreadPool$PoolTask.run(Unknown Source)
    Got anything that will solve this? Is this an internal error in Olite or would this be a problem with our code?
    Message was edited by:
    gotgriz

    Obviously the CONS_EXT package was not getting created. We found that the grants on the database were set up so that SYS.DBMS_LOB was not public(the DBA said the default values were used when the database was created). So when the REPWIZARD attempted to create the CONS_EXT package it couldn't. Changed the SYS.DBMS_LOB to public drop the MOBILEADMIN user and reran the REPWIZARD. The CONS_EXT package was created. The deployment worked.
    Found the solution under Doc ID: Note: 298391.1
    Subject: Synchronization Fails with the Error Cns-9025 ORA-22275

  • Deployment of a OWB Map-ORA-06550

    I created a map that uses two source modules that
    point to two different Oracle schemas and instances.
    The two tables from which data is imported are PAT_RESULTS and PATIENT tables. Both tables are in the schema CCDBA. One table
    STAFF_ALT_ID is in the schema CCDEV.
    The target data for the map is a UNIX file.
    The File connector from the target to the CCDEV schema
    is FILE_CONNECTOR.
    The file connector from the target to the CCDBA schema
    is FILE_CONNECTOR_ODOULS.
    When I deploy the map I get ORA-06550, the Deployment
    Manager cannot find the PAT_REULTS table.
    When I look at the package body, the file connector referenced for the PAT_RESULTS table is a different
    connector than the PATIENT table even though they live in the same schema, i.e. CCDBA.
    (See PL/SQL select statement below).
    Why can't the deployment manager "see" this table?
    Why does PAT_RESULTS have a different file connector?
    The meta-data imported for the table,PAT_RESULTS is the same DBlink as the deployment operation.
    Any help would be appreciated.
    PL/SQL select below
    SELECT
    "PAT_RESULTS_FILE_CON266982"."FACILITY_ID" "FACILITY_ID",
    "PATIENT_FILE_CONNECTOR_ODOULS"."PATIENT_ID" "PATIENT_ID",
    "PAT_RESULTS_FILE_CON266982"."RESULT_SEQ" "RESULT_SEQ",
    "PAT_RESULTS_FILE_CON266982"."RESULT_VALUE" "RESULT_VALUE",
    (TODATE("PAT_RESULTS_FILE_CON266982"."PERFORM_DDT")) "PERFORM_DATE",
    "STAFF_ALT_ID_FILE_CONNECTOR"."ALT_STAFF_ID" "ALT_STAFF_ID",
    "STAFF_ALT_ID_FILE_CONNECTOR"."SOURCE_SYSTEM" "SOURCE_SYSTEM",
    "PAT_RESULTS_FILE_CON266982"."ABNORMAL_FL" "ABNORMAL_FL"
    FROM "STAFF_ALT_ID" "STAFF_ALT_ID_FILE_CONNECTOR",
    "PATIENT" "PATIENT_FILE_CONNECTOR_ODOULS",
    "PAT_RESULTS" "PAT_RESULTS_FILE_CON266982" WHERE ( "STAFF_ALT_ID_FILE_CONNECTOR"."STAFF_ID" = "PAT_RESULTS_FILE_CON266982"."CHART_ID" ) AND
    ( "PATIENT_FILE_CONNECTOR_ODOULS"."PAT_SEQ" = "PAT_RESULTS_FILE_CON266982"."PAT_SEQ" ) AND
    ( "PAT_RESULTS_FILE_CON266982"."LABEL_SEQ" IN ( 1013 , 1014 , 1015 , 1016 ) );

    Hi,
    You ca n do it by changing the load type of target table.
    As you said, the conditions will be different for each load type insert, update and delete.
    The flow will be in the following way.
    Source ---> splitter (Here you need to define the conditions and separate the insert rows, delete rows, and update rows.) ---> Now drag the target table 3 times and give the name as table_insert_mode, table_delete_mode and table_update_mode.
    Now link the records from splitter with insert logic to table_insert_mode. and make sure the load type of target table as insert.
    Now do this for remaining modes, that are delete and update. And make sure that, the load types will be delete and update.
    Now, the mapping will do three types of opeations can be possible on each row according to the defined logic.
    Hope this helps you.
    Thank you,
    Regards,
    Gowtham Sen.

  • Warning messages in mapping deployment window

    Hi all,
    After deploying a mapping I got several warning messages but have no clues as to what and where they are referring to. Example of a warning message that I got:
    ORA-06550: line 32250, column 11:
    PL/SQL: SQL Statement ignored
    Do anyone of you know where the line 32250 and column 11 is exactly referring to? I need to see the code in order to know wat's the error. Do I refer to the script in the Script tab? But it seems to refer to nowhere if that is the case...

    Sutirtha Roy wrote:
    Hi ,
    The line numbers in the error messages are usually offset from the start of the package body, but the generated code listing has the package spec and body. So for example you got this one:
    LINE 671 ,COLUMN 12:
    PL/SQL: ORA-00942: table or view does not exist
    So you want to find package body line 671. So inside the generated code viewer, find the text "CREATE OR REPLACE PACKAGE BODY". Note the line number where that occurs, then add it to 671, that should be your actual line number.
    Thanks,
    SutirthaThanks Sutirtha,
    I finally made sense of where the warning messages were referring to. But I could not understand why some of these messages were produced. The scenario is like this.
    I added a unique key constraint on the attribute suppcode in the supplierwh table, and for all instances of this supplierwh table in my mapping where the loading type is "Update", I set the loading properties for both "match column when updating" and "match column when deleting" to No. Validation has got no errors but upon deployment warning messages were produced. Half of these warning messages were of this type:
    Warning
    ORA-06550: line 2449, column 41:
    PL/SQL: ORA-00936: missing expression
    Upon checking where these similar type of warning messages were referring to, all of them were pointing to codes something like below:
    "MERGE_SUBQUERY"
    ON (
    *"T_SUPPLIERWH_T1UPDATE"."SUPPCODE" = AND*
    "T_SUPPLIERWH_T1UPDATE"."SUPPKEY" = "MERGE_SUBQUERY"."SUPPKEY_1"
    I believe the error codes are the ones in bold because there is nothing after the = sign. But I do not understand why this is so. Can anyone help?
    Edit: I think I found the reason to this. Is it because of the "match by constraint" attribute? What does this attribute do when set to "All constraints"?
    Edited by: user8915380 on 29-Apr-2010 01:38

  • Error while deploy mapping ora-06550 table or view does not exist

    Hi everyone,
    i have a target source 'U_BCK' that cointains some Oracle table.
    I have also created a target schema 'BCK_OWNER' where i create some dimensions and cubes with mappings.
    My mappings connect some table from U_BCK with dimension or cube from BCK_OWNER.
    My repository owner is called 'rep_owner' and i used this user to create every metadata.
    Now i'm trying to deploy, and i don't have any problem until deploying mappings. When i try to deploy mappings i get some errors like ora-06550,ora-00942 table or view does not exist and statement ignored.
    Please help me and sorry for my english...
    Thanks,
    Alex.

    The mapping, that drives the data from one table to another is deployed to the database as a PL/SQL package. When deploying your mapping fails, it most often means that the resulting PL/SQL package doesn't compile in the database.
    Using Oracle SQL Developer (or Toad, SQL Navigator or any other tool) connect to the schema on the database where you have deployed the mapping. Open the pl/sql package and compile it. That should show you the place where the compilation fails, and give you an idea as to what table it can not find. Otherwise, in SQLPLUS, you can simply give the following command:
    ALTER PACKAGE THE_PACKAGE_NAME_GOES_HERE compile body;
    show errors;
    As the database user who owns the source tables, make sure to issue a GRANT command for each of the source tables, granting SELECT access to the database user who owns the mapping:
    grant select on TABLENAME to TARGETSCHEMA.
    hope this helps
    Borkur

  • Mapping with Match and Merge operater giving ORA-06550 error while deploy..

    Created a simplet mapping to source from Customer table to tstcustomer table thru' Match and Merge operator. The mapping validated successful but giving ORA-06550 line x column y error while deploying the mapping.
    It is a simple mapping consisting of source Customer table, Match and Merge operator, tstcustomer target table.
    Could anyone advise me on how to resolve this?

    The test mapping basically consists of :
    source table - sh.customers
    target table - tstcustomers (similar to sh.customers)
    Match-Merge operator.
    The mapping validation was successful but when attempt was made to deploy, its giving errors starting with ORA-06550.
    I saved the code and executed thru' SQL Plus and the error details are as follows:
    SQL> show errors;
    Errors for PACKAGE BODY MMTEST4:
    LINE/COL ERROR
    594/6 PL/SQL: Statement ignored
    594/37 PLS-00306: wrong number or types of arguments in call to 'RTRIM'
    601/6 PL/SQL: Statement ignored
    601/36 PLS-00306: wrong number or types of arguments in call to 'RTRIM'
    1017/655 PL/SQL: SQL Statement ignored
    30
    1020/27 PL/SQL: ORA-00942: table or view does not exist
    2163/6 PL/SQL: Statement ignored
    2163/43 PLS-00201: identifier 'CUSTOMERS_0_CUST_GENDER' must be declared
    2170/6 PL/SQL: Statement ignored
    LINE/COL ERROR
    2170/42 PLS-00201: identifier 'CUSTOMERS_0_COUNTRY_ID' must be declared
    2586/655 PL/SQL: SQL Statement ignored
    30
    2589/27 PL/SQL: ORA-00942: table or view does not exist
    SQL>
    For your info, the same mapping without Match-Merge Operator is getting deployed and executed successfully.
    But with Match-Merge operator, after setting Match bins, Match rules, Merge rules etc the mapping is validated successfully but errorring out while deployment.
    Pls advise on how to resolve this.
    I understand that the Match-Merge Operator gives Pl/Sql output from the documentation.
    thanks
    Naren.

  • Mapping deploy : ORA 06550 PACKAGE BODY... 101031:insufficient privileges

    Hi All,
    I am using OWB11.2,
    When i deploying a very simply mapping.
    i met the following error
    ORA 06550 PACKAGE BODY line 15 column 13: PL/SQL: 101031:insufficient privileges
    ORA 06550 PACKAGE BODY line 11, column 2: PL/SQL: SQL statement ignored
    i have grant source's 'select' privilege to target schema
    i have add the target schema to owb user group and from 'security' i tick all privllege to target schema
    don't know what else privilege do i need to add to target schema.
    Thanks for you attention.

    Hi,
    if your error statement is
    FROM
    "SCHEMA_SOURCE"."TABLE_NAME_SOURCE" "ALIAS"
    then you need direct grant on object "TABLE_NAME_SOURCE" from "SCHEMA_SOURCE"-user to target user (package owner).
    GRANT SELECT /* ALL */ ON "SCHEMA_SOURCE"."TABLE_NAME_SOURCE" TO package_owner.
    Best Regards,
    IM
    Edited by: user9014055 on 21.02.2012 06:26

  • Error ORA-01460 warning ORA-01461 during running a mapping with parameters

    Oracle 10g release2(10.2.0.1.0), OWB 10.2.0.1.31, Workflow server 2.6.4
    I have a simple process flow ( start -> mapping -> end).
    The mapping consists of 4 input groups(3 ordinary tables<INGRP1, INGRP2, INGRP3> and 1 mapping input parameter operator <INGRP4>), a joiner, a filter, an expression operator and 1 output group.
    I want to use two variables in join condition, so I bound two mapping input parameters(<INGRP4.SRC_SYS_CDE> and <INGRP4.ADMIN_ORG_NUM>) with two parameters of the process flow's start activity.
    Those two mapping input parameters are of type char, one is 4-char long and the other is 2-char long. So I set both of the two parameters of the start activity as String, one as 08, another as 7504.
    My join condition is:
    INGRP1.ORGIDT = INGRP2.SOURCEORGANIZATIONNO AND
    INGRP2.SOURCESYSTEMCODE = INGRP4.SRC_SYS_CDE AND
    INGRP2.ADMINORGANIZATIONNO = INGRP4.ADMIN_ORG_NUM AND
    INGRP1.CURCDE = INGRP3.NUM(+)
    There are no errors and warnings in validation, generation and deployment process, but when I run the process flow, it always finishes blankly(zero insert) with no error and warning messages. It should insert more than 20,000 rows.
    When I run the mapping and set the parameters 08 and 7504 at the parameter prompt, then start, the following error and warning occurs.
    Error ORA-01460: unimplemented or unreasonable conversion requested
    Warning ORA-01461: can bind a LONG value only for insert into a LONG column
    So what's the problem? How can I fix it?

    The problem was mapping input parameter type.
    VARCHAR2-type mapping input parameter works with String-type PF parameter. But CHAR-type won't.

  • Ora -06550 error while executing the mapping

    Hi,
    I am using owb client 11.2.0.3 . I have mapping map_emlap_src in this mapping i have import tables from different scehema and i have done one to one mapping on both the table .
    While executing the mapping i got the following error .
    ORA-06550: line 1, column 1082:
    PLS-00302: component 'MAP_EMLAP_SRC' must be declared
    ORA-06550: line 1, column 1062:
    PL/SQL: Statement ignored

    grant execute on owner_name.MAP_EMLAP_SRC to user_name;

  • Deployment Warning messages

    Hi,
    I have a rather straightforward mapping (but it has over 20 source tables into the Joiner and out to one target table).
    I am getting the following 6 warnings when I deploy:
    ORA-06550: PACKAGE BODY, line 126, column 36:PL/SQL: ORA-00936: missing expression
    ORA-06550: PACKAGE BODY, line 11, column 2:PL/SQL:SQL Statement ignored
    ORA-06550: PACKAGE BODY, line 249, column 36:PL/SQL:ORA-00936: missing expression
    ORA-06550: PACKAGE BODY, line 134, column 2:PL/SQL:SQL Statement ignored
    ORA-06550: PACKAGE BODY, line 679, column 36:PL/SQL:ORA-00936: missing expression
    ORA-06550: PACKAGE BODY, line 5577, column 2:PL/SQL:SQL Statement ignored
    I have looked at the PL/SQL package, resysnched the tables, even created new mapping from scratch, but still no luck. Any ideas?
    I have also looked at other such issues, but had no luck. Also, there are no issues when I validate the mapping and the Join Condition.

    Does the mapping have any expression . check and validate the expression.
    Or
    it can be checked form the database directlly
    Cheers
    Nawneet

  • OWB mapping deployment error

    Hi I got similar kind of error.. created a simple mapping for one small table.. the generated PL/SQL is as bellow. When I try to deploy the mapping I am getting warnings as shown bellow.. Could any body help me ?
    Warnings:
    ORA-06550: line 0, column 0:
    PL/SQL: Compilation unit analysis terminated
    ORA-06550: line 1, column 14:
    PLS-00304: cannot compile body of 'CNTY_MAP_9' without its specification
    ORA-06550: line 1, column 14:
    PLS-00905: object OWBDATAUSER.CNTY_MAP_9 is invalid
    ORA-06550: line 129, column 1:
    PL/SQL: Declaration ignored
    ORA-06550: line 129, column 24:
    PLS-00201: identifier 'WB_RT_MAPAUDIT' must be declared
    PL/SQL Block :
    -- Note: This generated code is for demonstration purposes only and may
    -- not be deployable.
    CREATE OR REPLACE PACKAGE ""CNTY_MAP_9"" AS
    OWB$MAP_OBJECT_ID VARCHAR2(32) := '';
    sql_stmt VARCHAR2(32767);
    get_abort BOOLEAN := FALSE;
    get_abort_procedure BOOLEAN := FALSE;
    get_trigger_success BOOLEAN := TRUE;
    get_errors NUMBER(22) := 0;
    get_status NUMBER(22) := 0;
    get_error_ratio NUMBER(22) := 0;
    get_global_names VARCHAR2(10) := 'FALSE';
    -- Status variable for Batch cursors
    "VAL_CNTY_9_St" BOOLEAN := FALSE;
    -- Function Main
    -- Entry point in package ""CNTY_MAP_9""
    FUNCTION Main RETURN NUMBER;
    END ""CNTY_MAP_9"";
    CREATE OR REPLACE PACKAGE BODY ""CNTY_MAP_9"" AS
    -- Function "VAL_CNTY_9_Bat"
    -- performs batch extraction
    -- Returns TRUE on success
    -- Returns FALSE on failure
    FUNCTION "VAL_CNTY_9_Bat"
    RETURN BOOLEAN IS
    BEGIN
    EXECUTE IMMEDIATE 'ALTER SESSION ENABLE PARALLEL DML';
    BEGIN
    INSERT
    INTO
    "VAL_CNTY_9"
    ("STATE",
    "CNTY",
    "ABBR",
    "SHORT_DESC",
    "LONG_DESC")
    (SELECT
    /*+ NO_MERGE */
    "VAL_CNTY"."STATE" "STATE",
    "VAL_CNTY"."CNTY" "CNTY",
    "VAL_CNTY"."ABBR" "ABBR",
    "VAL_CNTY"."SHORT_DESC" "SHORT_DESC",
    "VAL_CNTY"."LONG_DESC" "LONG_DESC"
    FROM
    "ISRSVAL"."VAL_CNTY"@"PROTO_SOURCE_9_LOCATION" "VAL_CNTY"
    COMMIT;
    EXCEPTION WHEN OTHERS THEN
    ROLLBACK;
    COMMIT;
    RETURN FALSE;
    END;
    COMMIT;
    RETURN TRUE;
    END "VAL_CNTY_9_Bat";
    FUNCTION Main RETURN NUMBER IS
    get_batch_status BOOLEAN := TRUE;
    BEGIN
    PROCEDURE EXEC_AUTONOMOUS_SQL(CMD IN VARCHAR2) IS
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    EXECUTE IMMEDIATE (CMD);
    COMMIT;
    END;
    -- Initialize all batch status variables
    "VAL_CNTY_9_St" := FALSE;
    "VAL_CNTY_9_St" := "VAL_CNTY_9_Bat";
    RETURN get_status;
    END Main;
    END ""CNTY_MAP_9"";
    /

    Is the schema that you are deploying to a member of OWB (security in the global explorer)? Are they registered as a target schema? I have a synonym for created in each of my registered target schemas for the owb.WB_RT_MAPAUDIT object.

  • MOLAP Mapping fails with ORA-37162

    Hello,
    created a dimension with value based hierarchy in OWB (11.2.0.1) with a respective mapping. Mapping deploys fine but when running it, it issues a warning:
    "ORA-37162: OLAP error
    'OWB_OLAP.DIM_TEST_VBH': XOQ-01995: Object "IM_TARGET.OWB$SRCVIEW_DIM__STANDAR_141F2.STANDARD_VBH_PARENT" does not exist.
    'OWB_OLAP.DIM_TEST_VBH': XOQ-01995: Object "IM_TARGET.OWB$SRCVIEW_DIM__STANDAR_141F2" does not exist.
    XOQ-01400: invalid metadata objects".
    Can't find the reason. The view exists and the field the message is referring to exists too!?
    Any idea appreciated.

    Hi David,
    I'll give Patch 9937420 a try, as the bug report suggests.
    Thanks and so long,
    Mike
    PS: what does ARU stand for?

  • Error  ORA-06550,  PLS-00103 in procedure launched by php page

    Hi,
    I have written a php page that calls a pl/sql procedure. When I launch the procedure (through the php) I receive this error
    Warning: ociexecute(): OCIStmtExecute: ORA-06550: line 1, column 101: PLS-00103: Encountered the symbol "" when expecting one of the following: ( - + case mod new not null others <an identifier>  <a double-quoted delimited-identifier> <a bind variable> avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date <a string literal with character set specification>  <a number> <a single-quoted SQL string> pipe <an alternatively-quoted string literal with character set specifi in /web/findb/php/fin/SPR/nuoveEmissioni/nuoveEmissioni.class.php on line 918
    bool(false) The php code that calls the procedure is the following:
    $query  = " declare retU number; begin ";
          $query .= " retU := pkg_schedapr.UPDATE_SPR_STATUS( :isinU, :utente, :emissione_f,
                            :azione_f, :fondo_f, :emittenteU_f, :rischioU_f, :varU_f,
                            :formulaU_f, :profiloU_f); ";
          $query .= ":retU_val := retU; "; 
          $query .= "end;";   
          $stmtUpdate = ociparse ($this->conn,$query);
             if (!$stmtUpdate) die (var_dump(OCIError()));  
            ociBindByName($stmtUpdate, ":isinU", $isin_t, 12);
            ociBindByName($stmtUpdate, ":utente", $userName, 20);
            ociBindByName($stmtUpdate, ":emissione_f", $mod_bond, 1);
            ociBindByName($stmtUpdate, ":azione_f", $mod_azione, 1);
            ociBindByName($stmtUpdate, ":fondo_f", $mod_fondo, 1);
            ociBindByName($stmtUpdate, ":emittenteU_f", $mod_emittente, 1);
            ociBindByName($stmtUpdate, ":rischioU_f", $mod_rischio, 1);
            ociBindByName($stmtUpdate, ":varU_f", $mod_var, 1);
            ociBindByName($stmtUpdate, ":formulaU_f", $mod_formula, 1);
            ociBindByName($stmtUpdate, ":profiloU_f", $mod_profilo, 1);
            ociBindByName($stmtUpdate, ":retU_val", $retU_val, 1);  
            $err=OCIExecute($stmtUpdate);
             if (!$err) die (var_dump(OCIError()));
          ocifreestatement($stmtUpdate);  The pl/sql procedure is the following:
    function UPDATE_SPR_STATUS(isin_p in varchar2, utente in varchar2, mercato in varchar2,
                               emissione_p in number, azione_p in number, fondo_p in number, emittente_p in number,
                               rischio_p in number, var_p in number, formula_p in number, mercato_p in number,
                               profilo_p in number) return number
    is
    control number;
    modificato number;
    SQL_QUERY VARCHAR2(4000);
    TYPE MOD_SUM IS REF CURSOR;
    SUMM MOD_SUM;
    TYPE MOD_SUM_ROW
        IS RECORD(
            EMISSIONE VARCHAR2(1),
            AZIONE VARCHAR2(1),
            FONDO VARCHAR2(1),
            EMITTENTE VARCHAR2(1),
            RISCHIO VARCHAR2(1),
            VAR VARCHAR2(1),
            FORMULA VARCHAR2(1),
            PROFILO VARCHAR2(1)
    MODIFICHE MOD_SUM_ROW;
    EMS VARCHAR2(1);
    AZI VARCHAR2(1);
    FON VARCHAR2(1);
    EMT VARCHAR2(1);
    RSK VARCHAR2(1);
    VAR VARCHAR2(1);
    FRM VARCHAR2(1);
    PRF VARCHAR2(1);
    MKT VARCHAR(1);
    begin
         modificato := emissione_p + azione_p + fondo_p + emittente_p + rischio_p
                       + var_p + formula_p + mercato_p + profilo_p;
         select count(*)
         into control
         from spr_web_nuove_emissioni a
         where a.ISIN=isin_p
         AND A.END_DATE IS NULL;
         if control > 0
         then
         update spr_web_nuove_emissioni a
         set a.END_DATE=sysdate
         where a.ISIN=isin_p
           AND A.END_DATE IS NULL;
         SQL_QUERY := 'SELECT A.EMISSIONE, A.AZIONE, A.FONDO, A.EMITTENTE,
                       A.RISCHIO, A.VAR, A.FORMULA,
                       A.PROFILO
                       FROM SPR_WEB_NUOVE_EMISSIONI A
                       WHERE A.ISIN='''||isin_p||' AND A.END_DATE=TRUNC(SYSDATE)';
         OPEN SUMM FOR SQL_QUERY;       
         LOOP
         FETCH SUMM INTO MODIFICHE;
         EXIT WHEN SUMM%NOTFOUND;
         if emissione_p < 1 THEN
         EMS := MODIFICHE.EMISSIONE;
         ELSE
         EMS := 'Y';
         end if;
         if azione_p < 1 THEN
         AZI := MODIFICHE.AZIONE;
         ELSE
         AZI := 'Y';
         end if;
         if fondo_p < 1 THEN
         FON := MODIFICHE.FONDO;
         ELSE
         FON := 'Y';
         end if;
         if emittente_p < 1 THEN
         EMT := MODIFICHE.EMITTENTE;
         ELSE
         EMT := 'Y';
         end if;
         if rischio_p < 1 THEN
         RSK := MODIFICHE.RISCHIO;
         ELSE
         RSK := 'Y';
         end if;
         if var_p < 1 THEN
         VAR := MODIFICHE.VAR;
         ELSE
         VAR := 'Y';
         end if;
         if formula_p < 1 THEN
         FRM := MODIFICHE.FORMULA;
         ELSE
         FRM := 'Y';
         end if;
         if profilo_p < 1 THEN
         PRF := MODIFICHE.PROFILO;
         ELSE
         PRF := 'Y';
         end if;
         END LOOP;
         CLOSE SUMM;
         ELSE
         if emissione_p < 1 THEN
         EMS := 'N';
         ELSE
         EMS := 'Y';
         end if;
         if azione_p < 1 THEN
         AZI := 'N';
         ELSE
         AZI := 'Y';
         end if;
         if fondo_p < 1 THEN
         FON := 'N';
         ELSE
         FON := 'Y';
         end if;
         if emittente_p < 1 THEN
         EMT := 'N';
         ELSE
         EMT := 'Y';
         end if;
         if rischio_p < 1 THEN
         RSK := 'N';
         ELSE
         RSK := 'Y';
         end if;
         if var_p < 1 THEN
         VAR := 'N';
         ELSE
         VAR := 'Y';
         end if;
         if formula_p < 1 THEN
         FRM := 'N';
         ELSE
         FRM := 'Y';
         end if;
         if profilo_p < 1 THEN
         PRF := 'N';
         ELSE
         PRF := 'Y';
         end if;
         end if;
         insert into spr_web_nuove_emissioni
         values (isin_p, sysdate, utente, EMS, AZI, FON, EMT,
                RSK, VAR, FRM, PRF,
                SYSDATE, NULL);
         begin
         update spr_status a
         set a.VALIDATED='Y'
         where a.ISIN=isin_p
           AND A.MARKET=mercato;
         if modificato > 0
         then
         update spr_status a
         set a.USER_CHANGE='Y', a.USER_LAST_MODIFIED=sysdate
         where a.ISIN=isin_p and a.MARKET=mercato;
         end if;
         exception
             when others then
             dbms_output.put_line('ERROR in <PKG_SCHEDAPR.UPDATE_SPR_STATUS> Aggiornamento stato ' ||SQLCODE||'-'||SQLERRM);
             return 1;
         end;
         commit;
         return 0;
    end UPDATE_SPR_STATUS;I do not succed to understand the error I receive, why? Where is the error?
    Can someone help me?
    Thanks, bye bye.

    Hi,
    I have changed the php code in this way:
    $query  = " declare retU number; begin ";
          $query .= " retU := pkg_schedapr.UPDATE_SPR_STATUS(:isinU, :utente, :emissione_f, ";
          $query .= ":azione_f, :fondo_f, :emittenteU_f, :rischioU_f, :varU_f, ";
          $query .= ":formulaU_f, :profiloU_f); ";
          $query .= ":retU_val := retU; "; 
          $query .= "end;";   
          $stmtUpdate = ociparse ($this->conn,$query);
             if (!$stmtUpdate) die (var_dump(OCIError()));  
            ociBindByName($stmtUpdate, ":isinU", $isin_t, 12);
            ociBindByName($stmtUpdate, ":utente", $userName, 20);
            ociBindByName($stmtUpdate, ":emissione_f", $mod_bond, 1);
            ociBindByName($stmtUpdate, ":azione_f", $mod_azione, 1);
            ociBindByName($stmtUpdate, ":fondo_f", $mod_fondo, 1);
            ociBindByName($stmtUpdate, ":emittenteU_f", $mod_emittente, 1);
            ociBindByName($stmtUpdate, ":rischioU_f", $mod_rischio, 1);
            ociBindByName($stmtUpdate, ":varU_f", $mod_var, 1);
            ociBindByName($stmtUpdate, ":formulaU_f", $mod_formula, 1);
            ociBindByName($stmtUpdate, ":profiloU_f", $mod_profilo, 1);
            ociBindByName($stmtUpdate, ":retU_val", $retU_val, 1);  
             echo "$isin_t--";echo "$userName--"; echo"$mod_bond--";
          echo "$mod_azione--";echo "$mod_fondo--"; echo"$mod_emittente--";
          echo "$mod_rischio--";echo "$mod_var--"; echo"$mod_formula--";
          echo "$mod_profilo--";echo "$retU_val";
            echo "$query";
            $err=OCIExecute($stmtUpdate);
             if (!$err) die (var_dump(OCIError()));
          ocifreestatement($stmtUpdate);   and now I receive this error:
    Warning: ociexecute(): OCIStmtExecute: ORA-01756: quoted string not properly terminated ORA-06512: at "FIN.PKG_SCHEDAPR", line 6420 ORA-06512: at line 1 in /web/findb/php/fin/SPR/nuoveEmissioni/nuoveEmissioni.class.php on line 918
    bool(false) But I do not understand the cause of the error.
    How can I solve?
    Thanks, bye bye.

  • Oracle Error: SQL Error Messge: [SERVERERROR] ORA-06550: line 1, column 7:

    The following is the error msg, I am trying to run the stored procedure to insert data into few tables.
    Pls suggest any solution to this error msg: Thanks.
    08/05/2005 11:27:41-> Level:1, UpLoader: SQL Error Messge: [SERVERERROR] ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'ENTPRFMAN'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    PROCEDURE ENTPRFMAN
    p_source_acct_id char, /*1*/
    p_source_system char, /*2*/
    p_entity_name char, /*3*/
    p_entity_legal_name char, /*4*/
    p_entity_long_name char, /*5*/
    p_associated_entity_id char, /*6*/
    p_entity_type char, /*7*/
    p_list_order char, /*8*/
    p_tax_id_number char, /*9*/
    p_inception_date char, /*10*/
    p_fiscal_end_date char, /*11*/
    p_marketing_open_date char, /*12*/
    p_base_currency char, /*13*/
    p_account_status char, /*14*/
    p_entity_code char, /*15*/
    p_orig_source_system char, /*16*/
    p_account_legal_form char, /*17*/
    p_business_sector char, /*18*/
    p_direct_account_ind char, /*19*/
    p_portfolio_type_code char, /*20*/
    p_target_dict_name char, /*21*/
    p_dict_level char, /*22*/
    p_cust_indx_type char, /*23*/
    p_blnd_source char, /*24*/
    p_ml_interpolate_yn char, /*25*/
    p_source_level1 char, /*26*/
    p_source_entity_xref1 char, /*27*/
    p_source_entity_xref1_type char, /*28*/
    p_source_dict_name1 char, /*29*/
    p_weight1 char, /*30*/
    p_source_level2 char, /*31*/
    p_source_entity_xref2 char, /*32*/
    p_source_entity_xref2_type char, /*33*/
    p_source_dict_name2 char, /*34*/
    p_weight2 char, /*35*/
    p_source_level3 char, /*36*/
    p_source_entity_xref3 char, /*37*/
    p_source_entity_xref3_type char, /*38*/
    p_source_dict_name3 char, /*39*/
    p_weight3 char, /*40*/
    p_source_level4 char, /*41*/
    p_source_entity_xref4 char, /*42*/
    p_source_entity_xref4_type char, /*43*/
    p_source_dict_name4 char, /*44*/
    p_weight4 char, /*45*/
    p_source_level5 char, /*46*/
    p_source_entity_xref5 char, /*47*/
    p_source_entity_xref5_type char, /*48*/
    p_source_dict_name5 char, /*49*/
    p_weight5 char, /*50*/
    p_source_level6 char, /*51*/
    p_source_entity_xref6 char, /*52*/
    p_source_entity_xref6_type char, /*53*/
    p_source_dict_name6 char, /*54*/
    p_weight6 char, /*55*/
    p_source_level7 char, /*56*/
    p_source_entity_xref7 char, /*57*/
    p_source_entity_xref7_type char, /*58*/
    p_source_dict_name7 char, /*59*/
    p_weight7 char, /*60*/
    p_source_level8 char, /*61*/
    p_source_entity_xref8 char, /*62*/
    p_source_entity_xref8_type char, /*63*/
    p_source_dict_name8 char, /*64*/
    p_weight8 char, /*65*/
    p_source_level9 char, /*66*/
    p_source_entity_xref9 char, /*67*/
    p_source_entity_xref9_type char, /*68*/
    p_source_dict_name9 char, /*69*/
    p_weight9 char, /*70*/
    p_source_level10 char, /*71*/
    p_source_entity_xref10 char, /*72*/
    p_source_entity_xref10_type char, /*73*/
    p_source_dict_name10 char, /*74*/
    p_weight10 char, /*75*/
    p_OUT OUT char
    AS
    v_date rulesdbo.entity.upd_date%TYPE:= SYSDATE;
    v_update_source rulesdbo.entity.upd_user%TYPE:= 'PRFENT';
    v_entity_id rulesdbo.entity.entity_id%type;
    b_valid BOOLEAN;
    /* Supported Entity Types - Index Index */
    v_sb_entity_type rulesdbo.entity.entity_type%type:= 'INDX';
    v_bb_entity_type rulesdbo.entity.entity_type%type:= 'CIDX';
    v_bb_dict_l1_cv rulesdbo.dictionary_detail.dict_l1_code_value%type := 'TOTAL';
    na_outparam EagleGen.t_outparam;
    /* Constants */
    g_prf_intfc rulesdbo.entity.src_intfc_inst%type:= -1;
    v_src_intfc_inst rulesdbo.entity.src_intfc_inst%type:= -1;
    /* Business Groups */
    v_group_name1 pace_masterdbo.pace_user_groups.group_name%type := 'ASP Reporting Grp';
    v_group_name2 pace_masterdbo.pace_user_groups.group_name%type := 'Client Rptg Grp';
    v_group_name3 pace_masterdbo.pace_user_groups.group_name%type := 'Client Rptg Mgr Grp';
    v_group_name4 pace_masterdbo.pace_user_groups.group_name%type := 'Client Srvc Grp';
    v_group_name5 pace_masterdbo.pace_user_groups.group_name%type := 'Client Srvc Mgr Grp';
    v_group_name6 pace_masterdbo.pace_user_groups.group_name%type := 'Data Mgmt Grp';
    v_group_name7 pace_masterdbo.pace_user_groups.group_name%type := 'Data Services Grp';
    v_group_name8 pace_masterdbo.pace_user_groups.group_name%type := 'Dom Operations (FDS)';
    v_group_name9 pace_masterdbo.pace_user_groups.group_name%type := 'QA Portfolio Mgr Grp';
    v_group_name10 pace_masterdbo.pace_user_groups.group_name%type := 'SRS (LPS) Group';
    v_group_name11 pace_masterdbo.pace_user_groups.group_name%type := 'LG Cap Val PM Group';
    v_group_name12 pace_masterdbo.pace_user_groups.group_name%type := 'APL Large Cap Value';
    v_group_name13 pace_masterdbo.pace_user_groups.group_name%type := 'Small Cap PM Grp';
    v_group_name14 pace_masterdbo.pace_user_groups.group_name%type := 'Client Rptg Dev Grp';
    v_entity_name rulesdbo.entity.entity_name%type; -- HX 17MAR05
    ** Checks to see if entity exists
    PROCEDURE validate_entityid(p_acctid IN rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_acctid_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    l_entity_id OUT rulesdbo.entity_xreference.entity_id%TYPE,
    b_valid OUT BOOLEAN)
    IS
    BEGIN
    select ex.entity_id into l_entity_id
    from rulesdbo.entity_xreference ex, rulesdbo.entity e
    where ex.xref_account_id = trim(p_acctid)
    and ex.xref_account_id_type = trim(p_acctid_type)
    and ex.entity_id = e.entity_id;
    b_valid:=TRUE;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    b_valid:=TRUE;
    l_entity_id:=null;
    dbms_output.put_line('IN ENTITY VALIDATE no data');
    WHEN OTHERS THEN
    dbms_output.put_line('IN ENTITY VALIDATE ERROR');
    b_valid:=FALSE;
    END; -- validate entity id func ends here
    ** Checks to see if entity xref exists, if not then add xref
    FUNCTION entity_xref(p_acctid rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_acctid_type rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    p_entity_id rulesdbo.entity_xreference.entity_id%TYPE)
    RETURN BOOLEAN
    AS
    l_count NUMBER:=0;
    v_entity_xref_id rulesdbo.entity_xreference.instance%type;
    BEGIN
    select count(*) into l_count
    from rulesdbo.entity_xreference
    where xref_account_id = trim(p_acctid)
    and xref_account_id_type = trim(p_acctid_type);
    if l_count > 0 then
    UPDATE rulesdbo.entity_xreference
    SET update_date = v_date,
    update_source = v_update_source,
    entity_id = p_entity_id
    WHERE xref_account_id = trim(p_acctid)
    AND xref_account_id_type = trim(p_acctid_type);
    RETURN TRUE;
    else
    pace_masterdbo.getnextinstance('RULESDBO.ENTITY_XREFERENCE',1,v_entity_xref_id);
    INSERT INTO rulesdbo.entity_xreference
    instance, update_date, update_source, entity_id, xref_account_id, xref_account_id_type
    VALUES
    v_entity_xref_id, v_date, v_update_source, p_entity_id, trim(p_acctid), trim(p_acctid_type)
    RETURN TRUE;
    end if;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN FALSE;
    END; -- entity_xref func ends here
    ** Finds dictionary_id given dictionary_name
    FUNCTION getDictionaryId(p_dict_name IN rulesdbo.dictionaries.dictionary_name%TYPE,
    p_dict_id OUT rulesdbo.dictionaries.dictionary_id%TYPE)
    RETURN BOOLEAN
    AS
    v_dict_id rulesdbo.dictionaries.dictionary_id%type;
    v_dict_name rulesdbo.dictionaries.dictionary_name%type;
    BEGIN
    dbms_output.put_line('dictionary_name = '||p_dict_name);
    --trim input
    v_dict_name := trim(p_dict_name);
    select dictionary_id into v_dict_id
    from rulesdbo.dictionaries
    where dictionary_name = v_dict_name;
    dbms_output.put_line('dictionary_id = '||v_dict_id);
    if v_dict_id is not null then
    p_dict_id := v_dict_id;
    RETURN TRUE;
    else
    p_dict_id := NULL;
    RETURN FALSE;
    end if;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN FALSE;
    END; -- getDictionaryId func ends here
    ** Finds dictionary_detail_id given dictionary_name
    FUNCTION getDictionaryItemId(p_dict_id IN rulesdbo.dictionary_detail.dictionary_id%TYPE,
    p_dict_l1_code_value IN rulesdbo.dictionary_detail.dict_l1_code_value%TYPE,
    p_dict_l2_code_value IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
    p_dict_item_id OUT rulesdbo.dictionary_detail.dictionary_item_id%TYPE)
    RETURN BOOLEAN
    AS
    v_dict_item_id rulesdbo.dictionary_detail.dictionary_item_id%type;
    v_dict_l1 rulesdbo.dictionary_detail.dict_l1_code_value%TYPE;
    v_dict_l2 rulesdbo.dictionary_detail.dict_l2_code_value%TYPE;
    BEGIN
    --trim input
    v_dict_l1 := trim(p_dict_l1_code_value);
    v_dict_l2 := trim(p_dict_l2_code_value);
    /* Total Level Only dictionary custom logic */
    if v_dict_l2 <> 'TOTAL' then
    select dictionary_item_id into v_dict_item_id
    from rulesdbo.dictionary_detail
    where dictionary_id = p_dict_id
    and dict_l1_code_value = v_dict_l1
    and dict_l2_code_value = v_dict_l2;
    else
    select dictionary_item_id into v_dict_item_id
    from rulesdbo.dictionary_detail
    where dictionary_id = p_dict_id
    and dict_l1_code_value = v_dict_l1
    and dict_l2_code_value is null;
    end if;
    if v_dict_item_id is not null then
    p_dict_item_id := v_dict_item_id;
    RETURN TRUE;
    else
    p_dict_item_id := NULL;
    RETURN FALSE;
    end if;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN FALSE;
    END; -- getDictionaryDetailId func ends here
    ** Finds instance for given source short_desc
    FUNCTION getSourceId(p_source_name IN pace_masterdbo.interfaces.short_desc%TYPE,
    p_source_id OUT pace_masterdbo.interfaces.instance%TYPE)
    RETURN BOOLEAN
    AS
    v_source_id pace_masterdbo.interfaces.instance%TYPE;
    v_source_name pace_masterdbo.interfaces.short_desc%TYPE;
    BEGIN
    --trim input
    v_source_name := trim(p_source_name);
    select instance into v_source_id
    from pace_masterdbo.interfaces
    where short_desc = v_source_name;
    if v_source_id is not null then
    p_source_id := v_source_id;
    RETURN TRUE;
    else
    p_source_id := NULL;
    RETURN FALSE;
    end if;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN FALSE;
    END; -- getSourceId func ends here
    ** Finds entity_id given xref_account_id
    FUNCTION getEntityId( p_account_id IN rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_account_id_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    p_entity_id OUT rulesdbo.entity_xreference.entity_id%TYPE)
    RETURN BOOLEAN
    AS
    v_entity_id rulesdbo.entity_xreference.entity_id%TYPE;
    v_account_id rulesdbo.entity_xreference.xref_account_id%TYPE;
    v_account_id_type rulesdbo.entity_xreference.xref_account_id_type%TYPE;
    BEGIN
    --trim input
    v_account_id := trim(p_account_id);
    v_account_id_type := trim(p_account_id_type);
    select entity_id into v_entity_id
    from rulesdbo.entity_xreference
    where xref_account_id = v_account_id
    and xref_account_id_type = v_account_id_type;
    if v_entity_id is not null then
    p_entity_id := v_entity_id;
    RETURN TRUE;
    else
    p_entity_id := NULL;
    RETURN FALSE;
    end if;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN FALSE;
    END; -- getEntityId func ends here
    ** FOR BLENDED BENCHMARKS ONLY
    FUNCTION processLevel( p_level_id IN NUMBER,
    p_blend_entity_id IN rulesdbo.entity.entity_id%TYPE,
    p_target_dict_id IN rulesdbo.dictionaries.dictionary_id%TYPE,
    p_dict_level IN rulesdbo.custom_index_attributes.dict_level%TYPE,
    p_dict_l2_code_value1 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
    p_entity_xref1 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_entity_xref1_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    p_source_dictname1 IN rulesdbo.dictionaries.dictionary_name%TYPE,
    p_weight1 IN rulesdbo.custom_index_attributes.weight%TYPE
    RETURN BOOLEAN
    AS
    l_count NUMBER:=0;
    v_instance rulesdbo.custom_index_attributes.instance%TYPE;
    v_source_dict_id rulesdbo.custom_index_attributes.source_dict_id%TYPE;
    v_entity_id rulesdbo.entity.entity_id%TYPE;
    v_src_intfc_inst rulesdbo.custom_index_attributes.src_intfc_inst%TYPE;
    v_target_dict_item_id rulesdbo.custom_index_attributes.target_dict_item_id%TYPE;
    b_valid BOOLEAN;
    BEGIN
    b_valid := getSourceId('EAGLE PACE', v_src_intfc_inst);
    dbms_output.put_line('Source Id = '||v_src_intfc_inst);
    b_valid := getEntityId(p_entity_xref1, p_entity_xref1_type, v_entity_id);
    dbms_output.put_line('Level Entity Xref = '||p_entity_xref1);
    dbms_output.put_line('Level Entity Id = '||v_entity_id);
    IF NOT b_Valid THEN
    na_outparam(na_outparam.COUNT+1) := EagleGen.GetErrEdit(p_Src => v_src_intfc_inst,
    p_ShortDesc => 'ENTITY NF');
    p_OUT := EagleGen.simf_table_to_varchar(na_outparam);
    RETURN FALSE;
    END IF;
    b_valid := getDictionaryId(p_source_dictname1, v_source_dict_id);
    dbms_output.put_line('Level Dictionary Id = '||v_source_dict_id);
    IF NOT b_Valid THEN
    na_outparam(na_outparam.COUNT+1) := EagleGen.GetErrEdit(p_Src => v_src_intfc_inst,
    p_ShortDesc => 'DICT ID NF');
    p_OUT := EagleGen.simf_table_to_varchar(na_outparam);
    RETURN FALSE;
    END IF;
    b_valid := getDictionaryItemId(p_target_dict_id, v_bb_dict_l1_cv, p_dict_l2_code_value1, v_target_dict_item_id);
    dbms_output.put_line('Dictionary Item Id = '||v_target_dict_item_id);
    IF NOT b_Valid THEN
    na_outparam(na_outparam.COUNT+1) := EagleGen.GetErrEdit(p_Src => v_src_intfc_inst,
    p_ShortDesc => 'DIR NF');
    p_OUT := EagleGen.simf_table_to_varchar(na_outparam);
    RETURN FALSE;
    END IF;
    /* initial delete */
    if p_level_id = 1 then
    dbms_output.put_line('Deleting ALL prior blend info');
    DELETE FROM rulesdbo.custom_index_attributes
    WHERE entity_id = p_blend_entity_id
    and target_dict_id = p_target_dict_id
    and source_dict_id = v_source_dict_id
    and dict_level = p_dict_level;
    end if;
    /* verify level */
    if p_dict_l2_code_value1 is not null then
    if (v_entity_id is not null) then
    if (v_source_dict_id is not null) then
    if (p_weight1 is not null) then
    dbms_output.put_line('*** LEVEL '||p_level_id||' - INSERTING NEW RECORD INTO RULESDBO.CUSTOM_INDEX_ATTRIBUTES');
    pace_masterdbo.getnextinstance('RULESDBO.CUSTOM_INDEX_ATTRIBUTES',1,v_instance);
    dbms_output.put_line('Retrieved instance number = '||v_instance);
    /* insert row */
    INSERT INTO rulesdbo.custom_index_attributes (
    instance, effective_date, entity_id, entity_detail_id, target_dict_id, source_dict_id,
    dict_level, dict_level_value, weight, cust_indx_type, src_intfc_inst, update_date,
    update_source, target_dict_item_id
    VALUES (
    v_instance, trunc(v_date), p_blend_entity_id, v_entity_id, p_target_dict_id, v_source_dict_id,
    p_dict_level, substr(p_dict_l2_code_value1, 1, 30), p_weight1, substr(p_cust_indx_type, 1, 4),
    v_src_intfc_inst, v_date, v_update_source, v_target_dict_item_id
    b_valid := TRUE;
    RETURN TRUE;
    end if;
    end if;
    end if;
    end if;
    RETURN FALSE;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('ERRROR - '||sqlerrm);
    RETURN NULL;
    END; -- processLevel func ends here
    FUNCTION customIndexAttributes(
    p_blend_entity_id IN rulesdbo.entity.entity_id%TYPE,
    p_target_dictname IN rulesdbo.dictionaries.dictionary_name%TYPE,
    p_dict_l2_code_value1 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
    p_entity_xref1 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_entity_xref1_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    p_source_dictname1 IN rulesdbo.dictionaries.dictionary_name%TYPE,
    p_weight1 IN rulesdbo.custom_index_attributes.weight%TYPE,
    p_dict_l2_code_value2 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
    p_entity_xref2 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_entity_xref2_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    p_source_dictname2 IN rulesdbo.dictionaries.dictionary_name%TYPE,
    p_weight2 IN rulesdbo.custom_index_attributes.weight%TYPE,
    p_dict_l2_code_value3 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
    p_entity_xref3 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_entity_xref3_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    p_source_dictname3 IN rulesdbo.dictionaries.dictionary_name%TYPE,
    p_weight3 IN rulesdbo.custom_index_attributes.weight%TYPE,
    p_dict_l2_code_value4 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
    p_entity_xref4 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_entity_xref4_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    p_source_dictname4 IN rulesdbo.dictionaries.dictionary_name%TYPE,
    p_weight4 IN rulesdbo.custom_index_attributes.weight%TYPE,
    p_dict_l2_code_value5 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
    p_entity_xref5 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_entity_xref5_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    p_source_dictname5 IN rulesdbo.dictionaries.dictionary_name%TYPE,
    p_weight5 IN rulesdbo.custom_index_attributes.weight%TYPE,
    p_dict_l2_code_value6 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
    p_entity_xref6 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_entity_xref6_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    p_source_dictname6 IN rulesdbo.dictionaries.dictionary_name%TYPE,
    p_weight6 IN rulesdbo.custom_index_attributes.weight%TYPE,
    p_dict_l2_code_value7 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
    p_entity_xref7 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_entity_xref7_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    p_source_dictname7 IN rulesdbo.dictionaries.dictionary_name%TYPE,
    p_weight7 IN rulesdbo.custom_index_attributes.weight%TYPE,
    p_dict_l2_code_value8 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
    p_entity_xref8 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_entity_xref8_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    p_source_dictname8 IN rulesdbo.dictionaries.dictionary_name%TYPE,
    p_weight8 IN rulesdbo.custom_index_attributes.weight%TYPE,
    p_dict_l2_code_value9 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
    p_entity_xref9 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_entity_xref9_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    p_source_dictname9 IN rulesdbo.dictionaries.dictionary_name%TYPE,
    p_weight9 IN rulesdbo.custom_index_attributes.weight%TYPE,
    p_dict_l2_code_value10 IN rulesdbo.dictionary_detail.dict_l2_code_value%TYPE,
    p_entity_xref10 IN rulesdbo.entity_xreference.xref_account_id%TYPE,
    p_entity_xref10_type IN rulesdbo.entity_xreference.xref_account_id_type%TYPE,
    p_source_dictname10 IN rulesdbo.dictionaries.dictionary_name%TYPE,
    p_weight10 IN rulesdbo.custom_index_attributes.weight%TYPE
    RETURN BOOLEAN
    AS
    l_count NUMBER:=0;
    v_instance rulesdbo.custom_index_attributes.instance%TYPE;
    v_target_dict_id rulesdbo.custom_index_attributes.target_dict_id%TYPE;
    v_source_dict_id rulesdbo.custom_index_attributes.source_dict_id%TYPE;
    v_entity_id rulesdbo.entity.entity_id%TYPE;
    v_entity_detail_id rulesdbo.entity_detail.entity_detail_id%TYPE;
    b_valid BOOLEAN;
    BEGIN
    dbms_output.put_line('TRYING TO INSERT NEW RECORD INTO RULESDBO.CUSTOM_INDEX_ATTRIBUTES');
    b_valid := getDictionaryId(p_target_dictname, v_target_dict_id);
    dbms_output.put_line('Target Dictionary Id = '||v_target_dict_id);
    -- process level 1
    if p_dict_l2_code_value1 is not null then
    dbms_output.put_line('Trying to process level 1');
    b_valid := processLevel(1,p_blend_entity_id,v_target_dict_id,p_dict_level,
    p_dict_l2_code_value1,p_entity_xref1,p_entity_xref1_type,
    p_source_dictname1,p_weight1);
    end if;
    -- process level 2
    if p_dict_l2_code_value2 is not null then
    dbms_output.put_line('Trying to process level 2');
    b_valid := processLevel(2,p_blend_entity_id,v_target_dict_id,p_dict_level,
    p_dict_l2_code_value2,p_entity_xref2,p_entity_xref2_type,
    p_source_dictname2,p_weight2);
    end if;
    -- process level 3
    if p_dict_l2_code_value3 is not null then
    dbms_output.put_line('Trying to process level 3');
    b_valid := processLevel(3,p_blend_entity_id,v_target_dict_id,p_dict_level,
    p_dict_l2_code_value3,p_entity_xref3,p_entity_xref3_type,
    p_source_dictname3,p_weight3);
    end if;
    -- process level 4
    if p_dict_l2_code_value4 is not null then
    dbms_output.put_line('Trying to process level 4');
    b_valid := processLevel(4,p_blend_entity_id,v_target_dict_id,p_dict_level,
    p_dict_l2_code_value4,p_entity_xref4,p_entity_xref4_type,
    p_source_dictname4,p_weight4);
    end if;
    -- process level 5
    if p_dict_l2_code_value5 is not null then
    dbms_output.put_line('Trying to process level 5');
    b_valid := processLevel(5,p_blend_entity_id,v_target_dict_id,p_dict_level,
    p_dict_l2_code_value5,p_entity_xref5,p_entity_xref5_type,
    p_source_dictname5,p_weight5);
    end if;
    -- process level 6
    if p_dict_l2_code_value6 is not null then
    dbms_output.put_line('Trying to process level 6');
    b_valid := processLevel(6,p_blend_entity_id,v_target_dict_id,p_dict_level,
    p_dict_l2_code_value6,p_entity_xref6,p_entity_xref6_type,
    p_source_dictname6,p_weight6);
    end if;
    -- process level 7
    if p_dict_l2_code_value7 is not null then
    dbms_output.put_line('Trying to process level 7');
    b_valid := processLevel(7,p_blend_entity_id,v_target_dict_id,p_dict_level,
    p_dict_l2_code_value7,p_entity_xref7,p_entity_xref7_type,
    p_source_dictname7,p_weight7);
    end if;
    -- process level 8
    if p_dict_l2_code_value8 is not null then
    dbms_output.put_line('Trying to process level 8');
    b_valid := processLevel(8,p_blend_entity_id,v_target_dict_id,p_dict_level,
    p_dict_l2_code_value8,p_entity_xref8,p_entity_xref8_type,
    p_source_dictname8,p_weight8);
    end if;
    -- process level 9
    if p_dict_l2_code_value9 is not null then
    dbms_output.put_line('Trying to process level 9');
    b_valid := processLevel(9,p_blend_entity_id,v_target_dict_id,p_dict_level,
    p_dict_l2_code_value9,p_entity_xref9,p_entity_xref9_type,
    p_source_dictname9,p_weight9);
    end if;
    -- process level 10
    if p_dict_l2_code_value10 is not null then
    dbms_output.put_line('Trying to process level 10');
    b_valid := processLevel(10,p_blend_entity_id,v_target_dict_id,p_dict_level,
    p_dict_l2_code_value10,p_entity_xref10,p_entity_xref10_type,
    p_source_dictname10,p_weight10);
    end if;
    RETURN b_valid;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('ERRROR - '||sqlerrm);
    RETURN NULL;
    END; -- customIndexAttributes func ends here
    ** if record in entity Detail exists add else update master entity id
    ** benchmark entity_id = p_mast_entity_id
    ** portfolio entity_id = p_feed_entity_id
    FUNCTION entityDetail( p_mast_entity_id rulesdbo.entity_detail.entity_detail_id%TYPE,
    p_feed_entity_id rulesdbo.entity_detail.entity_id%TYPE,
    p_entity_type rulesdbo.entity_detail.entity_type%TYPE,
    p_list_order rulesdbo.entity_detail.list_order%TYPE)
    RETURN BOOLEAN
    AS
    l_count NUMBER:=0;
    a_count NUMBER:=0;
    BEGIN
    /* if blended benchmark don't need record in ENTITY_DETAIL */
    if (p_entity_type = v_bb_entity_type) then
    return TRUE;
    end if;
    select count(*) into l_count
    from rulesdbo.entity_detail
    where entity_id = p_feed_entity_id
    and entity_type = p_entity_type
    and entity_detail_id = p_mast_entity_id;
    if l_count > 0 then
    dbms_output.put_line('UPDATING EXISTING RECORD IN RULESDBO.ENTITY_DETAIL');
    UPDATE rulesdbo.entity_detail
    SET
    update_date = v_date,
    update_user = v_update_source,
    src_intfc_inst = v_src_intfc_inst,
    list_order = p_list_order
    WHERE
    entity_detail_id = p_mast_entity_id
    AND entity_id = p_feed_entity_id
    AND entity_type = p_entity_type;
    RETURN TRUE;
    else
    /* validate associated entity_id */
    dbms_output.put_line('VALIDATING ASSOCIATED ENTITY_ID');
    dbms_output.put_line('p_feed_entity_id ' || p_feed_entity_id);
    select count(*) into a_count
    from rulesdbo.entity
    where entity_id = p_feed_entity_id;
    if a_count > 0 then
    dbms_output.put_line('INSERTING NEW RECORD INTO RULESDBO.ENTITY_DETAIL');
    INSERT INTO rulesdbo.entity_detail
    entity_detail_id, entity_id, entity_type, update_date, update_user, src_intfc_inst, list_order
    VALUES
    p_mast_entity_id, p_feed_entity_id, p_entity_type, v_date, v_update_source, v_src_intfc_inst, p_list_order
    RETURN TRUE;
    else
    IF p_feed_entity_id is not null then
    --For invalid, non-null associated_entity_id
    RETURN FALSE;
    END IF;
    --For invalid, null associate_entity_id
    return TRUE;
    end if;
    return TRUE;
    end if;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN FALSE;
    END; -- entityDetail func ends here
    ** FOR BUSINESS GROUPS
    FUNCTION setBusinessGroup
    ( p_group_name pace_masterdbo.pace_user_groups.group_name%TYPE,
    p_entity_id rulesdbo.entity.entity_id%TYPE,
    p_upd_user pace_masterdbo.pace_user_groups.upd_user%TYPE,
    p_upd_datetime pace_masterdbo.pace_user_groups.upd_datetime%TYPE
    RETURN BOOLEAN
    AS
    g_count NUMBER:=0;
    v_group_id pace_masterdbo.pace_user_groups.group_id%TYPE;
    BEGIN
    /* validate that business group is found */
    select count(*) into g_count
    from pace_masterdbo.pace_user_groups
    where group_name = p_group_name;
    if g_count <= 0 then
    dbms_output.put_line('BUSINESS GROUP NOT FOUND - ' || p_group_name);
    return FALSE;
    end if;
    /* get group_id for given group name */
    select group_id into v_group_id
    from pace_masterdbo.pace_user_groups
    where group_name = p_group_name;
    /* check if record already exists in group_entities */
    select count(*) into g_count
    from pace_masterdbo.group_entities
    where group_id = v_group_id
    and entity_id = p_entity_id;
    if g_count > 0 then
    /* update record */
    UPDATE pace_masterdbo.group_entities
    SET upd_user = p_upd_user,
    upd_datetime = p_upd_datetime
    WHERE group_id = v_group_id
    AND entity_id = p_entity_id;
    dbms_output.put_line('UPDATED RECORD FOR BUSINESS GROUP - ' || p_group_name);
    else
    /* insert record */
    INSERT INTO pace_masterdbo.group_entities
    ( group_id, entity_id, upd_user, upd_datetime )
    VALUES
    ( v_group_id, p_entity_id, p_upd_user, p_upd_datetime );
    dbms_output.put_line('INSERTED NEW RECORD FOR BUSINESS GROUP - ' || p_group_name);
    end if;
    RETURN TRUE;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN FALSE;
    END; -- setBusinessGroup func ends here
    ** MAIN
    BEGIN
    -- HX 17MAR05
    v_entity_name := substr(p_entity_name,1,30);
    v_entity_name := translate(v_entity_name,'/\:*?"<>~`!^|;,.''',' ');
    b_valid := getSourceId('EAGLE PACE', g_prf_intfc);
    dbms_output.put_line('Global Source Id = '||g_prf_intfc);
    validate_entityid(p_source_acct_id,p_source_system,v_entity_id, b_valid);
    IF NOT b_Valid THEN
    na_outparam(na_outparam.COUNT+1) := EagleGen.GetErrEdit(p_Src => g_prf_intfc,
    p_ShortDesc => 'INV ENTITY');
    p_OUT := EagleGen.simf_table_to_varchar(na_outparam);
    RETURN;
    END IF;
    if v_entity_id is not null then
    dbms_output.put_line('ENTITY ID EXISTS - ' || v_entity_id);
    /*Update Record in Entity Table */
    UPDATE rulesdbo.entity
    SET entity_type = p_entity_type,
    entity_name = v_entity_name,
    entity_long_name = substr(p_entity_long_name,1,60),
    legal_name = p_entity_legal_name,
    inception_date = to_date(p_inception_date, 'YYYYMMDD'),
    marketing_open_date = to_date(p_marketing_open_date, 'YYYYMMDD'),
    fiscal_end_date = to_date(p_fiscal_end_date, 'YYYYMMDD'),
    tax_id_number = p_tax_id_number,
    upd_date = v_date,
    upd_user = v_update_source,
    base_currency = p_base_currency,
    account_status = p_account_status,
    entity_code = p_entity_code,
    orig_source_system = p_orig_source_system,
    account_legal_form = p_account_legal_form,
    business_sector = p_business_sector,
    direct_account_ind = p_direct_account_ind,
    portfolio_type_code = p_portfolio_type_code,
    ml_interpolate_yn = p_ml_interpolate_yn
    WHERE entity_id = v_entity_id;
    dbms_output.put_line('UPDATED EXISTING RULESDBO.ENTITY RECORD');
    b_valid := entityDetail(v_entity_id, p_associated_entity_id, p_entity_type, p_list_order);
    else
    pace_masterdbo.getnextinstance('RULESDBO.ENTITY',1,v_entity_id);
    /*Insert Record into Entity Table */
    INSERT INTO rulesdbo.entity
    entity_id, entity_type, entity_name,entity_long_name,legal_name,inception_date,marketing_open_date,
    upd_date, upd_user, tax_id_number, fiscal_end_date, base_currency, account_status,
    entity_code, orig_source_system, account_legal_form, business_sector, direct_account_ind,
    portfolio_type_code, ml_interpolate_yn
    VALUES
    ( v_entity_id, p_entity_type,v_entity_name,substr(p_entity_long_name,1,60),p_entity_legal_name,
    to_date(p_inception_date, 'YYYYMMDD'),to_date(p_marketing_open_date, 'YYYYMMDD'),v_date, v_update_source, p_tax_id_number, to_date(p_fiscal_end_date, 'YYYYMMDD'),
    p_base_currency, p_account_status, p_entity_code, p_orig_source_system, p_account_legal_form, p_business_sector,
    p_direct_account_ind, p_portfolio_type_code, p_ml_interpolate_yn
    dbms_output.put_line('ENTITY ID CREATED - ' || v_entity_id);
    /*Insert Record into Entity_Detail Table */
    b_valid := entityDetail(v_entity_id, p_associated_entity_id, p_entity_type, p_list_order);
    end if;
    /* Insert/Update CUSTOM_INDEX_ATTRIBUTES if blended benchmark */
    if (p_entity_type = v_bb_entity_type) then
    b_valid := customIndexAttributes(
    v_entity_id,
    p_target_dict_name,
    p_source_level1,
    p_source_entity_xref1,
    p_source_entity_xref1_type,
    p_source_dict_name1,
    p_weight1,
    p_source_level2,
    p_source_entity_xref2,
    p_source_entity_xref2_type,
    p_source_dict_name2,
    p_weight2,
    p_source_level3,
    p_source_entity_xref3,
    p_source_entity_xref3_type,
    p_source_dict_name3,
    p_weight3,
    p_source_level4,
    p_source_entity_xref4,
    p_source_entity_xref4_type,
    p_source_dict_name4,
    p_weight4,
    p_source_level5,
    p_source_entity_xref5,
    p_source_entity_xref5_type,
    p_source_dict_name5,
    p_weight5,
    p_source_level6,
    p_source_entity_xref6,
    p_source_entity_xref6_type,
    p_source_dict_name6,
    p_weight6,
    p_source_level7,
    p_source_entity_xref7,
    p_source_entity_xref7_type,
    p_source_dict_name7,
    p_weight7,
    p_source_level8,
    p_source_entity_xref8,
    p_source_entity_xref8_type,
    p_source_dict_name8,
    p_weight8,
    p_source_level8,
    p_source_entity_xref9,
    p_source_entity_xref9_type,
    p_source_dict_name9,
    p_weight9,
    p_source_level10,
    p_source_entity_xref10,
    p_source_entity_xref10_type,
    p_source_dict_name10,
    p_weight10
    end if;
    /* Insert/Update Business Groups */
    b_valid := setBusinessGroup(v_group_name1, v_entity_id, v_update_source, v_date);
    b_valid := setBusinessGroup(v_group_name2, v_entity_id, v_update_source, v_date);
    b_valid := setBusinessGroup(v_group_name3, v_entity_id, v_update_source, v_date);
    b_valid := setBusinessGroup(v_group_name4, v_entity_id, v_update_source, v_date);
    b_valid := setBusinessGroup(v_group_name5, v_entity_id, v_update_source, v_date);
    b_valid := setBusinessGroup(v_group_name6, v_entity_id, v_update_source, v_date);
    b_valid := setBusinessGroup(v_group_name7, v_entity_id, v_update_source, v_date);
    b_valid := setBusinessGroup(v_group_name8, v_entity_id, v_update_source, v_date);
    b_valid := setBusinessGroup(v_group_name9, v_entity_id, v_update_source, v_date);
    b_valid := setBusinessGroup(v_group_name10, v_entity_id, v_update_source, v_date);
    b_valid := setBusinessGroup(v_group_name11, v_entity_id, v_update_source, v_date);
    b_valid := setBusinessGroup(v_group_name12, v_entity_id, v_update_source, v_date);
    b_valid := setBusinessGroup(v_group_name13, v_entity_id, v_update_source, v_date);
    b_valid := setBusinessGroup(v_group_name14, v_entity_id, v_update_source, v_date);
    /* Insert/Update entity xref */
    b_valid := entity_xref(p_source_acct_id, p_source_system, v_entity_id);
    IF NOT b_Valid THEN
    dbms_output.put_line('INV ENT XREF 1');
    na_outparam(na_outparam.COUNT+1) := EagleGen.GetErrEdit(p_Src => g_prf_intfc,
    p_ShortDesc => 'INV ENT XREF');
    p_OUT := EagleGen.simf_table_to_varchar(na_outparam);
    RETURN;
    END IF;
    COMMIT;
    /* Pass back any warning messages */
    p_out := EagleGen.simf_table_to_varchar(na_outparam);
    END; -- End of Procedure

    The PLS-00306 error is normally a runtime error. It is telling you that the call to procedure ENTPRFMAN had either too few or too many parameters passed to it or that one or more of the parameters were of the wrong datatype.
    HTH -- Mark D Powell --

Maybe you are looking for

  • Flattener Preview  - Highlight pulldown nothing available

    I have been noticing that with certain files when I am using the Flattener preview there are no options available (grayed out) in the Highlight pulldown menu. However, other files do reveal available options. Now, what puzzles me is that both files c

  • Which role, profile for monitoring adapter & messages in Runtime Workbench?

    Hi guys, let mi pls know, which one is needed. Thanx! Olian

  • Create a Master-Detail Records in target table

    hi, I have a source in a table that contains the infos of customers and for each customer record, we have three fields representing the customer ID (Identity card, SIN, passport ID) and I want to create 3 record in the target table for each customer,

  • How to Use External Fonts

    Hi All, How can I use extrnal fonts i.e (Windows\Fonts) in my PDF Reports? I'm using APEX 3.01 to print my reports to PDF files. Arabic Characters Appers like ????. Same report Appears OK when I select HTML, Excel, word as my print file. Thanks, Ribh

  • Problems Background Printing PDF from C# Application

    Hello, We are having a lot of problems trying to print a PDF file in the background using a C# application that is executed via SQL Server Agent. The output should be printed to a local printer (HP Color LaserJet 1600) connected via a USB port. We ha