Skip to Content
-1

How to Convert Internal table data to XLSM - Macro enabled sheet and Vice versa....

Dec 15, 2017 at 11:52 AM

125

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sandra Rossi Dec 15, 2017 at 12:59 PM
0

It should be easy with abap2xlsx

Show 8 Share
10 |10000 characters needed characters left characters exceeded
Former Member

HI Sandra Rossi

Thanks for your answer , I am unable to read byte array data in SAP which is passing from Java thru webservice to SAP.

Please do let me know steps to read Byte array data in SAP.

Thanks

Jhon

0

Agree with Sandra -

Anyway bit array:

Please search sap bit array. You'll find a very nice blog and many questions about it. I search via Google.

0
Former Member

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

0

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.

0
Former Member

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

0

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".

0
Former Member

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

0
Former Member

Any help on this would be appreciated.......... :-)

0