on 05-19-2011 3:33 PM
problem with import-parameter,
I try to send an import parameter to sap : import-parameter I_MATNR Value 0000554125
it should give me the attribute of the part but there is the error message: Table O_ZMATINFO empty ;
My JCo.Class:
try {
IFunctionTemplate ftemplate = eRepository.getFunctionTemplate("Z_GET_MATINFO");
if (ftemplate == null) {
System.out.println("Z_GET_MATINFO" +
" not found in SAP.");
System.exit(1);
}
JCO.Function function = new JCO.Function(ftemplate);
JCO.ParameterList mimport= function.getImportParameterList();
mimport.setValue("00000000554125","I_MATNR");
JCO.ParameterList exp= function.getExportParameterList();
System.out.println("Answer " + exp.getValue("O_SUBRC"));
client.execute(function);
JCO.Table table1 = function.getTableParameterList().getTable("O_ZMATINFO_GET");
if(table1.isEmpty())
System.out.println("Tabelle ist LEER!");
for (int i = 0; i < table1.getNumRows(); i++, table1.nextRow()){
System.out.println(table1.getString("MATNR") + '\t' +
table1.getString("ERSDA") + '\t' + table1.getNumRows());
Hi,
Please try:
JCO.Table table1 = function.getExportParameterList().getTable("O_ZMATINFO_GET");
instead of this:
JCO.Table table1 = function.getTableParameterList().getTable("O_ZMATINFO_GET");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.