Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Convert XSTRING (Excel binary) to solix_tab

Former Member
0 Likes
17,522

Hi I have an Excel binary field type XSTRING (made with abap2xlsx) and I wanted to convert it in solix_tab in order to use the method add_attachment :

document->add_attachment(

i_attachment_type = 'xls'

i_attachment_subject = 'ExampleSpreadSheet'

i_att_content_hex = binary_content ).

I used this :

CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'

EXPORTING

buffer = lv_reportfile

TABLES

binary_tab = binary_content.

But it didn't work, In result I have plenty of special chars in my Excel sheet.

How should I convert it to the right format ?

Thanks !

1 ACCEPTED SOLUTION
Read only

Former Member
6,825

Hello Benjamin,

You can use the method "cl_bcs_convert=>txt_to_solix or cl_bcs_convert=>XSTRING_TO_SOLIX " for appending entries into the table solix_tab .

For all conversion related logic SAP provided this utility class "cl_bcs_convert".

This will work.

Let me know if you have any questions.

Thanks,

Greetson

Edited by: Greetson Shunmugasundaram on Aug 1, 2011 4:50 PM

1 REPLY 1
Read only

Former Member
6,826

Hello Benjamin,

You can use the method "cl_bcs_convert=>txt_to_solix or cl_bcs_convert=>XSTRING_TO_SOLIX " for appending entries into the table solix_tab .

For all conversion related logic SAP provided this utility class "cl_bcs_convert".

This will work.

Let me know if you have any questions.

Thanks,

Greetson

Edited by: Greetson Shunmugasundaram on Aug 1, 2011 4:50 PM