Retrieval of Information from Excel Sheet using JDBC-ODBC
Hello,
Currently I am writing a program that extracts information fromexcel sheet. This excel sheet have some values in Chinese. I am able to extract English character from the different column in excel, but if some column contain chineese valur then it prints ???. After that I looked on net and found some details in to convert Big5 (Chinese) character into unicode, but this is not working and in that case nothing is displayed. I am attaching the my code. In my code the 'customer' field contain chinese character.
import java.io.ByteArrayInputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.Reader;
import java.io.IOException;
import java.sql.*;
public class ExcelJDBC
Connection con;
Statement stmt;
public ExcelJDBC(String url)
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
catch(java.lang.ClassNotFoundException e)
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
try
con = DriverManager.getConnection(url, "", "");
stmt = con.createStatement();
catch(SQLException ex)
System.out.println("SQL EXCEPTION OCCURED");
System.err.println("SQLException: " + ex.getMessage());
ex.printStackTrace();
public void sql(String sql)
try
stmt.execute(sql);
catch(SQLException ex)
System.out.println("SQL EXCEPTION OCCURED");
System.err.println("SQLException: " + ex.getMessage());
ex.printStackTrace();
public void closeAll()
try
stmt.close();
con.close();
catch(SQLException ex)
System.out.println("SQL EXCEPTION OCCURED");
System.err.println("SQLException: " + ex.getMessage());
ex.printStackTrace();
//big5 to unicode conversion
private String b2u(String str2convert) throws IOException
System.out.println("The input string is :" + str2convert);
StringBuffer buffer = new StringBuffer();
byte[] targetBytes = str2convert.getBytes();
ByteArrayInputStream stream = new ByteArrayInputStream(targetBytes);
InputStreamReader isr = new InputStreamReader(stream,"Big5");
Reader in = new BufferedReader(isr);
int chInt;
while((chInt = in.read()) < -1)
buffer.append((char)chInt);
in.close();
System.out.println("The output string is :" + buffer.toString());
return buffer.toString();
public void sqlQuery(String sql)
try
ResultSet rc = stmt.executeQuery(sql);
if(rc != null)
int count = 0;
while (rc.next())
String value = "";
value = b2u(rc.getString("workorder"));
System.out.println("The workorder is : "+value);
String customer = rc.getString("Customer");
value = b2u(customer);
System.out.println("The Customer is : "+value);
count++;
System.out.println("Entering in loop " count " time.\n");
catch(SQLException ex)
System.out.println("SQL EXCEPTION OCCURED");
System.err.println("SQLException: " + ex.getMessage());
ex.printStackTrace();
catch(IOException ex)
System.out.println("IO EXCEPTION OCCURED");
System.err.println("IOException: " + ex.getMessage());
ex.printStackTrace();
public static void main(String[] args)
String url = "jdbc:odbc:detailsdsn";
try
ExcelJDBC ej = new ExcelJDBC(url);
ej.sqlQuery("SELECT \"workorder\", \"Customer\" FROM \"Sheet1$\"");
ej.closeAll();
catch(Exception ex)
System.out.println("SQL EXCEPTION OCCURED");
System.err.println("SQLException: " + ex.getMessage());
ex.printStackTrace();
I will highly appriciate any answer of my problem.
Regards,
Ruchi
Try to find out, what characters really are in your string customer.
I assume you used System.out.print..(), when you got them as '?'.
Find out which unicodes they are!
Afterwards I see two possibilites:
Either
1) you see real unicodes for Chinese characters, and it was only the unability of System.out to print them others than as '?', then you can convert these characters however you want. Maybe your further processing can handle them directly as unicode.
or
2) you get really '?' in your string. Then Excel (or JDBC or ODBC or ???) hasn't been able to transmit these Chinese characters to your program others than converting them all into '?'. Then you are lost, because you can't know which Chinese character each '?' originally could have been.
Hope this helps.
Please tell us, which you experienced, 1) or 2).
Similar Messages
-
Cannot retrieve the data from excel sheet
hi all ...
i am trying to retrieve the data from excel sheet and at the same time i am inserting the data into mysql database.
code is as follows
try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); conn1=DriverManager.getConnection("jdbc:odbc:"+estr,"",""); Class.forName("com.mysql.jdbc.Driver"); conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/"+ t_dsn ,"root","manager"); sql="select * from student_info"; srch2 = conn.prepareStatement(sql); rs1 = srch2.executeQuery(); String query = "select * from ["+einput+"$]"; String query1= "select count(*) from ["+einput+"$]"; st = conn1.createStatement(); rs = st.executeQuery(query); ResultSetMetaData rsmd = rs.getMetaData(); c = rsmd.getColumnCount();//gets the column count rs1 = st.executeQuery(query1); while (rs1.next()) //loop to get no. of rows { r = rs1.getInt(1); } rs = st.executeQuery(query); for(i=1;i<=r;i++){ rs.next(); for(j=1;j==c;j++) { a = rs.getString(j); b= rs.getString(j); d = rs.getString(j); } rs1.next(); PreparedStatement ps2 = conn.prepareStatement("insert into materials_out values(?,?,?)"); ps2.setString(1,a); ps2.setString(2,b); ps2.setString(3,d); ps2.executeUpdate(); } }catch(Exception e){ e.printStackTrace(); }
but it is showing error as :
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name too long
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3073)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at Outward_register.jButton2ActionPerformed(Outward_register.java:368)
at Outward_register.access$400(Outward_register.java:23)
at Outward_register$5.actionPerformed(Outward_register.java:312)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
at java.awt.Component.processEvent(Component.java:5803)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
please help me ...please help me ... The question has nothing to do with 'getting' data from excel and certainly not with putting it into MySQL.
The stack trace specifically tells you that your connection string is wrong.
It also tells you which connection string is wrong.
Which you can use to determine specifically which one is wrong. And which you did not provide that info to us. -
How to run Excel Macros using JDBC-ODBC
Hi,
I want to run the excel macros in the excel file, after I connected to excel file, using JDBC-ODBC bridge.
How macros treated here?
Help needed please..........
- RameshHow to run Excel Macros using JDBC-ODBCYou don't.
As my fuzzy understanding goes.....
Macros (excel, word, etc) run via a "OLE" extension of the script host system.
So the only way to run them is via the OLE interface. That has nothing to do with ODBC. You can write your own JNI to do that, or you might get lucky and find that someone else has written a java library to do it for you. -
Conneting the microsoft excel sheet using jdbc
HI all
my requirement is to connect to the excel sheet using the jdbc odbc dsn and read the worksheets and get the data.
i have created the dsn using vb scripting
so when i click on a button. a dsn is created dynamically and the same dsn is passed as parameter to the system which will call a java program
the java program will us the dsn to connect to the excel sheet to read the data.
This is working fine
the problem is sometimes the following exception is raised.
java.sql.SQLException: [Microsoft][ODBC Excel Driver] Cannot open database '(unknown)'. It may not be a database that your application recognizes, or the file may be corrupt.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.zt.ebiz.install.client.ExcelDriver.getConnection(ExcelDriver.java:290)
at com.zt.ebiz.install.client.ExcelDriver.getHostInfo(ExcelDriver.java:337)
at com.zt.ebiz.install.client.InstallClient.executeActions(InstallClient.java:188)
at com.zt.ebiz.install.client.InstallClient.main(InstallClient.java:123)
For this we are just restarting the system.
Again it works fine.
i would like to know the cause of this problem.
please help me in this
thanks
Vijay SunderIt may be occured because of connection closing, make it sure to close connections after your transactions completed.
-
Non-English string access from excel sheet through JDBC
My excel sheet data is
Test ������������
I am using JDBC connectivity for accessing the Excel sheet.
Code looks like,
List Output = new List();
try
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
c = DriverManager.getConnection( "jdbc:odbc:qa-list", "", "" );
stmnt = c.createStatement();
ResultSet rs = stmnt.executeQuery("select * from [Sheet1$];");
ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
for(int i=1; i <= numberOfColumns; i++){
Output.add(rsmd.getColumnLabel(i));
catch( Exception e )
System.err.println( e );
finally
try
stmnt.close();
c.close();
catch( Exception e )
System.err.println( e );
Now. I am showing those data into the table(JTable) Applet programming.
For, English string it is showing properly but, for non-English string are showing �???????????????????�
I would like to know what could be the reason.
Addional info:
ava version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
If possible please send some reference code .I have one excel sheet which having differenct countries specific meaining of common words.
I am using JDBC connectivity for accessing that Excel sheet.
Code looks like,
List Output = new List();
try
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
c = DriverManager.getConnection( "jdbc:odbc:qa-list", "", "" );
stmnt = c.createStatement();
ResultSet rs = stmnt.executeQuery("select * from [Sheet1$];");
ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
for(int i=1; i <= numberOfColumns; i++){
Output.add(rsmd.getColumnLabel(i));
catch( Exception e ){
System.err.println( e );
finally{
try{
stmnt.close();
c.close();
catch( Exception e ){
System.err.println( e );
Now. I am showing those output data into the table(JTable) in my Applet programming.
For, English string it is showing properly but, for non-English strings are showing question marks like, �?????�
I would like to know what could be the reason.
Please help me, i am stuck in my project. -
Retrieving Schema details from any database using JDBC.
Hi,
We are in a process of developing a tool to extract the schema level details from any database. Following are the areas where we are facing difficulties. Please give us your valuable comments.
1.How can I get all the depending views of a particular table or vice- versa ?
2.If there is a join view in my database.How can i get the information
for all the join columns?
3. suppose the view in the database is built using some select and omit
Clause. how can I get those conditions using JDBC ?
4.for a viewcolumn , how can I find out, it refers to which column of
a table ?
5.For a table how can I get the information about its unique
constraints and check constraints
6.How can I check , a constraint is enabled or disabled on any table?
I will appreciate your response.Hi,
We are in a process of developing a tool to extract
ct the schema level details from any database.
Following are the areas where we are facing
difficulties. Please give us your valuable comments.
1.How can I get all the depending views of a
particular table or vice- versa ?No way with JDBC. You need to create something DBMS specific
2.If there is a join view in my database.How can i get
the information for all the join columns?see 1)
3. suppose the view in the database is built using
some select and omit
Clause. how can I get those conditions using JDBC
BC ?see 1)
4.for a viewcolumn , how can I find out, it refers to
which column of a table ?see 1)
5.For a table how can I get the information about its
unique constraints and check constraintsThe DatabaseMetadata object can return that information
6.How can I check , a constraint is enabled or
disabled on any table?I don't think that this is possible with JDBC (not sure
if that information is returned from the DatabaseMetadata
object). You will need to code something DBMS specific
I think there is something with deferred constraints which
can be checked by JDBC but I'm not sure about that either
Thomas -
Retrieving query information from a SYS_REFCURSOR using XMLSEQUENCE
G'day.
I am trying to retrieve the colum name from the first column selected in a query. I have no idea what the column name is, however I was pointed in the direction of the following code snippet to help me retrieve the name:
DECLARE
v_rc_sv SYS_REFCURSOR;
v_query VARCHAR2(4000);
v_value_col_name VARCHAR2(4000) := NULL;
v_updated_query VARCHAR2(4000);
BEGIN
v_query := 'SELECT val FROM a_table';
OPEN v_rc_sv FOR v_query;
FOR gen_cursor IN (
SELECT ROWNUM rn,
t2.COLUMN_VALUE.getRootElement () NAME,
EXTRACTVALUE (t2.COLUMN_VALUE, 'node()') VALUE
FROM TABLE (XMLSEQUENCE (v_rc_sv)) t,
TABLE (XMLSEQUENCE (EXTRACT (COLUMN_VALUE, '/ROW/node()'))) t2)
LOOP
IF v_value_col_name IS NULL THEN
v_value_col_name := gen_cursor.NAME;
EXIT;
END IF;
END LOOP;
CLOSE v_rc_sv;
-- Now we have the column name, we can construct a query string which
-- wraps the original query with a standard select statement that includes the column
-- name.
v_updated_query := 'SELECT ' || v_value_col_name || ' FROM (' || v_query || ')';
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;From the last line, you can see I use the name of the column to wrap the query string, so that eventually I can use the updated query to retrieve the value from the query.
My question is, can I also use the same method (by using XMLSEQUENCE) to tell me how many columns have been selected in the unknown string ? Also can it tell me if the unknown query has put an alias on any of the select columns (and what they might be) or the query is using the original column name ? ie: select name from person_table VS select name the_name from person_table (where the_name is the column alias) ?
Edited by: Greg Block on May 27, 2010 5:59 PM
Apologies for the formatting, I had typed it nicely :)
Edited by: Greg Block on May 27, 2010 8:55 PM
Updated with the formatting tag, thanks for the tipHi,
If you're using 11g, you can take a look at UTL_XML.PARSEQUERY.
Here's an example with your requirement, it'll output the number of colums and their names (and aliases) :
DECLARE
tmplob clob;
parsed_qry xmltype;
num_of_cols number;
BEGIN
dbms_lob.createtemporary(tmplob, true);
utl_xml.parsequery(
user,
q'{SELECT employee_id as emp_id, last_name FROM hr.employees WHERE job_id = 'IT_PROG'}',
tmplob
--dbms_output.put_line(tmplob);
parsed_qry := xmltype(tmplob);
select count(*) into num_of_cols from xmltable('//SELECT_LIST_ITEM' passing parsed_qry);
dbms_output.put_line ('Number of column(s) : ' || to_char(num_of_cols));
for r in (
select *
from xmltable('//SELECT_LIST_ITEM'
passing parsed_qry
columns colnum for ordinality,
colname varchar2(30) path 'COLUMN_REF/COLUMN',
colalias varchar2(30) path 'COLUMN_ALIAS' default '<no alias>')
loop
dbms_output.put_line('Column '||to_char(r.colnum) || ' : ' || r.colname ||', alias = '||r.colalias);
end loop;
dbms_lob.freetemporary (tmplob);
END;
Apologies for the formatting, I had typed it nicelyI'm sure you did but the forum doesn't render it unless you enclose your code with tags. -
Hi,
I am Using BAPI_ACC_MANUAL_ALLOC_POST (Manual cost allocation) for uploading into database. But i am getting the error "DO NOT USE COST ELEMENT xxxxxxxx FOR REPOST COSTS".
can anyone explain me the possible reasons for this error.
any help will be rewarded.
Thanks and Regards,
Gautham PaspalaHi,
Refer to the following code:
DATA: lv_filetype(10) TYPE c,
lv_gui_sep TYPE c,
lv_file_name TYPE string.
lv_filetype = 'ASC'.
lv_gui_sep = 'X'.
lv_file_name = pa_dfile.
FM call to upload file
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lv_file_name
filetype = lv_filetype
has_field_separator = lv_gui_sep
TABLES
data_tab = gi_zhralcon_file
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
The excel file must be a tab delimited file.
Hope it helps.
Regards,
Rajesh Kumar -
Can't read special characters in an excel file using JDBC
Hi! I 've a code to read an excel file using JDBC-ODBC bridge. I can read the values, but any special characters is readed wrong, just symbols. The special characters are of spanish language. This is my code:
Locale currentLocale;
currentLocale = new Locale("es", "MX");
Locale.setDefault(currentLocale);
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
c = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=comisionesperfiles.xls");
stmnt = c.createStatement();
String query = "Select * from [Hoja1$]" ;
ResultSet rs = stmnt.executeQuery( query );
while( rs.next() ){
String valor = rs.getString(2) ;
if(valor != null && !"null".equalsIgnoreCase(valor)){
if(!comisiones.contains(valor)){
System.out.println(valor);
comisiones.add( valor );
rs.close();
stmnt.close();As you can see, I've tried to set the locale, but it didn't work.
I'm using Excel 2003, Java Version 1.4.2_07 and Windows XP Professional (in latin american spanish).
Hope someone can help me!FYI: Apache's POI can read/write Excel files in Java:
http://jakarta.apache.org/poi/index.html -
How to retrieve data from excel sheet
Hi,
How to retrieve data from excel sheet into a java file.janu05 wrote:
If we append a $ in the end of the table name it is showing an error saying "invalid name,should not contain any invalid character or punctuation"Great, I'm very happy for you.
Unless that was a question. In which case you might what to tell us a little more.
Like which API you are using (assuming we are still on "reading an Excel sheet". -
Retrieving data from Microsoft Access using JDBC
I noticed that when i tried retrieving data from Microsoft access using JDBC, I realised that it was throwing SQLException when the column names were two word with spaces between them, e.g. Date Birth. But after i removed the space from the column names, my SQL queries were retrieving data. Was it because of the space in between the column names of the table?
Yeah, as far as I know having two word column names isn't allowed in SQL. There might be some way to escape it, but generally it's sensible to avoid it.
-
Getting short dumps while reading bulky data from excel sheet
Hi all,
We have converted our non-unicode based sap system (R/3 4.7, Windows 2003,
SQL 2000) into a unicode based system recently. We are facing two peculiar
problems for last few days.
*Problem 1 - *Whenever we want to upload the data from excel sheet, the
system throws a dump after reading about 400 entries, while last week the
same system used to read about 8000 entries in a single go.
*Problem 2 - *Also, whenever we realease a transport requst from development
containing a lot of changes, the request will reach the quality system but
without the changes. but if i ll try to import the changes into quality
system after generating more than one request containing small small
changes, they get reflected in QAS immediately. Is there any size
constraint in transporting a request fro DEV->QAS->PRD.
Please suggest some ways.
I am pasting the dump (that I am getting while data uploading from Excel).
~~~~~~~~~~~~~~~~~~
Runtime errors
MESSAGE_TYPE_X*
Occurred on
22.02.2008 at
13:21:02*
The current application triggered a termination with a short dump.
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
Error analysis
Short text of error message:
Control Framework : Error processing control
Technical information about the message:
Diagnosis
An error occurred when the system tried to process the commands
from the Automation Queue on the presentation server.
There are several possible reasons for this:
- The installation of the SAP GUI on the presentation server is
faulty or obsolete.
- There is an error in the application program
- There is an error in the SAPGUI or an integrated control
Procedure
1. Make sure that you have imported the appropriate Support
Package, the current kernel, and GUI patch for the release of your
System
2. Check whether the error occurs locally on one or a few PCs, or
generally on all PCs. Note whether the error only occurs for some
users, for example because of a specific Customizing setting.
If it only occurs locally, this suggests an installation problem
with the PC. Check the installation; if necessary, reinstall the
software. In the dump, search for the SY-MSGLI field, since it may
point to the cause of the error.
3. Activate the Automation Trace (in accordance with SAP Note
158985).
4.Start the transaction and continue until the screen immediately
before the dump.
5. From the System -> Utilities menu, choose Autom. Queue,
Synchronous Processing.
The status bar of the GUI displays the text:
"Automation synchron flush mode on"
6. If you now proceed with the application, the short dump will
display the ABAP call that caused the error; the Automation Trace
will contain the error on the presentation server.
7. If necessary, load the short dump and trace files on to
sapservX, so that SAP can analyze them.
Message classe...... "CNDP"
Number.............. 006
Variable 1.......... " "
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
Variable 3.......... " "
Variable 4.......... " "
How to correct the error
Probably the only way to eliminate the error is to correct the program.
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
"MESSAGE_TYPE_X" C
"SAPLOLEA" or "LOLEAU02"
"AC_SYSTEM_FLUSH"
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
2. A suitable hardcopy prinout of the system log.
To obtain this, call the system log with Transaction SM21
and select the "Print" function to print out the relevant
part.
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, you can either use the "PRINT" command in the editor or
print the programs using the report RSINCL00.
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
System environment
SAP Release.............. "620"
Application server....... "nhbho930"
Network address.......... "192.168.0.30"
Operating system......... "Windows NT"
Release.................. "5.2"
Hardware type............ "4x Intel 801586"
Character length......... 16 Bits
Pointer length........... 32 Bits
Work process number...... 0
Short dump setting....... "full"
Database server.......... "NHBHO930"
Database type............ "MSSQL"
Database name............ "DEV"
Database owner........... "dev"
Character set............ "C"
SAP kernel............... "640"
Created on............... "Aug 17 2007 00:18:58"
Created in............... "NT 5.0 2195 Service Pack 4 x86 MS VC++ 13.10"
Database version......... "SQL_Server_8.00 "
Patch level.............. "196"
Patch text............... " "
Supported environment....
Database................. "MSSQL 7.00.699 or higher, MSSQL 8.00.194"
SAP database version..... "640"
Operating system......... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2,
Windows NT 6.0"
User, transaction...
Client.............. 300
User................ "NHBABAP"
Language key........ "E"
Transaction......... "SE38 "
Program............. "SAPLOLEA"
Screen.............. "SAPMSDYP 0010"
Screen line......... 0
Information on where terminated
The termination occurred in the ABAP program "SAPLOLEA" in
"AC_SYSTEM_FLUSH".
The main program was "ZBDC_CONTRACT ".
The termination occurred in line 29 of the source code of the (Include)
program "LOLEAU02"
of the source code of program "LOLEAU02" (when calling the editor 290).
~~~~~~~~~~~~~~~~~~~~~
Thank you all.
Cheers.
Mitra __.____._for the 50 millionth time: Excel spreadsheets are NOT databases, you should NOT try to use them as such and NEVER access them using JDBC.
You should also under NO condition use the JDBC-ODBC bridge driver (that was actually the 78 millionth time that was told someone). -
Generating Excell Sheet using Reports 9i
Hello,
I wanna know how can I do to generate one excell sheet using reports, without
use the option that4s generate text file using tab. I wanna know if someone have
example codes, or library4s.
Thanks,
Paulo SergioHere are some notes we created from the demo below. This works great for generating true formated excel output in 9i Reports using 9ias Rel2.
Notes from
http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/index.html
Output to Excel with Oracle9i Report
1. Create an Excel template for the report. It should contain generic information such as title, logo and column headers
2. Cretae a sample line of data in the spreadsheet
3. Save the Excel spreadsheet as a Web page. File | Save As Web Page
4. Open the Web page you just created in Reports Builder
5. Double-click on Web Source node to display the HTML code for the Excel spreadsheet
6. Note how Excel generated HTML and XML code for the spreadsheet you created. Reports Builder also adds its own JSP tags
7. Add the Data Source An SQL Query
8. Modify the Web Source. Now that youve written the query, you can modify the Web source to tell Reports Builder to display your report in Excel.
9. Click on the Web Source icon in the toolbar.
10. To force the browser to open MS Excel it is necessary to change the HTTP Content Type to a specific MIME Type:
application/vnd.ms-excel
Insert the following line immediately before the <rw:report id=report> tag
<%@ page contentType=application/vnd.ms-excel %>
(This is a standard JSP directive to set a MIME Type (Content Type) )
11. To respect Excel format, you should delete the blank lines above the <html> tag.
12. Now, use Oracle 9i Reports JSP tags to add the data retrieved by your SQL Query to the report.
13. Search for the sample line of data you added to your Excel spreadsheet
14. Each line is saved as an HTML Table Row tag ( <tr> ).
15. Each column is mapped as an HTML Table Data tag ( <td> ).
16. Using Reports JSP Tags, add a Reports repeating frame tag to loop around the Data Model group.
17. To help, show the Object navigator next to the Web Source Window. All group information is now visible in the Object Navigator
18. Enclose the sample line of code in the Web source with the Reports9i JSP repeating tag.
Use from menu Insert | Repeating Frame at beginning of sample
Move the closing repeating tag after the </tr> tag.
Start of the repeating tag would be
<rw:foreach id=foreach src=>
Ending of the repeating frame would be
</rw:foreach>
19. In the opening of the repeating tag (<for each>), add the name of the group the tags enclose. JSP custom tags require a unique identifier.
For example: <rw:foreach id=gEmpNoId src=G_EMPNO>
20. Now, map the cells of the Excel spreadsheet to the corresponding field from your data model.
Select on the data value. From menu select Insert | Field. The source of the tag is the name of the field in the query.
21. Repeat the operation for each field of the report. Note: do not forget to specify a unique identifier for each field.
22. The code now contains a repeating frame. You have also mapped each cell in the Excel spreadsheet to the corresponding field in the data model
23. Save the report as a Reports JSP. You can test the report using the Run Web Layout icon in the toolbar
24. The execution of a Web Layout report from Reports Builder creates a temporary HTML file and launches the browser. The browser does not launch Excel because the document is saved as an HTML file. To launch Excel from the browser you need to test it from Reports Server.
25. In order to have the report appear inside Excel, you need to execute it with the Reports Server under OC4J. To do this you need to:
First, start an OC4J instance from Oracle 9iDS see How to Execute Reports Services from Oracle 9iDS on OTN. Then, copy the JSP to a directory. For example: $IDS_HOME/reports/j2ee/reports_ids/web/test
26. Enter the URL to execute the jsp. The JSP is executed from an OC4J instance.
http://reports9iTestServer:8888/reports/test/ListOfEmployees.jsp?userid=scott/tiger@ora901
27. The browser launches Microsoft Excel and displays the data from your report. -
The goal is to synchronize an excel sheet using Microsoft Excel 2010 with Sharepoint 3.0
The goal is to synchronize an excel sheet using Microsoft Excel 2010 with Sharepoint 3.0. We have already installed an add-in (Excel 2007 Add-in: Synchronizing Tables with SharePoint Lists) that was supposed
to help the synchronization of excel to Sharepoint, but it did not work. We would like to synchronize information about a calendar from excel to Sharepoint 3.0, so every time a change is made in excel it automatically updates in Sharepoint.ootb, changes in excel don't sync with a SharePoint list, the other way around is possible.
Kind regards,
Margriet Bruggeman
Lois & Clark IT Services
web site: http://www.loisandclark.eu
blog: http://www.sharepointdragons.com -
Unable to export more than 19 rows of data from Excel sheet
Anyone could please guide me how to export more data from excel sheet.
I tried with 50 row but only 19 rows are exported.
Appln builder==> create ==> Export from spread sheet --> Copy paste / csv export (i tried both) but i got only 19 rows.
Regards,
ManojHi Manoj,
If you're talking about the 19 rows you see while in the create wizard, that is just a sample of the data so you can see what you're working with while specifying column names, types, etc. Once you finish working in the wizard it should import all of the rows assuming there aren't any error-rows.
Hope this helps,
John
If you find this information useful, please mark the post "helpful" or "correct" so that others may benefit as well.*
Maybe you are looking for
-
Every time I attempt to "save" a document I get an error message that internet explorer has stopped
I am new to Adobe converter. Every time I try to convert a PDF document to a Word document, everything is fine until I hit the "save" button and then I get an error message that says that internet explore is not working. I soon as exit the program,
-
I have the query below that works fine, but breaks when I make my parameter multivalue. I tried making the syntax in(@category) and didn't work.. Any ideas? select *fromiv00101 i where i.uscatvls_2 =CASEWHENi.uscatvls_2 =''THEN'NA'ELSE@category EN
-
Source IDoc segment and field is showinh red.
Hi Guys, I have created a mapping between source idoc HRMD_A07 and Target structure MT_Employee. in HRMD_A07 i have mapped segment EP1LOG1 to MT_Employee (direct mapping) to reoccur multiple times. Now when i test the mapping and load test xml instan
-
Applet screen location for frame
Can anyone help me please? I would like to create a frame which appears in the center of the parent applet. How can I do this? Cheers Dave
-
Adobe Premiere Pro (Version 7.0) Question
We have Adobe Premiere Pro (Version 7.0) at our studio and we run into a glitch everytime we import an AVI file type into the program. We have learned that the file type itself is not corrupted, however, when each file is dragged into the timeline, w