Runtime error SQL error 3114 occurred when accessing program CX_ w
Hi Friends,
Iam in a big mess . I have one query based on one my Zinfocube.This query ia attached in the workbook .. Previuolsy all was fine , but now whever iam executing this query it is throwing me the exception
Query 0: Runtime error SQL error 3114 occurred when accessing program CX_ with parallel processing via RFC.
and
Beim Lesen der Daten sind Fehler aufgetreten. Navigation ist möglich
I am not able to get the cause of error ..
Can anybody help me in this regrd as its a bit urgent.
Thanks in advance..
Hi , thanks for replying ,
I have tried running query through RSRT also , its not working still it is giving me the same error .
In st22 it is showing me the follwing dump.
DBIF_REPO_SQL_ERROR
Short text
SQL error 3114 occurred when accessing program
What happened?
The system is no longer linked to an ORACLE instance.
No further operations can be performed on the database.
What can you do?
You cannot eliminate this error yourself.
Please inform your database administrator.
Note which actions and input led to the error.
For further help in handling the problem, contact your SAP administrator
You can use the ABAP dump analysis transaction ST22 to view and manage
termination messages, in particular for long term reference.
Note which actions and input led to the error.
For further help in handling the problem, contact your SAP administrator
You can use the ABAP dump analysis transaction ST22 to view and manage
termination messages, in particular for long term reference.
Error analysis
The system attempted to access an ORACLE instance to which
it is no longer linked.
This situation may arise because the ORACLE instance
has been stopped due to an error or an external operation.
How to correct the error
Database error text........: "ORA-03114: not connected to ORACLE"
Triggering SQL statement...: "CX_SQL_EXCEPTION==============CP "
The current status of the ORACLE instance cannot be determined.
It may be still inactive or the database administrator may have
restarted it.
In any case, all systems that have accessed the ORACLE instance
must be restarted after the ORACLE instance has been restarted.
If you were working on a central system, inform
your system administrator.
If you were working on an external local system, inform
the person responsible for this system.
If you were working on your own local system, restart
the system yourself.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DBIF_REPO_SQL_ERROR" " "
"CL_SQL_RESULT_SET=============CP" or "CL_SQL_RESULT_SET=============CM006"
"NEXT_PACKAGE"
If you cannot solve the problem yourself and want to send an errornotification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DBIF_REPO_SQL_ERROR" " "
"CL_SQL_RESULT_SET=============CP" or "CL_SQL_RESULT_SET=============CM006"
"NEXT_PACKAGE"
Thanks in Advance..
Similar Messages
-
SQL Error 3114 occured when accessing program CX_
Hi there,
I have build an infoset on a infocube and ODS. On this infoset I've build a query using a calculated key figure: Availibility%
Inside this key figure I have 2 restricted key figures: Allocation and Availibility
When I execute this query I get the error: "SQL Error 3114 occured when accessing program CX_"
If I remove the calculated key figure from the columns it works fine. If I place one of the 2 restricted key figures in the query it also work fine. But If i place both the restricted key figures in the columns, I also get the error. Or If I place the calculated key figure in the columns, I also get the error. Does somebody know what the problem is?No they don't show me the problem. I've executed with RSRT transaction and I;ve got this error with the ABAP-debugger:
error in >> l_repid <<
>> l_include <<
>> l_source_line << -
Error message in TRFC 'An SQL error occurred when accessing a table'
Hi all,
Can any one tell what this below error message is about in while go into TRFC
'An SQL error occurred when accessing a table'.
and please tell me how to solve this problem.Hi
Try to see what all tables are accessed by data source. and see if there is any lock on that..
If some other job is accessing that table - then there might be lock on that which is causing failure..
1) Try looking at ST22 dump also..
2) Try to do RSA3 in R/3 and if see if its is fetching any records or not..
Hoep it helps
--SA -
Getting error "SQL error in the database when accessing a table."
Hi All,
We are getting Dump Error SQL error in the database when accessing a table for the batch job EISSD/REQUISITION 14 / which includes program AQ20FD==========A2============. Please reply. The Dump error details are as follows
Short text
SQL error in the database when accessing a table.
How to correct the error
Database error text........: "ORA-01555: snapshot too old: rollback segment
number 21 with name "_SYSSMU21$" too small"
Internal call code.........: "[RSQL/FTCH/VBRK ]"
Please check the entries in the system log (Transaction SM21).
Thanks
Padmakar Kudtarkar
Edited by: Rob Burbank on May 19, 2011 9:38 AMThe query where we are getting error in Standard program AQ20FD==========A2============ for Job
EISSD/REQUISITION 14 / is as follows:
select VBRKBUKRS VBRKFKART VBRKFKDAT VBRKFKTYP VBRKGJAHR VBRKKUNAG VBRKKUNRG VBRKKURRF VBRKVBELN VBRKWAERK VBRP~AUBEL
VBRPAUPOS VBRPFKIMG VBRPKVGR2 VBRPKZWI1 VBRPMATNR VBRPMWSBP VBRPNETWR VBRPPSTYV VBRPVBELN VBRPVGBEL VBRP~VGPOS
VBRPVKBUR VBRPVKGRP VBRPVRKME VBRPWAVWR
into (VBRK-BUKRS , VBRK-FKART , VBRK-FKDAT , VBRK-FKTYP , VBRK-GJAHR , VBRK-KUNAG , VBRK-KUNRG , VBRK-KURRF , VBRK-VBELN
, VBRK-WAERK , VBRP-AUBEL , VBRP-AUPOS , VBRP-FKIMG , VBRP-KVGR2 , VBRP-KZWI1 , VBRP-MATNR , VBRP-MWSBP , VBRP-NETWR
, VBRP-PSTYV , VBRP-VBELN , VBRP-VGBEL , VBRP-VGPOS , VBRP-VKBUR , VBRP-VKGRP , VBRP-VRKME , VBRP-WAVWR )
from ( VBRK
inner join VBRP
on VBRPVBELN = VBRKVBELN )
where VBRK~BUKRS in SP$00004
and VBRK~FKDAT in SP$00001
and VBRK~KUNAG in SP$00002
and VBRK~VBELN in SP$00006
and VBRP~MATNR in SP$00003.
%dbacc = %dbacc - 1.
if %dbacc = 0.
stop.
endif.
check SP$00004.
check SP$00001.
check SP$00002.
check SP$00006.
check SP$00003.
add 1 to %count-VBRK.
%linr-VBRK = '01'.
extract %fg01.
%ext-VBRP01 = 'X'.
extract %fgwrVBRP01.
endselect. -
Loading issue : Error: sql error in the database while accessing a table
Hello,
where as one of the DTP in the process chain failed due to *Error: sql error in the database while accessing a table*, where as in the short dump it showing as Transaction log of data base is full., but i checked the data base space in DB02, more space is available . once we run the same DTP by manually its successful. its not through any errors.
could u please help me out solve the problem.
Thanks
siva kumar.it might be a lock. do you drop index before loading?
the database might be full at the moment of loading and not later if many loadings happen at the same time on the same system...
when you then rerun your dtp manually, it can go through as it's perhaps the only one running at that moment...
you can try to set the btch parameter to 1...this will help in some cases.
M. -
I have PSE 8.0 and the error: 150:30 always occurs when trying to open a file. Can anybody help me with this problem?
click file > place formats to import graphic files.
http://helpx.adobe.com/indesign/kb/supported-file-formats-indesign-cs5.html -
Portal Runtime error - An exception occured : when accessing the SRM Portal
Dear Consultants,
We are logging onto the SRM Portal using url link. SAP Netweaver 7.0
But when we are trying to access any tabs in the Navigation frame of the portal it is throwing an error.
Error - Portal Runtime error
An exception has occured while processing your request.
Can you please let me know how can I find the correct reason for the error.
regards
ArindamHi Arindam,
Pls check Default Trace log in the NWA tool, path would be NWA --> Monitoring --> Logs and Traces --> Select Default Trace.
Find the log messages with the Exception ID found on your Portal Runtime error. These logs would specify the exact cause of error.
Thanks,
Swapna Priya. -
SQL error "-601" occurred when accessing table "SMEN_BUFFC
Hi Guys
I am getting the above error at tiem when i am logging on.
The actual error message in the st22 dump is
Database error text........: "SMEN_BUFH5 in R3EPT32000 type *SQLPKG already
exists. Job=018343/EPT01/WP00"
The termination occurred in the ABAP/4 program "SAPLSMTR_NAVIGATION_MODULES "
in
"SMTR_STRU_PROCESS_STRUCTURE".
The main program was "SAPLSMTR_NAVIGATION ".
This seems to happen when some users log on to the system and then tries to change their password. If I stop sap and start it again, the rror goes away.
I have actually deleted the sql package with the command
DLTSQLPKG R3EPT32000\SMEN_BUFH5.
This seem to work but after a while the erro comes back againDear Christian,
at the moment in our Productive system we have hundreds of Dumps: nearly at every log on user get a DUMP with the well known message.
Analyzing develoepr trace we find following information:
C Wed Mar 14 09:54:35 2007
C Concurrent prepare happened for SIPID
C Library name: R3S1132000
C Package name: SMEN_BUFH5
C Statement name: "QL1YQAAAAAFC"
C SQL Error: -601
C *** ERROR => Error -601 in function prep_cached_op [dbsldb4.cpp 7057]
C Library name: R3S1132000
C Package name: SMEN_BUFH5
C Statement name: "QL1YQAAAAAFC"
C Failing statement is:
C , SELECT * FROM R3S11DATA/"SMEN_BUFFC" WHERE "MANDT" = ? AND "UNAME" = ? WITH UR
B ***LOG BY4=> sql error -601 performing PRE on table SMEN_BUFFC [dbtran 7009 ]
B ***LOG BY0=> SMEN_BUFH5 in R3S1132000 tipo *SQLPKG esiste gi{. Job=251690/S1100/WP12 [dbtran 7009 ]
B dbtran ERROR LOG (hdl_dbsl_error): DbSl 'PRE'
B FHDR: {tab='SMEN_BUFFC ',
fcode=53, mode=2, bpb=0, dbcnt=0, crsr=1,
B hold=0, keep=1, xfer=2, pkg=0, upto=0, init:b=0,
B init:p=0000000000000000, init:#=278, wa:p=0000000000000000, wa:#=278}
B dbtran ERROR LOG (hdl_dbsl_error): DbSl 'PRE'
B STMT:
B CRSR: {tab='SMEN_BUFFC ', id=-1, hold=0, prop=0x10000, max.in@0=1, fae:blk=10,
B con:nm='R/3', con:id=0, con:vndr=2, val=2,
B key:1=0, key:#=6, xfer=2, xin:#=0, xout:#=0, upto=0,
B wa:p=000000800440C380, init:p=00000090D4CF4DF8, init:#=15, init:b=0}
Additionaly we also tried to delete only mentioned SQL package (while system was running), but without succes.
What do you think?
Giuseppe -
Abap import error DbSl Trace: ORA-1403 when accessing table SAPUSER
hi all
I am installing ERP 6.0 (ABAP) on win2003 cluster, oracle 10g, I have error at database instance intallation. here some logs
DD03L.log
I:\usr\sap\PRD\SYS\exe\uc\NTAMD64\R3load.exe: START OF LOG: 20090812102157
I:\usr\sap\PRD\SYS\exe\uc\NTAMD64\R3load.exe: sccsid @(#) $Id: //bas/700_REL/src/R3ld/R3load/R3ldmain.c#18 $ SAP
I:\usr\sap\PRD\SYS\exe\uc\NTAMD64\R3load.exe: version R7.00/V1.4 [UNICODE]
Compiled Apr 3 2009 09:03:56
I:\usr\sap\PRD\SYS\exe\uc\NTAMD64\R3load.exe -i DD03L.cmd -dbcodepage 4103 -l DD03L.log -stop_on_error
DbSl Trace: ORA-1403 when accessing table SAPUSER
(DB) INFO: connected to DB
(RTF) ########## WARNING ###########
Without ORDER BY PRIMARY KEY the exported data may be unusable for some databases
(TPL) ERROR: unknown template variable "tablespace"
I:\usr\sap\PRD\SYS\exe\uc\NTAMD64\R3load.exe: job finished with 1 error(s)
I:\usr\sap\PRD\SYS\exe\uc\NTAMD64\R3load.exe: END OF LOG: 20090812102157
import_monitor.log
ERROR: 2009-08-12 10:21:57 com.sap.inst.migmon.LoadTask run
Loading of 'DD03L' import package is interrupted with R3load error.
Process 'I:\usr\sap\PRD\SYS\exe\uc\NTAMD64\R3load.exe -i DD03L.cmd -dbcodepage 4103 -l DD03L.log -stop_on_error' exited with return code 2.
For mode details see 'DD03L.log' file.
Standard error output:
sapparam: sapargv( argc, argv) has not been called.
sapparam(1c): No Profile used.
sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
WARNING: 2009-08-12 10:22:25
Cannot start import of packages with views because not all import packages with tables are loaded successfully.
WARNING: 2009-08-12 10:22:25
1 error(s) during processing of packages.
INFO: 2009-08-12 10:22:25
Import Monitor is stopped.
sapinst_dev.log
ERROR 2009-08-12 10:22:25.718
CJSlibModule::writeError_impl()
CJS-30022 Program 'Migration Monitor' exits with error code 103. For details see log file(s) import_monitor.java.log, import_monitor.log.
TRACE 2009-08-12 10:22:25.718 [iaxxejsbas.hpp:483]
EJS_Base::dispatchFunctionCall()
JS Callback has thrown unknown exception. Rethrowing.
ERROR 2009-08-12 10:22:25.734 [sixxcstepexecute.cpp:951]
FCO-00011 The step runMigrationMonitor with step key |NW_ABAP_DB|ind|ind|ind|ind|0|0|NW_CreateDBandLoad|ind|ind|ind|ind|8|0|NW_ABAP_Import_Dialog|ind|ind|ind|ind|5|0|NW_ABAP_Import|ind|ind|ind|ind|0|0|runMigrationMonitor was executed with status ERROR ( Last error reported by the step :Program 'Migration Monitor' exits with error code 103. For details see log file(s) import_monitor.java.log, import_monitor.log.).
TRACE 2009-08-12 10:22:25.781 [iaxxgenimp.cpp:752]
CGuiEngineImp::showMessageBox
<html> <head> </head> <body> <p> An error occurred while processing service SAP ERP 6.0 Support Release 3 > SAP Systems > Oracle > High-Availability System > Based on AS ABAP > Database Instance( Last error reported by the step :Program 'Migration Monitor' exits with error code 103. For details see log file(s) import_monitor.java.log, import_monitor.log.). You may now </p> <ul> <li> choose <i>Retry</i> to repeat the current step. </li> <li> choose <i>View Log</i> to get more information about the error. </li> <li> stop the task and continue with it later. </li> </ul> <p> Log files are written to C:\Program Files/sapinst_instdir/ERP/SYSTEM/ORA/HA/ABAP/DB. </p> </body></html>
TRACE 2009-08-12 10:22:25.781 [iaxxgenimp.cpp:1255]
CGuiEngineImp::acceptAnswerForBlockingRequest
Waiting for an answer from GUI
sapinst.log
WARNING 2009-08-12 10:22:25.718
Execution of the command "C:\j2sdk1.4.2_21-x64\bin\java.exe -classpath migmon.jar -showversion -Xmx1024m com.sap.inst.migmon.imp.ImportMonitor -sapinst" finished with return code 103. Output:
java version "1.4.2_21"
Java(TM) Platform, Standard Edition for Business (build 1.4.2_21-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.4.2_21-b03, mixed mode)
Import Monitor jobs: running 1, waiting 1, completed 26, failed 0, total 28.
Loading of 'DD03L' import package: ERROR
Import Monitor jobs: running 0, waiting 1, completed 26, failed 1, total 28.
ERROR 2009-08-12 10:22:25.718
CJS-30022 Program 'Migration Monitor' exits with error code 103. For details see log file(s) import_monitor.java.log, import_monitor.log.
ERROR 2009-08-12 10:22:25.734
FCO-00011 The step runMigrationMonitor with step key |NW_ABAP_DB|ind|ind|ind|ind|0|0|NW_CreateDBandLoad|ind|ind|ind|ind|8|0|NW_ABAP_Import_Dialog|ind|ind|ind|ind|5|0|NW_ABAP_Import|ind|ind|ind|ind|0|0|runMigrationMonitor was executed with status ERROR ( Last error reported by the step :Program 'Migration Monitor' exits with error code 103. For details see log file(s) import_monitor.java.log, import_monitor.log.).
any idea
Regards
ABHhi
All logs are above (include import_monitor.log and java)
thanks -
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 ProcedureThe 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 -- -
Getting error SQL Error : ORA-14551: cannot perform a DML operation inside a query
Hi gurus ,
Your help is greatly appreciated ..
I am doing some changes in the fucntion for an existing package .Introducing the new below check , am updating one of the tables based on a if condition ..
IF numALLOWED_COUNT >= numLAST_COUNT_ADDED+1 THEN
blnGDS_Allowed :=True;
varSTMT := 'UPDATE PROD.TMS_PROCESS_COUNTER ';
varSTMT := varSTMT ||' SET last_count_added = last_count_added+1';
varSTMT := varSTMT ||' WHERE process_name = ''DAILY_GDS_COUNT''';
varSTMT := varSTMT ||' AND COUNTER_IND = ''750FD130''';
PROC_LOG('Update Tms_Process_counter varSTMT --' || varSTMT);
IF INSERT_BATCH(99,varSTMT) > 0 THEN
NULL;
END IF;
Function for insert_batch :
UNCTION INSERT_BATCH(numTABLE_ID IN NUMBER, varSQL_STATEMENT IN VARCHAR2) RETURN NUMBER IS
varINSERT_BATCH_STMT VARCHAR2(32767) := NULL;
varADD_REC_TYPE BATCH_TABLES.ADD_REC_TYPE%TYPE;
BEGIN
PROC_LOG( 'INSIDE INSERT_BATCH IRC : ' || varSQL_STATEMENT ); --IRC 9/20 UC
INSERT INTO BATCH_STATEMENT(QUEUE_ID,TABLE_ID,STATEMENT,QUEUE_SEQUENCE_ID)
VALUES (numQUEUE_ID,numTABLE_ID,varSQL_STATEMENT,1);
RETURN 1;
EXCEPTION WHEN OTHERS THEN
PROC_LOG('Failed in INSERT_BATCH');
PROC_LOG('SQL Error : ' || SUBSTR(SQLERRM,1,1000));
RETURN -1;
END INSERT_BATCH;
desc PROD.BATCH_STATEMENT
QUEUE_ID NUMBER(15) NOT NULL
TABLE_ID NUMBER(2) NOT NULL
STATEMENT VARCHAR2(4000 BYTE) NOT NULL
QUEUE_SEQUENCE_ID NUMBER(5) NOT NULL
Some how when its calling the insert_batch , its giving me the error in the logs as below:
04:01:41 - Update Tms_Process_counter varSTMT --UPDATE PROD.TMS_PROCESS_COUNTER SET last_count_added = last_count_added+1 WHERE process_name = 'DAILY_GDS_COUNT' AND COUNTER_IND = '750FD130'
04:01:41 - INSIDE INSERT_BATCH IRC : UPDATE PROD.TMS_PROCESS_COUNTER SET last_count_added = last_count_added+1 WHERE process_name = 'DAILY_GDS_COUNT' AND COUNTER_IND = '750FD130'
04:01:41 - Failed in INSERT_BATCH
04:01:41 - SQL Error : ORA-14551: cannot perform a DML operation inside a querySome how when its calling the insert_batch , its giving me the error in the logs as below:
04:01:41 - SQL Error : ORA-14551: cannot perform a DML operation inside a query
Yes - and the exception is telling you EXACTLY what the problem is. You have a query
IF INSERT_BATCH(99,varSTMT) > 0 THEN
And you are performing a DML operation inside that query:
INSERT INTO BATCH_STATEMENT(QUEUE_ID,TABLE_ID,STATEMENT,QUEUE_SEQUENCE_ID)
VALUES (numQUEUE_ID,numTABLE_ID,varSQL_STATEMENT,1);
Like the exception says: you can't do that.
You need to call the function using PL/SQL and capture the return value into a variable. Then test that variable:
myVar := INSERT_BATCH(99,varSTMT);
if myVar > 0 THEN -
SAP installation stopped at ABAP load error: sql error '12537'
Hi ,
I am installing SAP ECC 6.0 with EHP4 and ABAP with Oracle 11G on AIX 6.1 load ended up with the error as below, please help
Import Monitor jobs: running 3, waiting 13, completed 9, failed 3, total 28.
Loading of 'TODIR' import package: OK
Import Monitor jobs: running 2, waiting 13, completed 10, failed 3, total 28.
Import Monitor jobs: running 3, waiting 12, completed 10, failed 3, total 28.
Loading of 'SAPPOOL' import package: ERROR
Import Monitor jobs: running 2, waiting 12, completed 10, failed 4, total 28.
Loading of 'E071K' import package: OK
Import Monitor jobs: running 1, waiting 12, completed 11, failed 4, total 28.
Import Monitor jobs: running 2, waiting 11, completed 11, failed 4, total 28.
Import Monitor jobs: running 3, waiting 10, completed 11, failed 4, total 28.
Loading of 'SAPSDOCU' import package: ERROR
Import Monitor jobs: running 2, waiting 10, completed 11, failed 5, total 28.
Loading of 'SAPSPROT' import package: OK
Import Monitor jobs: running 1, waiting 10, completed 12, failed 5, total 28.
Import Monitor jobs: running 2, waiting 9, completed 12, failed 5, total 28.
Import Monitor jobs: running 3, waiting 8, completed 12, failed 5, total 28.
Loading of 'SAPSLOAD' import package: ERROR
Import Monitor jobs: running 2, waiting 8, completed 12, failed 6, total 28.
Loading of 'SAPCLUST' import package: OK
Import Monitor jobs: running 1, waiting 8, completed 13, failed 6, total 28.
Import Monitor jobs: running 2, waiting 7, completed 13, failed 6, total 28.
Import Monitor jobs: running 3, waiting 6, completed 13, failed 6, total 28.
Loading of 'SAPUSER' import package: ERROR
Import Monitor jobs: running 2, waiting 6, completed 13, failed 7, total 28.
tail -20 SAPSSRC.log
DbSl Trace: CONNECT failed with sql error '12537'
DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12537
DbSl Trace: CONNECT failed with sql error '12537'
(DB) ERROR: db_connect rc = 256
DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12537
DbSl Trace: CONNECT failed with sql error '12537'
DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12537
DbSl Trace: CONNECT failed with sql error '12537'
(DB) ERROR: DbSlErrorMsg rc = 99
/usr/sap/HRQ/SYS/exe/uc/rs6000_64/R3load: job finished with 1 error(s)
/usr/sap/HRQ/SYS/exe/uc/rs6000_64/R3load: END OF LOG: 20111105170542
tail -20 FUPARAREF.log
DbSl Trace: CONNECT failed with sql error '12537'
DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12537
DbSl Trace: CONNECT failed with sql error '12537'
(DB) ERROR: db_connect rc = 256
DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12537
DbSl Trace: CONNECT failed with sql error '12537'
DbSl Trace: OCI-call 'OCIServerAttach' failed with rc=12537
DbSl Trace: CONNECT failed with sql error '12537'
(DB) ERROR: DbSlErrorMsg rc = 99
/usr/sap/HRQ/SYS/exe/uc/rs6000_64/R3load: job finished with 1 error(s)
/usr/sap/HRQ/SYS/exe/uc/rs6000_64/R3load: END OF LOG: 20111105170611Reasons can be many, you please check whether oracle and listener are up or not. Check 'R3trans -d' and trans.log
Similar problem thread -
error when applying PI_BASIS patch SAPKIPYM03 on ECC 6
Thanks -
SQL error 60 occurred when accessing table "STXH ".
Hi Friends,
I have written a BAPI to create a sales order wihch would store the Texts in differant Text id like, operating comments, shipping instructinos, warehouse instructions and the table stored in the table STXH.
In my program i am trying to insert three type of Text id ...Operating instructions, Shipping instructions and Warehouse information. If i am running through the debug, the sales order is created and the respective Text Ids are stored in the respetive Text Id. But when just run the progam, it gives me an error saying the table in / wa sin a deadlock sitation.
Has anyone faced this kind of situation. Pls suggest me ad as also this is an urgetnt sittuation here.
Thanks in advance.
Venky.Hi Santhosh,
Didn't get a chance to log into this for a long time. I am again facing this problem after using this function for a differant object. Is there any other possible way ?
Thanks,
Venky. -
I created a calculated column "Expiration Date" in SharePoint 2010 with formula, =IF([Contingent Hire]=TRUE,(Created+90),(IF([Contingent Hire]=FALSE," ")))
This works in the SharePoint list but when I go to edit the Edit Form in Designer. I get the error specified in the title of this post. I'm trying to make it so the Expiration Date is blank when another column, "Contingent Hire" (a YES/No
column) is FALSE.
The Edit Form is essentially a DataViewWebpart. If I remove the " ", like so, "(IF([Contingent Hire]=FALSE,))" from the calc column, the error goes away; however, the Expiration Date field does not
remain blank like I want it to.
Does anyone have any suggestions? (Below is the error generated when I open Designer and then try to open the Edit form for the corresponding list containing the calc column)
JackSki123Hi Jack,
Could you provide a screenshot about this issue?
As Dimitri suggested, you can install the update for your SharePoint Designer and check again.
And you can also check if you can display "NA" instead of " " in your calculated column per the following post.
http://rajeshspillai.blogspot.in/2012/03/server-returned-non-specific-error-when.html
Thanks
Daniel Yang
TechNet Community Support -
Got "Unknown error occured" when access to the Approval page in Project Server 2013
So long time find the solution, but cn't. Pls. help me
Hi,
Let's verify the following:
Whether the issue exists in all of the users? Done a test with a user with full control permission, compare the results.
What is the current SP\CU version installed on Server? deploy the latest CU, compare the results.
Whether the issue exists in other browsers, done a test in another browser, compare the results.
Whether all resources experiencing this error.
"An Unknown Error has occurred" is a generic error message. Please check ULS log for more detail information about the issue.
In addition, as this issue is related to project server, I suggest you create a new thread on project server, more experts will assist you:
https://social.technet.microsoft.com/Forums/projectserver/en-US/home?category=project
Best Regards,
Lisa Chen
Lisa Chen
TechNet Community Support
Maybe you are looking for
-
When I go on the App Store App on my Iphone my Apple ID is not correct. It is the email address of someone on my contact list. How can I correct this and replace the incorrect Apple ID with my ID?
-
Start webpage with applet from a Form gives an error.
Hi all, In E-business suit I try to start a web page from payables-->invoices. I do this with the zoom button. When I try to open a normal website it works fine. But when I open the site I want, with an applet on it, I get a fatal error and my explor
-
Windows 7 Crashes (Blue Screen Of Death) As Soon As My iPhone4 Connects
Ok, so I have Windows 7 with the latest version of iTunes and the latest software version for my iPhone4, everything was working fine until just the other day, whenever I plug my iPhone into my computer, as soon as it makes that little noise when it
-
How to insert a query into a NEW workbook ?
Hi Friends, Could some one tell me how to insert a query into a new workbook? i am trying to run query in NW2004S BEx Query Designer, which always open the query on web when executed. i want to run the query in NW2004S BEx Query Designer and want it
-
Oracle Gurus, I have defined pick grouping rule by itemwise, as per this parameter when I release sales orders.. should be picked up by itemwise. Example: Order Number Item Qty 100001 A 200 100001 B 111 100002 A 300 10