on 06-15-2005 5:52 PM
Hi,
We are using a JCO client program to connect from our J2EE stack of XI in between mapping. We are concerned whether it will create performance issue.
Can anyone pls suggest how to create Java tables and access them?? We are not using any IDE to do the same.
Thanks in advance...
Jayakrishnan
Hi Jayakrishnan,
1. Regarding IDE, you should rather install Eclipse, it's free.
2. Regarding performance issues, when you write your code you need to minimize the connectios to the server.
?for this, you mest to wqirte conenction pools (similar like conecting to databases) and repositories, that is just like a "cache". For deatils, yue can get (or I can send you) the article:
"Tips and Tricks for SAP JCO client programming" by
Thomes G. Shuessler.
3. Regarding Tables, you can consider the following code
I hope this help you, and consider rewarding points for helpfull answers
/*----
PARAMETRO DE ENTRADA -
*/
// Create metadata definition of the input parameter list
Calendar ENDDAc = new GregorianCalendar(2005, Calendar.JUNE, 11);
Date ENDDA = ENDDAc.getTime();
Calendar BEGDAc = new GregorianCalendar(2005, Calendar.JUNE, 11);
Date BEGDA = BEGDAc.getTime();
JCO.Table inputTable = function.getTableParameterList().getTable("DM_END");
inputTable.appendRow();
inputTable.setValue("008055","PERNR");
inputTable.setValue("MARI MEDEIROS","CNAME");
inputTable.setValue("C","FAMST");
/*----
FIM PARAMETROS DE ENTRADA -
*/
mConnection.execute(function);
System.out.println("Debug:.. executou...");
String Message = function.getExportParameterList().getString("MESSAGE");
//JCO.Structure returnStructure = function.getExportParameterList().getStructure("MESSAGE");
System.out.println("[Resultado da Operação: "+Message +"]");
codes = function.getTableParameterList().getTable("DM_DEP");
System.out.println("Debug:.. get table pasou...num linhas= "+codes.getNumRows());
//Print results
if (codes.getNumRows() > 0) {
// Loop over all rows
do {
System.out.println("----
-
");
// Loop over all columns in the current row
for (JCO.FieldIterator e = codes.fields(); e.hasMoreElements(); ) {
JCO.Field field = e.nextField();
System.out.println("inputTable.setValue(""field.getString()""field.getName()"");");
}//for
} while(codes.nextRow());
}
else {
System.out.println("Nao achou nada");
}//if
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jai,
If I have understood your requirements right,you want create tables and access them without using any IDE.
I suggest you to create the required tables directly in
Database itself using the open sql DML statements.
Once created you have accessed these tables using JDBC or JCA connections which will be faster generally.
Hope it helps.
Regards,
Guru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.