cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP on Cloud: Convert base64 string to LRAW

somnath
Active Participant
0 Likes
911

Hello,

I was trying to store base64 string image content into a Database field having type abap.lraw( 1000 ). I am trying in my trial BTP account, and I don't see any released FM/class to convert string to xstring.

so I am using the below method which is not working, I see.

<table>-<field> = conv xstring( base64 ). 

I think I am doing something wrong! Can anyone please let me know a working method to achieve this?

Thanks in advance!

BR, Somnath

Accepted Solutions (0)

Answers (2)

Answers (2)

Sandra_Rossi
Active Contributor
0 Likes

The classes CL_HTTP_UTILITY and CL_WEB_HTTP_UTILITY are both released for Cloud (C1 contract). They both contain the method DECODE_X_BASE64.

 

  class-methods DECODE_X_BASE64
    importing
      !ENCODED type STRING
    returning
      value(DECODED) type XSTRING .

 

 

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Somnath,

when searching for released API's in ADT that contain "*string*" in their name

api:USE_IN_CLOUD_DEVELOPMENT type:Clas *string*

I found the following classes:

CL_ABAP_STRING_X_READER

CL_ABAP_STRING_X_WRITER