on 09-12-2007 4:50 PM
Hi all,
I'm new to JCo and have written the following piece of code to retrieve data from CATS using BAPI_CATIMESHEETRECORD_GETLIST. However, I am not getting the expected output. The value for out_tabs.getNumRows() is shown as 0.
Please review the code and let me know if I am going wrong.
Regards,
Vivek
-
conn.connect();
JCO.Repository rep = new JCO.Repository("TestRepository",conn);
IFunctionTemplate ift = rep.getFunctionTemplate("BAPI_CATIMESHEETRECORD_GETLIST");
JCO.Function getFunct = ift.getFunction();
JCO.Table tabs = getFunct.getTableParameterList().getTable("SEL_EMPLOYEE");
tabs.appendRow();
tabs.setValue("I", "SIGN");
tabs.setValue("BT", "OPTION");
tabs.setValue(1809,"HIGH");
tabs.setValue(1809,"LOW");
Date from = new Date(2001,01,01);
Date to = new Date(2007,01,01);
getFunct.getImportParameterList().setValue(from, "FROMDATE");
getFunct.getImportParameterList().setValue(to, "TODATE");
conn.execute(getFunct);
JCO.Table out_tabs = getFunct.getTableParameterList().getTable("CATSRECORDS_OUT");
System.out.println(out_tabs.getNumRows());
for(int i=0; i<out_tabs.getNumRows();i++)
{
out_tabs.setRow(i);
System.out.println(out_tabs.getString(0)+"\t" + out_tabs.getString(1));
}
conn.disconnect();
Hi,
Refer this link u will get an idea
<a href="http://www.apentia-forum.de/viewtopic.php?t=1962&sid=9ac1506bdb153c14edaf891300bfde25">JCO</a>
Regards,
Beevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solved on own. The code was correct, date parameters were not passed properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.