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

JCO DATA_BUFFER_EXCEEDED exception

Hi all,

while executing below code I got this error;

ERROR;

com.sap.mw.jco.JCO$Exception: (127) JCO_ERROR_FIELD_NOT_FOUND: Field EBELN not a member of RFC_DB_FLD

at com.sap.mw.jco.JCO$MetaData.indexOf(Unknown Source)

at com.sap.mw.jco.JCO$MetaData.getDescription(Unknown Source)

at Test6.<init>(Test6.java:33)

at Test6.main(Test6.java:62)

Exception in thread "main"

FOLLOWING CODE;

import java.util.ArrayList;

import com.sap.mw.jco.*;

import com.sap.mw.jco.JCO.Field;

import com.sap.mw.jco.JCO.Record;

public class Test6 {

JCO.Client mConnection;

JCO.Repository mRepository;

IFunctionTemplate ftemplate;

public Test6() {

try {

mConnection =JCO.createClient("800","sapuser","sapuser","en","10.113.10.201","00");

mConnection.connect();

System.out.println("connection attribute:"+ mConnection.getAttributes());

if (mConnection == null) {

System.out.println("Connection to SAP Server failed.");

}

mRepository = new JCO.Repository("User", mConnection);

ftemplate = mRepository.getFunctionTemplate("RFC_READ_TABLE");

}

catch (Exception ex) {

ex.printStackTrace();

System.exit(1);

}

JCO.Function function = ftemplate.getFunction();

JCO.ParameterList importParamList = function.getImportParameterList();

importParamList.setValue("EKKO", "QUERY_TABLE");//For Purchase Order

importParamList.setValue(",", "DELIMITER");

JCO.Table tableData = function.getTableParameterList().getTable("DATA");

System.out.println(""+tableData);

JCO.Table fields = function.getTableParameterList().getTable("FIELDS");

System.out.println(""+fields);

String sg =fields.getDescription("EBELN");

System.out.println("...."+sg);

mConnection.execute(function);

if (tableData.getNumRows() > 0) {

do {

System.out.println("Purchase Order Details::");

for (JCO.FieldIterator e = tableData.fields();e.hasMoreElements();) {

JCO.Field field = e.nextField();

String str = field.getString();

String[] values = str.split(",");

for (int j = 0; j < values.length; j++) {

System.out.println("\t"+values[j].trim());

}

}

} while (tableData.nextRow());

}

else

System.out.println("No results found");

mConnection.disconnect();

}

public static void main (String args[]) {

Test6 app = new Test6();

}

}

please suggest suitable code.....

Thanks in advance.....

Ramesh

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 10:52 AM

    Hi,

    This line produces the error:

    String sg =fields.getDescription("EBELN");

    I would delete (comment out) these lines:

    String sg =fields.getDescription("EBELN");

    System.out.println("...."+sg);

    Good luck, Roelof

    PS what strange subject!?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 04:15 PM

    hi ramesh,

    check if the fieldname "EBELN" is correct or not.

    jo

    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.