cancel
Showing results for 
Search instead for 
Did you mean: 

How to Convert Unreadable format of Content into Readable string format ?

vamsilakshman_pendurti
Active Participant
1,985

Hello Experts,

I have Base64 Content and i need to change it in original format using ABAP. Here i am attaching one pic for that content.

How to change this content into Readable format...

I am new to this concept so that i am not confirm whether this is Base64 Format or not .

So ultimately i need to change the above format in any of our understandable format using ABAP Coding.

Thanks,

Vamsi.

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor
0 Kudos

It looks like a "MIME base64 string" (possible characters ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ and there may be = in the last two characters). More information at wikipedia: MIME#Content-Transfer-Encoding.

For decoding it into a XSTRING variable, you may use the function modue SSFC_BASE64_DECODE.

vamsilakshman_pendurti
Active Participant
0 Kudos

Hi Rossi,

Yes you said right.Thank you so much...

First i convert my BASE64 string into XSTRING then From XSTRING to Binary format and i used that Binary format in GUI_DOWNLOAD. At last it downloaded as JPG Format.

Thanks,

Vamsi.

Answers (1)

Answers (1)

vamsilakshman_pendurti
Active Participant
0 Kudos

Hi Rossi,

Thanks for the Reply...

I Decoded my Base64 Content then i am getting as like below screen shot...

Now what should we do with this above code, In the above code i understand only one line i.e., One link with .JPG and rest of the code shown as special characters...

Could you please guide me....

Thanks,

Vamsi

Sandra_Rossi
Active Contributor
0 Kudos

Base64 is a text format for transferring bytes. Bytes cannot be read. As far as I can read, it's a JPG format. You just need to transfer these bytes to a file in binary mode, and open this file using a JPG viewer.