on 02-05-2016 4:32 PM
Hello,
I have a question for the JCo library:
I would like to use the Jco to execute a rfc-programm in SAP BW to write data directly into an DSO.
Therefore I got a small programm where I try to trigger "RSDRI_ODSO_INSERT_RFC" from SAP BW.
To submit data it uses an xstring as parameter.
Now I'm not sure how to define the xstring parameter in Java. If I read it right, the xstring is an byte sequence. Is this right?
So can I use a simple byte array in java for the parameter? Does anyone have a simple example how I can give some data as paramter to an xstring parameter in java, so that the ABAP application server will work with it?
Thanks in advance.
Best Regards
Stefan
Hi Stefan,
yes, an XSTRING is a raw byte array and you can use a Java byte[] type to fill in the values.
Please see the JCo API JavaDoc at class com.sap.conn.jco.JCoRecord for further info.
The first row in the shown table [method "Object getValue()"] tells which is the default Java type representation for the various ABAP RFC types.
So simply use JCoRecord.getByteArray([index|name]) and JCoRecord.setValue([index|name], byte[] value) for the appropriate XSTRING field.
Best regards,
Stefan
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.