12-15-2017 11:52 AM - edited 02-04-2024 12:28 AM
Hi
We have a requirement on 'XLSM' Macro enabled excel file data , We will receive data from Java in XSTRING mode and same needs to read and Populate to internal table , After validating we have to convert data to XSTRING and send it to Java back.
I was unable to achieve this requirement, Can anybody suggest on this.
Thanks
Jhon
It should be easy with abap2xlsx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michelle
Thanks for your time, I have tried several ways but couldn't get a way to read Java byte array (Data is being sent by Java thru web-service) , I have called transformations/ FM to convert xstring to string ...but actual data is not being populated to internal table...Could you help me on this.
Data is receiving in byte array from Java , the same is saving on SAP RAWSTRING data element on Ztable , While Processing this byte array , I am getting special characters and unreadable format data.
thanks
Jhon
The question is not about Java byte array, not even Abap Ddic rawstring (Abap xstring), it's about knowing the code page (AKA character set) used to encode the characters into bytes at the Java side.
Usually it's UTF-8 (i.e. not always).
At ABAP side, decode the bytes into characters using the class CL_ABAP_CODEPAGE.
Hi Sandra,
I was able to save Excel data on presentation server using SCM_XSTRING_BINARY and GUI_UPLOAD Function modules , but GUI_UPLOAD won't work in background and data is receiving thru web service (Java) and we are restricted not to use Application server.
I have to save Excel Xstring data in Z-table for further processing , Able to convert Xstring to Solix_Tab , Not sure how to get data in readable format , tried FM's Binary_text/Binary_Ftext..... No luck.
Thanks
Jhon
To save an XSTRING variable into a database table, declare a column with type RAWSTRING, no need of an internal table.
You have to use an XSTRING variable containing the XLSX/XLSM file to be able to use ABAP2XLSX.
Sorry, I can't answer your too much general question "how to get data in readable format".
Hi Sandra,
I was saving Xstring in database table with type RAWSTRING , My question is , I am failing to get data from XSTRING , while converting Xstring to Binary / ASCII which is of file Excel (xls/xlsx) , I could see all special characters and are of non readable format.
As I stated , Using GUI_Download , I was able to get data / save file on Presentation server , But Over the fly thru web service I have to read Xstring of Excel data.
Do post the steps to get Excel Xstring raw data to readable format.
Thanks
John
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.