Skip to Content
author's profile photo Former Member
Former Member

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.");



JCO.Function function = new JCO.Function(ftemplate);

JCO.ParameterList mimport= function.getImportParameterList();


JCO.ParameterList exp= function.getExportParameterList();

System.out.println("Answer " + exp.getValue("O_SUBRC"));


JCO.Table table1 = function.getTableParameterList().getTable("O_ZMATINFO_GET");


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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 26, 2011 at 08:54 AM


    Please try:

    JCO.Table table1 = function.getExportParameterList().getTable("O_ZMATINFO_GET");

    instead of this:

    JCO.Table table1 = function.getTableParameterList().getTable("O_ZMATINFO_GET");

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.