Error while creating package
Hi,
I am trying to create this procedure inside a package but i am getting the below mentioned error, but when i run the SELECT statement alone, it works fine
but when creating package it throws the error, can anyone please help me in this.
PROCEDURE Selections(
p_Last IN VARCHAR2,
p_CurrentTime IN VARCHAR2,
p_Selections OUT NUMBER
IS
BEGIN
SELECT CODE, AMOUNT,INSERT_DATE FROM
(SELECT b.CODE, a.AMOUNT,a.INSERT_DATE, ROW_NUMBER()
OVER(PARTITION BY b.CODE ORDER BY a.INSERT_DATE) AS SEQ
FROM PAYMENTS a,SB b
WHERE a.INSERT_DATE > p_Last
AND a.INSERT_DATE <= p_CurrentTime
AND a.TYPE = 'X'
AND a.P_CODE IS NULL
AND a.ACCT=b.C_CODE)
WHERE SEQ = 1;
END Selections;
After throwing the error the cursor is positioned between OVER[CURSOR](PARTITION BY b.CODE ORDER BY a.INSERT_DATE) AS SEQ
Error Message:
PLS-00103: Encountered the symbol "(" when expecting one of the following:
, from
Thanks
If you have to use dynamic SQL because of V 8i, try this (not tested):
PROCEDURE Selections(
p_Last IN VARCHAR2,
p_CurrentTime IN VARCHAR2,
p_Selections OUT NUMBER
IS
l_code NUMBER;
l_amount NUMBER;
l_insert_date DATE;
BEGIN
execute immediate
'SELECT code,'||
'amount,'||
'insert_date '||
'FROM ('||
'SELECT b.code,'||
'a.amount,'||
'a.insert_date,'||
'row_number() over(PARTITION BY b.code ORDER BY a.insert_date) AS seq '||
'FROM payments a,'||
'sb b '||
'WHERE a.insert_date > p_last '||
'AND a.insert_date <= p_currenttime '||
'AND a.type = '||''''||'X '||''''||
'AND a.p_code IS NULL '||
'AND a.acct = b.c_code'||
') '||
'WHERE seq = 1'
INTO l_code,
l_amount,
l_insert_date
dbms_output.put_line(l_code);
dbms_output.put_line(l_amount);
dbms_output.put_line(l_insert_date);
END selections;Regards,
Gerd
Similar Messages
-
ORA-12571 error while creating packages from Windows clients
Hello,
We are facing the ORA-12571 error while creating / replacing packages from Windows Clients connected to a 8.1.7.2.0 db on a Solaris server.
However, there are
1. no errors in connecting and creating transactions from a Sql session
2. no errors in creating / replacing unwrapped/wrapped small (few lines) packages
3. no errors in connecting from a Unix session (remote telnet sessions inclusive).
This happens only when creating wrapped/unwrapped packages, source code of which is greater than 500 kb approx.
Can somebody help me resolve this issue. Any Help would be greatly appreciated.
Regards.
Lakshmanan, KUpdate: I had unintentionally left my custom tablespace in READONLY state after an earlier experiment with transportable tablespaces. After putting the tablespace back into READ WRITE mode and creating a new template, I was successfully able to create a new db from the template.
I'm still a little curious why this procedure wouldn't work properly with a READONLY tablespace, however.
Ben -
Error while creating Package body
Hi I tried the following package is created but body is created with errors
CREATE OR REPLACE PACKAGE pack_ttt IS
TYPE rec_ttt_colinfo IS RECORD (
columnName VARCHAR2(30));
TYPE nt_ttt_colInformation IS TABLE OF rec_ttt_colinfo;
FUNCTION getColumns(schemaNm VARCHAR2 , TableNm VARCHAR2)
RETURN nt_ttt_colInformation;
END;
CREATE OR REPLACE PACKAGE BODY pack_ttt IS
function getColumns(
schemaNm VARCHAR2 ,
TableNm VARCHAR2)
RETURN nt_ttt_colInformation IS
colvarfunc1 nt_ttt_colInformation;
EXECUTE IMMEDIATE 'SELECT COLUMN_NAME, DATA_TYPE FROM ALL_TAB_COLUMNS WHERE OWNER = ''' || schemaNm || ''' AND TABLE_NAME = ''' || TableNm || ''''
BULK COLLECT INTO columnsList;
RETURN colvarfunc1;
END;
END;And the error is
LINE/COL ERROR
7/20 PLS-00103: Encountered the symbol "SELECT COLUMN_NAME, DATA_TYPE
FROM ALL_TAB_COLUMNS WHERE OWNER =" when expecting one of the
following:
:= . ( @ % ; not null range default character
The symbol ":=" was substituted for "SELECT COLUMN_NAME,
DATA_TYPE FROM ALL_TAB_COLUMNS WHERE OWNER =" to continue.
8/7 PLS-00103: Encountered the symbol "BULK" when expecting one of
the following:
* & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LINE/COL ERROR
LIKE4_ LIKEC_ between || member SUBMULTISET_Why are you using dynamic SQL, there is absolutely no need for that. And the way you are using it is plain wrong, since it is subject to SQL injection and hard parsing.
CREATE OR REPLACE PACKAGE BODY pack_ttt IS
FUNCTION getcolumns (
schemanm VARCHAR2,
tablenm VARCHAR2
RETURN nt_ttt_colinformation IS
colvarfunc1 nt_ttt_colinformation;
BEGIN
SELECT column_name,
data_type
BULK COLLECT INTO columnslist
FROM all_tab_columns
WHERE owner = schemanm
AND table_name = tablenm;
RETURN colvarfunc1;
END;
END;
/Don't get into the habbit of doing dynamic sql, it just demonstrates that you have no clue whatsoever as to what you are dealing with.
Regards
Peter -
Dump error while creating or double click the info package
Hello experts,
I have actived infocube 0FIAR_C03 in BI content. Ago, The creation infopackage have been deleted in the past , today, I created a infopackage, while I update mode selected u2018initialize delta processu2019, then click save button , the system prompt u2018Deltas already loaded for request REQU_D64R47LDUSZHY9CBIB86WMLFJ init.selection; no 2. initu2019, I canoti save it for my setting. Why is this?
Then I have search cause in SDN, and I have reference OSS Note 852443 to do .
Note 852443 have mention some table: RSSELDONE、RSSDLINIT、RSSDLINITSEL、ROOSPRMSC、ROOSPRMSF.
I have to delete that request of record using se16 in these tables: RSSELDONE、RSSDLINIT、RSSDLINITSEL.
in my BI 7.0 system, ROOSPRMSC、ROOSPRMSF is no any data.
I was no found delta queue in RSA7.
Now . Dump error while creating or double click the info package, how can I change this?
Please let me know the solution.
Thanks for your help.
Best Regards
SteveHere are some links which deals with same issue.
Re: Dump In Infopackage
Re: Getting into Short dump at the time of selecting InfoPackage to execute for
Short dump while performing init in infopackage
Re: Infopackage going into short dump
Thanks. -
Error while creating procedure and package
Hi,
I am getting an error while creating an procedure
create or replace procedure mke_test (mke_gender varchar2) is
begin
declare global temporary table mag_hotline_glob
INDIVIDUAL_ID NUMBER,
ONE_MONTH NUMBER,
THREE_MONTH NUMBER,
SIX_MONTH NUMBER,
TWELVE_MONTH NUMBER,
CHILDREN_PRES VARCHAR2(1 BYTE)
) with replace on commit preserve rows not logged;
begin
insert into mag_hotline_glob
select * from magazine_gender;
end;
end;
can anybody plz suggestIt's a total mess. You need to read the documentation first.
Create your table separately
CREATE global temporary table mag_hotline_glob(INDIVIDUAL_ID NUMBER,
ONE_MONTH NUMBER,
THREE_MONTH NUMBER,
SIX_MONTH NUMBER,
TWELVE_MONTH NUMBER,
CHILDREN_PRES VARCHAR2(1 BYTE)) with replace on commit preserve rows not logged;Then use the procedure (I don't know why, this INSERT statement you can fire yourself)
create or replace procedure mke_test(mke_gender varchar2) is
begin
insert into mag_hotline_glob
select * from magazine_gender;
end;If you want to create the GTT inside the procedure(should be avoided) then Use EXECUTE IMMEDIATE.
By the way, where are you using the IN parameter ? It' unnecessary. -
Error while creating a new entity row for testEO
Hi All,
I have a 1st page where I enter the employeeNumber and that particular parameter should get displayed in the 2nd page when I click on the "SubmitButton".I am moving to the 2nd page using pageContext.forwardImmediately.I am passing my parameter with this URL.But, I am getting "Error while creating a new entity row for testEO" in my code before i enter anything in " employeeNumber " field in the 1st page.
My CO code is:
/*===========================================================================+
| Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+===========================================================================+
| HISTORY |
+===========================================================================*/
package xxfc.oracle.apps.test.OAProject1.webui;
import com.sun.java.util.collections.HashMap;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
import oracle.jbo.Row;
import xxfc.oracle.apps.test.OAProject1.server.testVOImpl;
* Controller for ...
public class testCO extends OAControllerImpl
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAApplicationModule am =(OAApplicationModule) pageContext.getApplicationModule(webBean);
testVOImpl vo1 = (testVOImpl)am.findViewObject("testVO1");
vo1.executeQuery();
Row r = vo1.first();
System.out.println("**************Error in the below Line**********************");
Row row = vo1.createRow();
vo1.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
OAApplicationModule am =(OAApplicationModule) pageContext.getApplicationModule(webBean);
OAViewObject vo1 = (OAViewObject)am.findViewObject("testVO1");
if(!vo1.isPreparedForExecution())
vo1.executeQuery();
Row row = vo1.getCurrentRow();
am.getOADBTransaction().commit();
String strEvent = pageContext.getParameter(EVENT_PARAM);
if (strEvent.equals("update"))
String custId = pageContext.getParameter("CustID");
pageContext.putParameter("CstID",custId);
HashMap hashMap = new HashMap();
hashMap.put("CustomerId",custId);
am.getOADBTransaction().commit();
pageContext.forwardImmediately("OA.jsp?page=/xxfc/oracle/apps/test/OAProject1/webui/popupPG&CustID=custId",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
hashMap, //hashmap
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES
thanks,
AkshataHi Niranjana,
It did not work I am getting the same error.does the WHO column order in the table matters? My WHO columns are in the below order:
LAST_UPDATE_DATE
LAST_UPDATED_BY
LAST_UPDATE_LOGIN
CREATION_DATE
CREATED_BY
my error is:
oracle.jbo.RowCreateException: JBO-25017: Error while creating a new entity row for testEO.
It appears on the top of my page as a message.
Thanks,
Akshata
Edited by: Akshata on Mar 15, 2012 12:29 AM -
Error while creating class java/util/LinkedHashMap$EntryIterator
ORA-29545: badly formed class: User has attempted to load a class (java.util
.LinkedHashMap$EntryIterator) into a restricted package. Permission can be grant
ed using dbms_java.grant_permission(<user>, LoadClassInPackage...
-----Any Suggestion?
regards,
AnjanAnjan,
Pardon me for stating the obvious, but did you do what the error message suggested? In other words, did you grant the required permission?
Good Luck,
Avi. -
Error while creating setuppackage
Hi All,
I am getting the following error while creating a setup package.
0010 tc.mobile.admin.bl Creation of virtual mi instance failed.
Please suggest what can be the reason for the same.
Also i have certain queries while creating a setup package for Mobile 2005 device.
1.While creating a SDA file in the Operating System tab i m not able to see any option for mobile 2005 device.It shows only WINCE/PPC 2002.Can i use this one or do we have to make some settings or something.
2.I have a MI25Tom_en.CAB file for Mobile framework.But i wanted to integrate it with the trustore and some mobileengine config parameters like syncpassword handling option = loca.What i have to do for the same.If i have a cab file with all these integratd can i use that one or server will by itself put the trustore while generating a SDA file.
3.We have to create two components one for Framework and second for install sequence amd we have to install onle creme on the PDA as i read somewhere.Do i need to put JSSE1-0-3_01.CAB somewhere while defining the mobile component or JSSE also i have to install on the PDA before running the setup.cab on PDA.
Please suggest
Thanks
Regards
Devendra PhateHi Devendra,
If you have downloaded Framework sda from SAP market place.
Then generally the name for the MobileComponent is MobileEngineJsp or AWT.
You can also check the name of MobileComponent in MCD.xml by opening sda->mobile-description->mcd.xml.
Search with this name and version in NWA , if search fails then there is some problem with reload or deployment process.
Check the following.
Login to the ABAP system.
Launch transaction sm59. Create new TCP/IP type RFC connection.
Enter some name for the RFC destination. Give program ID = MEMGMT_MOBILE_CONTAINER_SYNC.
Enter appropriate gateway service and host (same as you entered in Visual Admin). Test Connection.
Launch transaction sm30.
Open table MEMGMT_J2EE_DEST . Create a new entry. Enter the name of RFC destination that you created in SM59 in RFC Destination field. Enter some description.
Save the data.
Regards,
Satyendra -
Hi All,
I am getting below error while creating an SR from the backend using API 'CS_ServiceRequest_PUB'.
Error:
API Programming Error (CS_ServiceRequest_PUB.Create_ServiceRequest): An error occurred when validating the descriptive flexfield.
Additional information:Program error: Please inform your support representative that:
FLEXFIELDS SERVER-SIDE VALIDATION package reports error:
validate_desccols() exception: ORA-20005: DVLB.get_default_context() failed. SQLERRM: ORA-01403: no data found
ORA-06512: at "APPS.FND_FLEX_DESCVAL", line 931
ORA-01403: no data found
Error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
I have intialised the context as below while running the stand alone procedure in SQL Developer.
Fnd_Global.apps_initialize (user_id => 1368347,
resp_id => 21739
resp_appl_id => 514 );
We are on 11.5.10.2 and database version is 9i.
Can you please help??
TIA,
SHi Kesava,
I notice that in the package you used the application user_name=CHUNDUK calls the API pa_project_pub.create_project.
I wonder if you used chunduk as database user to execute the package Or you used APPS to execute the package?
The APi document states that it is a requirement to create a db username as the same name with the application username.
I have been running the problem to execute API 's delete project and try to figure what could be my problem.
TIA -
Error while creating web dynpro project from DTR
Hello,
I am getting following error while creating Web Dynpro project from DTR,
org.eclipse.jdt.core.JavaModelException: File /<track name><DC><package>/.classpath is read-only.
Still project gets created but evenif I check out view , it does not allow me to edit it.
Also I have checked in and activated some changes but active copy in DTR is not reflecting those changes.
I tried Add subtree option in DTR perspective for folders in this project. Is it result of that?
Please help me in this regard.
Thank You
BeenaHi Beena,
.classpath file should not checked in to DTR(uncheck the Read only properties). It is local file it contains class path for local system.
Generally in webdynpro project only src folder should be checked in DTR.
Regards
Suresh -
I am getting the following error while creating an Interactive report region on a page. (version - 4.1.0.00.32)
Error Unable to create Dynamic Query page.
ORA-04065: not executed, altered or dropped ORA-04065: not executed, altered or dropped stored procedure "APEX_040100.WWV_FLOW_API" ORA-06508: PL/SQL: could not find program unit being called: "APEX_040100.WWV_FLOW_API"
DBA complied package but the error persists.
Does anyone know how to debug this
Thanks,
PriyankaHello ???,
We are experiencing this too at login in an application. The error is caused by violating the constraint WWV_FLOW_DATA_IDX1 on columns FLOW_INSTANCE, ITEM_ID in table WWV_FLOW_DATA. So for some reason the value of an item in session state is set multiple times.
When looking at the Access view (statement below) I see that there are multiple logins per second for a user (I have seen 12 times as maximum).
select login_name, application, access_date, count(*)
from WWV_FLOW_USER_ACCESS_LOG_V
group by login_name, application, access_date
having count(*) > 1
order by access_date descSince this count of logins varies from 1 to 12, it looks like it is not caused by the application itself, but I also don't have a clue what the root cause is.
Is there anyone else with more information on this issue?
We are on APEX 4.0 and Oracle 11g and the applications have all been built in this environment, so no upgrades have been performed.
Regards, Wouter
Edited by: Wouter Breeuwsma on 31-mei-2012 12:05 -
PDF Error while creating New PCR
Hi All,
i am getting belolw error while creating new PCR, it suppose to open PDF but with out opening it is giveing following error.
The initial exception that caused the request to fail, was:
com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://localhost:50000/AdobeDocumentServices/Config?style=document"
com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: Failed to UPDATEDATAINPDF
Request you guide me to resolve this problem
Thanks,
Srinivasu.YHello Srinivasu,
It seems your Adobe configuration is not correct. Please use SAP note 944221 for troubleshooting.
Also go through online help documentation-
http://help.sap.com/erp2005_ehp_04/helpdata/en/2f/d7844205625551e10000000a1550b0/frameset.htm
Configuration: Business Package for Manager Self-Service->Configuring Adobe Document Services
Regards
Pooja -
Error while creating statspack
i m practicing to create Statspack report
oracle 9.2 on windows
i created a database with the name bkp2. listener up and running.
i had never run the spcreate.sql in this db before
when i did run it i got the below error
Creating Package STATSPACK...
Package created.
No errors.
Creating Package Body STATSPACK...
Warning: Package Body created with compilation errors.
Errors for PACKAGE BODY STATSPACK:
LINE/COL ERROR
1655/6 PL/SQL: SQL Statement ignored
1657/13 PL/SQL: ORA-00942: table or view does not exist
1685/11 PL/SQL: SQL Statement ignored
1705/22 PL/SQL: ORA-00942: table or view does not exist
NOTE:
SPCPKG complete. Please check spcpkg.lis for any errors.the code is running successfully till it starts creating the statspack package body. the tablespace and temp file which is given for the perfstat user have more than 200MB space.
interestingly when i create the same with another database in the system created both through manual and dbca, it runs perfectly.
i dont want the direct solution for this. i jus want to know how i can find out the cause for this. i tried to trace the session i.e. alter session set sql_trace=true;
still i didnt understand how to go about from there and when i searched the error in the trace it didnt appear there!! ... so in such cases how do i pinpoint which statement is causing the error. the line no. is not of much use as the whole code is full of comments in between !!
thank youi m using SYSDBA user only ...
code:
conn sys as sysdba
added:
i v also run spdrop.sql as SYSDBA and tried to re-run the spcreate.sql script several times in this database. still same results. i wonder why this happens jus to this db
i v also created a new tablespace which is not used by any other user objects. and a new temp tablespace and used them while running the spcreate.sql
still same results.
Edited by: iinfi on Oct 31, 2008 8:43 PM -
ESS: Error while creating Family/Dependents record from portal
Hi All,
I'm getting a critical error while creating family members and dependents record from portal.
CRITICAL ERROR
"Type conflict in the ASSIGN statement in the program CL_HRPA_CONVERT_0021_US=======CP ., error key: RFC_ERROR_SYSTEM_FAILURE"
I checked the short dump in R/3 Side and searched for OSS note and didnt find any. I raised an OSS message.
If any had've already comeacross this, pls let me know.
System Details
EP 6.0 SP15
ESS Business Package BPERP4ESS0_0
ESS Support Package ESS10P_2-10002965, PCUIGP010P_1-20000568
Thanks
KarthikHello Karthik:
I'm getting the same error:
"critical error while creating family members and dependents record from portal.
Type conflict in the ASSIGN statement in the program CL_HRPA_CONVERT_0021_US=======CP ., error key: RFC_ERROR_SYSTEM_FAILURE"
Maybe you can help me solving this problem.
I appreciate your help.
Thanks in advance. -
Dear All,
I am getting ORA-20001: Address_Cannot_be_Primary error while creating address record of address type US global.
While analyzing the PYUPIP trace, I found the following piece of the code is causing issue:
File : /* $Header: peusaddlh.pkb 120.0.12010000.2 2010/05/08 09:10:25 lbodired noship $ */
Package : APPS.PER_US_ADD_LEG_HOOK.CREATE_US_ADDRESS
Code check :
IF (p_style <> 'US'
AND P_PRIMARY_FLAG = 'Y'
AND csr_emp_assign%FOUND) THEN
close csr_emp_assign;
hr_utility.set_message (800, 'Address_Cannot_be_Primary');
hr_utility.raise_error;
END IF;
It seems that while applying this check the case of the US Global address style is not taken care.
It has struck the address conversion, as all the records of my client has the address style US Global.
Please suggest how it will effect if for the time being I do following code changes in the seeded package(I know it is not recommened, but can not wait for the patch).
1. Comment the whole check
2. Replace the above code with the follwoing code :
IF (p_style not in ('US','US_GLB')
AND P_PRIMARY_FLAG = 'Y'
AND csr_emp_assign%FOUND) THEN
close csr_emp_assign;
hr_utility.set_message (800, 'Address_Cannot_be_Primary');
hr_utility.raise_error;
END IF;
Looking for the prompt reply.
regards
Devender YadavDear All,
Oracle has supplied the patch 9902020 for the fix of the issue.
Now the payroll install check condition is also added in the check.
Code in the check is now like this :
IF (p_style <> 'US'
AND P_PRIMARY_FLAG = 'Y'
AND csr_emp_assign%FOUND
AND hr_general.chk_product_installed('801') = 'TRUE') THEN
close csr_emp_assign;
hr_utility.set_message (800, 'Address_Cannot_be_Primary');
hr_utility.raise_error;
END IF;
As my client has not installed the payroll, so the fix will work for us.
Thanks to all of you for your replies.
Regards
Devender Yadav
Maybe you are looking for
-
Would like to use 4nr iPads as an autocue system. Can I view the same pdf on multiple iPads at the same time with 1 iPad operating as the master (controlling page turns etc) and the others operating as slaves? Can this be done without the use of 3G o
-
I think I said it in the title
-
How to test scenario in diffrent clients
Hi All, I have created a scenario which involves integrating Tibco and ECC systems. My QSN is how to test my scenarion in different clients. I have tested in 100 client , now i want to test in 300 cleint before moving to QA. Do i need to change my co
-
Just trying to get some more space on my macbook, and for general knowledge, what will happen to my iphoto application if i completely delete the "iphoto library" in finder?
-
Business Catalyst extension no longer working in DW CC 2014.1
I am trying to import a BC site in the new version of Dreamweaver. All I get is a dialog box telling me that I need to install the extension, which is already installed. The Business Catalyst window just shows a link to a video and a 'Get Started' bu