Error while passing date parameters in procedure and commit issue
Hi
1) I am doing a archiveing records and pls find my code below and i have couple of issue,pls find my code and want to ensure the commit is happening every 100000 rows inserted but i am archeiving a huge table but when i checks the table frequently it shows 0 records and after it shows count the actual rows around 20 million records.How can i ensure it commiting on every 100000 records. pls find my code my db version is 10g on windows
CREATE OR REPLACE PROCEDURE doins as
cnt number:=0;
FOR x IN (select * from Call_log
where trunc(c_date) = to_date('11-Aug-2008','DD-MON-YYYY'))
LOOP
INSERT INTO call_arch
select * from Call_log
where trunc(c_date) = to_date('11-Aug-2008','DD-MON-YYYY');
cnt := cnt + 1;
IF( cnt = 10000 )
THEN
cnt := 0;
commit;
END IF;
commit;
END LOOP;
2) Error while passing date as parameter i am getting following errors while passing date parameter pls find my code and errors
CREATE OR REPLACE PROCEDURE doins(p_date date) as
cnt number:=0;
begin
FOR x IN (select * from Call_log
where trunc(c_date) = to_char(p_date,'DD-MON-YYYY'))
LOOP
INSERT INTO call_arch
select * from Call_log
where trunc(c_date) = to_char(p_date,'DD-MON-YYYY');
cnt := cnt + 1;
IF( cnt = 10000 )
THEN
cnt := 0;
commit;
END IF;
commit;
END LOOP;
end;
exec doins(11-Aug-2008) then gives
SQL> exec doins(11-Aug-2008);
BEGIN doins(11-Aug-2008); END;
ERROR at line 1:
ORA-06550: line 1, column 16:
PLS-00201: identifier 'AUG' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
if i gave exec doins(11-08-2008) it gaves
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'DOINS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
rgds
rosh
CREATE OR REPLACE PROCEDURE doins(p_date varchar2) as
cnt number:=0;
begin
FOR x IN (select A.rowid,A.* from Call_log A
where trunc(c_date) = to_date(p_date,'DD-MON-YYYY'))
--hope that's c_date columne is DATE datatype
LOOP
INSERT INTO call_arch
select * from Call_log
where rowid=x.rowid;
cnt := cnt + 1;
IF( cnt = 10000 )
THEN
cnt := 0;
commit;
END IF;
commit;
END LOOP;
end;
thats your correct procedure - but NOT CORRECT ISSUE.
You should use bulk collect with limit clause and forall clause to do it faster!!! Or Merge clause.
Similar Messages
-
Error while passing values to store procedure
Hi,
I wrote a stored procedure by passing 3 in parameters and retrive data from source table and stored into target table.When i execute this pl/sql procedure individuallly(running anonymous block) its working fine,but when i pass the IN parameters through BPEL by posting xml data i am getting error like this
caused by ora-065335 statement string in open is null or 0 length.
nested exception:Error while trying to prepare and execute an API.
Any helpCan you provide your PL/SQL procedure, the XSD, and the XML?
-
Error while passing collection variable into procedure.
Hi Experts,
I'm facing errors while trying to pass the collection variables as in parameter to the procedure.
PLS-00306: wrong number or types of arguments in call
Please suggest me?
Thanks in advance....I'm facing errors while trying to pass the collection variables as in parameter to the procedure.
PLS-00306: wrong number or types of arguments in call
If you want help with code you need to POST THE CODE.
Post the DDL for the procedure that shows how the parameters are defined.
And post the code you are using to CALL that procedure that shows what parameters you are passing and the datatypes for those parameters. -
Error while passing data to custom screen. Entry MUM doesn't exist in T001P
Dear All,
I have created a custom screen for PB10. I am getting below error while executing the screen.
Entry MUM doesn't exist in T001P (Check Entry) .
The detail error is
Entry MUM does not exist in T001P (check entry)
Message no. 00058
Diagnosis
Input values must be defined in Table T001P. The value or values ' MUM ' are not specified in this table.
Procedure
Check whether the input is correct and correct if necessary.
Procedure for System Administration
If this is not an incorrect entry, check the system settings and change them if necessary.
If there is a connection to the Customizing system, you can maintain the system settings by choosing Customizing in the Performance Assistant or Maintain Entries (F5) when displaying the help in a modal dialog box.
I've checked the table and data is available. But still i am getting this error.
I've come across this error earlier while copying standard screen to custom screen.The solution to this problem is you have to set your SET and GET parameter in the properties tab of the field.
regards,
sandeep -
Error while passing date parameter to the XML data definition
Hi All,
I have developed a BI publisher report using XML data definition & RTF template.
This data definition contains a SQL query in it's CDATA section and runs as a concurrent program(without RDF) . We are looking to pass a date parameter to the SQL query and its not accepting the date parameter. However, when we hardcode SYSDATE in the SQL query in place of the parameter, the report runs fine. In the log file it shows that the parameter is being treated in American date style and we are using DD-MON-RRRR format. I have tried to convert the date format however still the error exists.
What we did ?
Created a XML data definition which contains the SQL query in its CDATA section & p_rundate (DATE) parameter.
Registerd the XML data definition as concurrent program with EXECUTABLE= XDODTEXE and Output format as XML with p_date as a date parameter.
Looking for any available solution for the same.
Thanks.Hi All,
I have developed a BI publisher report using XML data definition & RTF template.
This data definition contains a SQL query in it's CDATA section and runs as a concurrent program(without RDF) . We are looking to pass a date parameter to the SQL query and its not accepting the date parameter. However, when we hardcode SYSDATE in the SQL query in place of the parameter, the report runs fine. In the log file it shows that the parameter is being treated in American date style and we are using DD-MON-RRRR format. I have tried to convert the date format however still the error exists.
What we did ?
Created a XML data definition which contains the SQL query in its CDATA section & p_rundate (DATE) parameter.
Registerd the XML data definition as concurrent program with EXECUTABLE= XDODTEXE and Output format as XML with p_date as a date parameter.
Looking for any available solution for the same.
Thanks. -
Error while reading data for Virtual Infoprovider 0TCT_VC11 and 0TCT_VC12
Hi ,
The standard reports based on 0TCT_VC11 and 0TCT_VC12 are working fine in development system. When we moved the following objects to test system ,
0TCT_VC11 - 0TCT_IS11 & 0TCT_DS11
0TCT_VC12 - 0TCT_IS12 & 0TCT_DS12
We are not able to view data either in the MP nor at the report level.We face the following issue
There is still no data source assigned to VirtualProvider 0TCT_VC11
Error reading the data of InfoProvider 0TCT_VC11
Error while reading data; navigation is possible
Can anybody help me on this.
Regards,
Lavanya.Hello Lavanya,
Please activate the direct access for the virtual providers. Also note that it is only possible to use the BI admin cockpit in a myself system.
Please follow the below steps to activate the same:
TX: RSA1 ->Infoproviders-> Business Information-> BI Statistics->select
Virtual provider-> Go to context menu of the virtual cubes-> Activate
Direct Access. ( Eg virtual cube name )
Please also generate the reports by following the below steps:
RSRT -> Query name -> Generate Report.
Regards,
Arvind -
Error While extracting data from FIAA and FIAP
Hi Gurus,
I am facing error while extracting data from R/3 Source. 0FIAA, 0FIAP datasources. I am getting the same error repeatedly. No data will come BW. When I checked in RSA3 I can extract records.
Ther Error is as follows:
Request still running
Diagnosis
No errors could be found. The current process has probably not finished yet.
System response
The ALE inbox of the SAP BW is identical to the ALE outbox of the source system
and/or
the maximum wait time for this request has not yet run out
and/or
the batch job in the source system has not yet ended.
Current status
No Idocs arrived from the source system.
Kindly help. Your points are assured.
Thanks and Regards
PrasadHello Prasad,
Have you already checked what happened in the source system ?
You should verify if a job is running in sm37, or if there is no dump runtime errors due to the extraction in st22.
It could be a clue of what happened in R/3.
Let us know,
Regards,
Mickael -
Getting error , while passing parameters from one page to another page
Hello friends,
i am getting error, while passing parameters from one page to another page, below code i wrote.
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
ArrayList arl=new ArrayList();
EresFrameworkAMImpl am=(EresFrameworkAMImpl)pageContext.getApplicationModule(webBean);
ERecordImpl ERecordObj=new ERecordImpl();
HashMap hMap = new HashMap();
hMap.put("1",ERecordObj.getTransactionName());
hMap.put("2",ERecordObj.getTransactionKey());
hMap.put("3",ERecordObj.getDeferredMode());
hMap.put("4",ERecordObj.getUserKeyLabel());
hMap.put("5",ERecordObj.getUserKeyValue());
hMap.put("6",ERecordObj.getTransactionAuditId());
hMap.put("7",ERecordObj.getRequester());
hMap.put("8",ERecordObj.getSourceApplication());
hMap.put("9",ERecordObj.getPostOpAPI());
hMap.put("10",ERecordObj.getPayload());
// hMap.put(EresConstants.ERES_PROCESS_ID,
if(pageContext.getParameter("item1")!=null)
pageContext.forwardImmediately(EresConstants.EINITIALS_FUNCTION,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
hMap,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES
Error(71,2): method forwardImmediately(java.lang.String, byte, null, java.util.HashMap, boolean, java.lang.String) not found in interface oracle.apps.fnd.framework.webui.OAPageContext
Thanks
krishna.Hi,
You have imported the wrong class for HashMap.
Import
com.sun.java.util.collections.HashMap; instead of java.util.HashMap
Thanks,
Gaurav -
10)example of errors while loading data and how do u resolve them?
)example of errors while loading data and how do u resolve them?
hai ram reddy this is ramprasad reddy....u can get this type of most commen errors....like below
As the frequent failures and errors , there is no fixed reason for the load to be fail , if you want it for the interview perspective I would answer it in this way.
a) Loads can be failed due to the invalid characters
b) Can be because of the deadlock in the system
c) Can be becuase of previuos load failure , if the load is dependant on other loads
d) Can be because of erreneous records
e) Can be because of RFC connections.....(sol: raise the ticket to BASIS team to provide the connection)
f)can be coz of missing master data.
g)can be coz of no data found in the source system.
h)Time stamp error........(sol: activate the data source and replicate the data source and load)
i)Short dump error.........(sol: delete the request and load once again)
j)Data locking when loading in parallel.
k)ODS activation failures.
l)No SID found........(sol: should load masterdata before transaction data) -
BW Datasource and DBConnect with Oracle - Error while Loading Data
Hi,
I have made a DBconnect to Oracle Db and made a datasource for the same.
When I do R Click - Additional Properties - Select Database table - and select one table/view and do"Display Table Properties"
I am able to see the data/records.
After generating the datasource for that table/view and making Infopackage on the same and executing it I get the
following error
"System Response
Caller 09 contains an error message."
"Unknown error while uploading data from the DB table"
"Error in Source System"
Regards,
Surya KumarHi Kumar:
Please check if the SAP below is applicable to your system.
Note 1062350 - "Error when migrating DB connect DataSources"
Regards,
Francisco Milán. -
Pass date parameters to dataprocessor in Java
Hello I have created java class to execute data templates, but I have problem when I pass date parameters as it was from application dataprocessor fails without any error message and does not return any data (except output xml file header). How to pass date parameters correctly?
import java.sql.*;
import oracle.apps.xdo.dataengine.DataProcessor;
import com.sun.java.util.collections.Hashtable;
class oraConn
public static void main (String args []) throws SQLException
System.out.println("Start");
try {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
java.util.Properties ora_property = new java.util.Properties();
Connection conn =
DriverManager.getConnection("jdbc:oracle:thin:user/pass@host:port:sid");
try {
DataProcessor dataProcessor = new DataProcessor();
dataProcessor.setDataTemplate("/home/user/definition.xml");
Hashtable parameters = new Hashtable();
parameters.put("c_period_start_date","2009/01/01 00:00:00");
parameters.put("c_period_end_date","2009/12/31 00:00:00");
parameters.put("c_employed_before_date","");
parameters.put("c_org_hierarchy","63");
dataProcessor.setParameters(parameters);
dataProcessor.setConnection(conn);
dataProcessor.setOutput("/home/user/Out.xml");
dataProcessor.processData();
} catch (Exception e)
{System.out.println ("Data procesor Fail.");}
} catch (SQLException ex) {
System.out.println ("\n*** SQLException caught ***\n");
while (ex != null) {
System.out.println ("SQLState: " + ex.getSQLState ());
System.out.println ("Message: " + ex.getMessage ());
System.out.println ("Vendor: " + ex.getErrorCode ());
ex.printStackTrace();
ex = ex.getNextException ();
System.out.println ("");
}}}}Found out solution to my problem. I needed to import date not as string but as Date type.
-
Error while saving date value in Java dictionary
Hello Everybody,
I got following error while saving date value in one of the fields of the Java table.
Internal error occured in submit request: Error in method updateRequestContact : The object of type java.sql.Date with the value '2005-12-04 08:00:00.0' assigned to host variable 9 is not normalized. It must not contain time components in the time zone running the virtual machine.
I can't find why it is taking time value in the date object.
This value is coming from the RFC as a date value, and I am saving this value in Java dictionary table.
Same code for this was working fine earlier. But, now suddenly it gives error like this.
Even if I provide date on the screen from webdynpro application, this date value can't save in the Java dictionary and gives same error.
What should be the problem behind this?
Regards,
BhavikHi Satyajit,
I am getting date value from the screen of the webdynpro application from date picker control and passing this value in Java dictionary.
More Information:
I have dat value in the Date object: <b>target_date</b>
But Now I have made new Date object as following:
Date target_Date1 = new Date(target_date.getYear(),target_date.getMonth(),target_date.getDate());
Then I am passing this object to Java dictionary. Still it gives same error.
Then I have changed code as following:
int l_year;
int l_month;
int l_days;
l_year = target_Date.getYear();
l_month = target_Date.getMonth();
l_days = target_Date.getDate();
Date target_Date1 = new Date(l_year,l_month,l_days);
Now it works for me.
But I guess this is not the perment solution. It looks very strange. I have used so many date objects at various palces. So, this solution is not the final for me.
I want to findout the main cause of it.
One more thing: This code was working for a mornth or two. But, now suddenly it is giving this error.
Please help me if anybody knows.
Regards,
Bhavik -
Error while selecting date from external table
Hello all,
I am getting the follwing error while selecting data from external table. Any idea why?
SQL> CREATE TABLE SE2_EXT (SE_REF_NO VARCHAR2(255),
2 SE_CUST_ID NUMBER(38),
3 SE_TRAN_AMT_LCY FLOAT(126),
4 SE_REVERSAL_MARKER VARCHAR2(255))
5 ORGANIZATION EXTERNAL (
6 TYPE ORACLE_LOADER
7 DEFAULT DIRECTORY ext_tables
8 ACCESS PARAMETERS (
9 RECORDS DELIMITED BY NEWLINE
10 FIELDS TERMINATED BY ','
11 MISSING FIELD VALUES ARE NULL
12 (
13 country_code CHAR(5),
14 country_name CHAR(50),
15 country_language CHAR(50)
16 )
17 )
18 LOCATION ('SE2.csv')
19 )
20 PARALLEL 5
21 REJECT LIMIT UNLIMITED;
Table created.
SQL> select * from se2_ext;
SQL> select count(*) from se2_ext;
select count(*) from se2_ext
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04043: table column not found in external source: SE_REF_NO
ORA-06512: at "SYS.ORACLE_LOADER", line 19It would appear that you external table definition and the external data file data do not match up. Post a few input records so someone can duplicate the problem and determine the fix.
HTH -- Mark D Powell -- -
Error While entering data in VA01
Hi,
I get the following error while entering data for "Plant" in Sales order creation (VA01). Can anyone please tell me how to solve this problem.
Runtime Errors SAPSQL_INVALID_TABLENAME
Except. CX_SY_DYNAMIC_OSQL_SEMANTICS
Date and Time 27.04.2009 12:57:13
Short dump has not been completely stored (too big)
Short text
A table name, specified in an SQL command, is unknown.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLV61Z" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
not caught in
procedure "SEL_KONDTAB" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
An invalid table name "A996" was specified in an Open SQL command:
Due to one of the following reasons, the error occurs only at runtime:
- the table name was specified dynamically, or
- the SELECT clause, WHERE clause, GROUP-BY clause, HAVING clause, or
ORDER-BY clause was specified dynamically.
Missing RAISING Clause in Interface
Program SAPLV61Z
Include LV61ZU01
Row 260
Module type (FORM)
Module Name SEL_KONDTAB
Trigger Location of Exception
Program SAPLV61Z
Include LV61ZU01
Row 724
Module type (FORM)
Module Name SEL_KONDTAB
Source Code Extract
Line SourceCde
694 and kschl = se_kschl
695 and datbi >= se_date
696 and datab <= se_date
697 and (coding_tab).
698 endif.
699 endif.
700 else.
701 if t681-ksdat is initial.
702 if not <entrytab> is assigned.
703 select * from (t681-kotab) appending table <cond_tab>
704 where kappl = se_kappl
705 and kschl = se_kschl
706 and (coding_tab).
707 else.
708 select * from (t681-kotab) appending table <cond_tab>
709 for all entries in <entrytab>
710 where kappl = se_kappl
711 and kschl = se_kschl
712 and (coding_tab).
713 endif.
714 h_subrc = sy-subrc.
715 if select_split ne 0.
716 modify coding_tab from coding_alter index select_split.
717 select * from (t681-kotab) appending table <cond_tab>
718 where kappl = se_kappl
719 and kschl = se_kschl
720 and (coding_tab).
721 endif.
722 else.
723 if not <entrytab> is assigned.
>>>>> select * from (t681-kotab) appending table <cond_tab>
725 where kappl = se_kappl
726 and kschl = se_kschl
727 and datbi >= se_date
728 and datab <= se_date
729 and (coding_tab).
730 else.
731 select * from (t681-kotab) appending table <cond_tab>
732 for all entries in <entrytab>
733 where kappl = se_kappl
734 and kschl = se_kschl
735 and datbi >= se_date
736 and datab <= se_date
737 and (coding_tab).
738 endif.
739 h_subrc = sy-subrc.
740 if select_split ne 0.
741 modify coding_tab from coding_alter index select_split.
742 select * from (t681-kotab) appending table <cond_tab>
743 where kappl = se_kappl
Thank you in advance....
Regards,
Sriram.An invalid table name "A996" was specified
in an Open SQL command
Find out the transport request pertaining to Table A996 and ensure that both that request and the configuration request pertaining to that table are moved simultaneously.
thanks
G. Lakshmipathi -
Error while reading data through External Table!!!
CREATE TABLE "COGNOS"."EXT_COGNOS_TBS9_TEST"
( "ITEM_DESC" VARCHAR2(200 BYTE),
"EXT_CODE" VARCHAR2(20 BYTE),
"RC_DATE" DATE,
"RES_KD_AMNT" NUMBER(18,3),
"RES_FC_AMNT" NUMBER(18,3),
"NRES_KD_AMNT" NUMBER(18,3),
"NRES_FC_AMNT" NUMBER(18,3),
"TOTAL" NUMBER(18,3),
"OF_WHICH_OVR1" NUMBER(18,3)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY "EXTDATADIR"
ACCESS PARAMETERS
( RECORDS
DELIMITED BY NEWLINE LOAD WHEN *({color:#ff0000}EXT_CODE LIKE 'TBS9%'{color})* FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL )
LOCATION
( 'TBS9_TEST.CSV'
External table creation went through successfully but am getting error while reading data. Am quite sure error is because of above line in red color. Could you please help me in transforming logic.
Thanks in Advance,
APLet's start with the basics...
1) You state that you are getting an error. What error do you get? Is this an Oracle error (i.e. ORA-xxxxx)? If so, please include the error number and the error message as well as the triggering statement. Or is the problem that rows are getting written to the reject file and errors are being written to the log file? If so, what record(s) are being rejected and what are the reasons given in the log file? Or perhaps the problem is something else?
2) You state that you are quite sure that the problem relates to the hilighted code. What makes you quite sure of this?
Justin
Maybe you are looking for
-
Error during Unicode Conversion - Import
Hi, I am doing a Unicode conversion, done with the system export, while doing the import during the Import ABAP phase system is throwing the error with R3load. R3load -testconnect fails with following error. emalonsbx002:wuuadm 18% R3load -testconnec
-
Envy 5530 Unnsuccessful Network Installation
I have purchased a HP Envy 5532 a few months ago and i worked, then it stopped connecting so I reinstalled everything and reinstalled it again and I can't get it the printer to connect to my HP Pavillion Laptop My PC is running Windows 8 I have set u
-
Mail Is Only a "MIME Attachment"
I'm away from home trying to get by on an iPod touch standing in for a laptop. One e-mail I received, forwarded (at least) by one AOL user, consists of nothing but a "mime-attachment". I believe I've seen similar things in e-mail on Mail for OS X, bu
-
Hash function in directory server
Dear all, We have a very large database so when we setup our LDAP server, we add a number(between 0 and 256) ou to LDAP schema. The number is calculated from the user email address with a hash function. However we have such a problem when we want to
-
can u pls explain me about idocs. how the sap data fill into idoc? if possible send me the navigation part also.