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

Binary to text format

Former Member
0 Likes
594

Hi,

I am using FM 'SO_ATTACHMENT_READ' for reading .xls attachement from SAP workplace, but the content returned fromthe function module is in Binary format, Is there any way to convert the binary format returned to text format and save in a internal table, I have used 'SCMS_BINARY_TO_STRING' but I am geeting junk charater only, please suggest how to go ahead

thanks

bob

2 REPLIES 2
Read only

Sandra_Rossi
Active Contributor
0 Likes
447

> but the content returned fromthe function module is in Binary format

If it starts with the bytes D0 CF 11 E0 A1 B1 1A E1, it is identified as being an Office native document (using Excel, user clicked SAVE AS menu and has chosen .xls format). So it means SAP can't decode it alone. The only possibility is to use OLE2, but it must be ran in dialog (not in background).

Read only

Former Member
0 Likes
447

Hi,

Try using CL_DOCUMENT_BCS class. It has method GETU_ATTACHMENTS.

Hope it helps