on 06-19-2007 9:15 AM
Hello,
I need to convert a JCO.Structure into a "SAP-understandable" String
because the RFC-Function used for communication accepts only
Strings as values.
Is there a way to achieve this in a generic way?
Thx.
Torsten
Hello,
I need to do something like that:
JCO.Structure myStruct = ...
myStruct.setValue(12345, "ORDER_NO");
myStruct.setValue(new BigDecimal(12.5d), "AMOUNT");
...
<b>String myStructString = "convert myStruct to String...";</b>
JCO.Function myFunction = ...
myFunction.getImportParameterList().setValue(myStructString, "STRUCT");
...
myJCOConnection.execute(myFunction);
Does anybody have an example on how to successfully do the struct to
string conversion mentioned above?
Torsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Torsten,
Converting the JCO.structure as far as I know this what can be done :
JCO.Structure str = new JCO.Structure("Struct");
int i = str.getNumFields();
for(int k=0;k<i;k++){
/// Assign it to some String
str.getString(i);
// After this its up to you and the RFC Structure on how you want to pass it.
}
Regards
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.