Hi I need help with a SAP integration with java. I don't know much about SAP but if I'm getting a function with the next template using the Java JcoFunction.
Input:
IV_SIZE_EXCHG
IV_TRGID
Changing:
null
Output:
EV_TOTAL_ZDT1
Tables:
ET_ARTICLES
ET_LOCATION_KEYS
ET_TREAGERS
IT_LOCATION_KEYS
RETURN
Exceptions:
My client gets data with SAP filtering by the table IT_LOCATION_KEYS. But as you can see the table is on the output side and not on the input. Can this works on Java?
By the way there is any way to get all data with a limit or top like in SQL. Thanks
This is my code
JCoParameterList importParameterList = function.getImportParameterList();
JCoTable articlesTable = importParameterList.getTable("IT_LOCATION_KEYS");
articlesTable.appendRow();
articlesTable.setValue(PARAM_CUSTOMER_NUMBER, request.getCustomer().getCustomerNumber());
articlesTable.setValue(PARAM_CONTRACT_NUMBER, request.getContractNumber());
articlesTable.setValue(PARAM_LOCATION, request.getLocation());
And when I tried to get the table IT_LOCATION_KEYS it says that there is no input table.
I also tried to get the table using the next code.
JCoTable articlesTable = function.getTableParameterList().getTable("IT_LOCATION_KEYS");
This seems to work fine but now the problem is that I still can't get any data by the export.
function.getExportParameterList()
The result is
|------------|
| PARAMETERS 'OUTPUT'
|------------|
|EV_TOTAL_ZDT|
|------------|
| 0 1 2|
|------------|
|00000000000C|
|------------|
And the output tables are always empty.
function.getTableParameterList().getTable("ET_LOCATION_KEYS");
TABLES
parameters are always changing parameters (in- and output), regardless of their name. It's up to the implementation what they are actually used for.
You will need to use getTableParameterList()
to access the parameter.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.