on 08-25-2009 10:46 AM
Hi All,
How to use getField with latest version of sapjco3.jar.
2.x code
-
JCO.Field fld = queryFunction.getImportParameterList().getField(EMAIL);
fld.setValue(email.toUpperCase());
JCO.Table tab = queryFunction.getTableParameterList().getTable(DATA_OUT);
for(int i=0;i<tab.getNumRows();i++) {
tab.setRow(i);
JCO.Field id = tab.getField(BNAME);
String val = id.getString();
}
3.x Code
-
JCoField fld = queryFunction.getImportParameterList().getField(EMAIL); // Porblem with getField(EMAIL)
fld.setValue(email.toUpperCase());
JCoTable tab = queryFunction.getTableParameterList().getTable(DATA_OUT);
for(int i=0;i<tab.getNumRows();i++) {
tab.setRow(i);
String val = tab.getString(BNAME);
}
How can I use getField in 3.x, can any one help me in this issue.
Any help is really appreciable
Thanks in Advance.
Hi Basha,
Is your problem solved..?
Thanks,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Basha
Did you find any answer for this question. If so please post the example. I am also in the same boat now...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Pls download the migration guide from https://websmp203.sap-ag.de/connectors. Also i paste a sample code
JCoRepository repository = destination.getRepository();
JCoFunctionTemplate template =
repository.getFunctionTemplate("FUNCTION_MOCULE");
JCoRecordMetaData structureDefinition =
repository.getStructureDefinition("MY_STRUCT");
JCoStructure structure=JCo.createStructure(structureDefinition);
structure.setValue(u201CTITLEu201D, u201CHello Worldu201D);
structure.setValue(1, u201CGood Morningu201D);
JCoFieldIterator iterator=structure.getFieldIterator();
while(iterator.hasNextField())
{
JCoField field=iterator.nextField();
System.out.println(u201CFieldValue: u201D+field.getString());
}
JCoFunction function = template.getFunction();
JCoParameterList tables=function.getTablesParameterList();
JCoTable tracks = tables.getTable("TRACKS");
if (!tracks.isEmpty())
{
for (int i=0; i<tracks.getNumRows(); i++)
{
tracks.setRow(i);
System.out.println(tracks.getString("ARTIST")+
": "+
tracks.getString("SONG"));
}
}
AbapException[] exceptions=function.getExceptionList();
if (exceptions!=null)
for (int i=0; i<exceptions.length(); i++)
System.out.println(u201CExceptionName: u201D+exceptions<i>.getKey());
Pls paste your id..will send you the docs..
Thanks,
Arun V G.
hi dc_basha,
this will give some idea how to use the get filed in JcoField
the document given by the sap
http://74.125.153.132/search?q=cache:rObfOc0cvRUJ:www.grupos.com.br/group/abap4/Messages.html%3Facti...getFieldwithlatestversionofsapjco3.jar.&cd=1&hl=en&ct=clnk&gl=in#39
and check for the interface JcoField for more access
ravindra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
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.