Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JCO - ImportParameter

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());

Former Member
Not what you were looking for? View more on this topic or Ask a question