on 08-19-2008 11:27 AM
HI,
I need to retrieve a table passed from ABAP.
I getting this error message
JCO_ERROR_FIELD_NOT_FOUND: Field EXPTAB not a member of TABLES
I'm retrieving in my program using the following code.
JCO.Table table = function.getTableParameterList().getTable("EXPTAB");
Whenever it run that code it will prompt me that JCO_ERROR_FIELD_NOT_FOUND
I tried to change instead of getting table to structure, it able to retrieve the last value in the table.
So is the retrieving having problem or the value pass from ABAP having problem?
Thanks.
Hello Adrian,
The error which you are getting JCO_ERROR_FIELD_NOT_FOUND says that A referenced field in either a JCO.ParameterList, JCO.Structure, or JCO.Table does not exist
http://help.sap.com/javadocs/NW04/current/jc/com/sap/mw/jco/JCO.Exception.html
For table inputs, you need to create an XMl structure that corresponds to the appropate table schema, and set it into the XXX_Tables variable - not XXX_Imports. It looks like perhaps you set the value in the wrong variable?
Sorry - I don't have this machine configured for SAP at the momemt so I am working from memory here:
The SAP Function Call builder (or SAP View and Form, which is based on SAP Function Call) will create a number of helpful object in your webapp, including 3 Variables:
xxx_Imports
xxx_Exports
xxx_Tables
These are schema-typed variables, which correspond to schemas for the BAPI. The builder creates the schemas in your webapp as well - you can look at the Variables and match their schema types to the schema definitions in the Schema object.
For most BAPI calls, it is sufficuent to provide input parameters for the BAPI in the "Imports" variable. You can set these yourself in code, or simply use the Imports section of the SAP builder, and the builder will set the values into the Imports variable before calling the BAPI.
Some BAPI calls require not only values in the Imports Variable, but also require data in the Tables variable. The builder does not automatically set this variable for you - you must set it yourself in code by constructing an appropriate XML object and setting the value of xxx-Tables. The schema for the BAPI can help you figure out what the appropriate structure for the table is.
Refer the following link as well
/message/14020472#14020472 [original link is broken]
Hope the above is helpful.
Cheers,
Satish.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.