Skip to Content
0
Former Member
Apr 19, 2007 at 06:15 AM

Incorrect data from "table.getString" in jCO call to a Unicode SAP sys

107 Views

We have started getting java errors, with a local standalone java application, after we converted our SAP system to Unicode. The java application makes a RFC call to SAP and runs a functional module, which extracts payment data. The data is passed through table parameters T_OUTLOG and T_FILE.

When trying to get data from the first field/parameter of a table, it also picks up data from the second field/parameter. It seems to be picking up twice the number of expected characters. Consequently when we try to get data from the second field/parameter, it now contains the data from the third field/parameter.

Below are the sample data, java code and results:

eg. SAP TABLE "T_OUTLOG" has the following fields and values:

FILE: 103501U1

LAUFD: 20070803

LAUFI: TIN01R

RPPOST: 44

JAVA CODE:

com.sap.mw.jco.JCO.Table table = function.getTableParameterList().getTable("T_OUTLOG");

for(int i = 0; i < table.getNumRows(); i++)

{

table.setRow(i);

String s12 = table.getString("FILE");

String s13 = table.getString("LAUFD");

String s14 = table.getString("LAUFI");

int j = Integer.parseInt(table.getString("RPOST"));

}

RESULTS:

S12 ("FILE") = 103501U120070803

S13 ("LAUFD")= TIN01R

Please advise if you have seen this error before. Is there a need to update any of the jCO jar, rfc, dll files etc.? If so how can this be done?