on 01-20-2021 3:57 PM
Hi colleagues,
I'm a developer of the SAP Cloud SDK and we wonder how to use JCo type JCoTable to populate a table that has a domain type as row type, e.g. "BP_PARTNR". Usually we would just use method JCoTable#setValue(String, Object) but in such cases there is no table column name to address as first argument. Or is there?
Is there a recommended API, that I've missed?
Kind regards
Alexander
Hi Alexander,
In principle this is a table of CHARs or INT if I got you right, so you could call it a vector. Assuming that the element is an int and the table is passed as the import parameter FOO.
JCoFunction function=repository.getFunction();
JCoTable vector=function.getimportParameterList().getTable("FOO");
vector.appendRow():
vector.setValue(0, 123456); //accessing the anonymous only field by using index 0
For getting the value from such a table of int values you'd invoke vector.getInt(0) for each row in order to get it as int again.
Best regards,
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.