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 Raw data to String

Former Member
0 Likes
15,866

Hello All,

How can i convert a RAW data type to STRING or

Character type.

I have a V1 type SSFBIN(RAW data )

and V2 type string .

i used

move v2 to v1.

it is converted to zeros.

After that

v2 = v1.

when i did this

it is showing all zeros .

it is not converting .

please do help me.

Thanking you,

6 REPLIES 6
Read only

Former Member
0 Likes
5,450

Hi

try this FM : RSAB_CONVERT_RAW_TO_CHAR,

CL_IBASE_SERVICE=>CL_CONVERT_GUID_32_16

Edited by: kiran vempati on Apr 13, 2009 1:33 PM

Read only

Former Member
0 Likes
5,450

Hi,

Please check this link

Thanks and regards

Durga.K

Read only

0 Likes
5,450

Hi,

Try with FM " WSI_RAW_TO_STRING "

Thank you,

Sekhar.

Read only

Former Member
0 Likes
5,450

Try like below:

DATA:

convin TYPE REF TO cl_abap_conv_in_ce,

l_data TYPE string,

l_buffer TYPE xstring.

CALL METHOD cl_abap_conv_in_ce=>create

EXPORTING

encoding = 'UTF-8'

endian = 'L'

ignore_cerr = 'X'

replacement = '#'

input = l_buffer " pass Raw data

RECEIVING

conv = convin.

CALL METHOD convin->read

IMPORTING

data = l_data. " Converted data

Hope it helps!!

Regards,

Pavan

Read only

Former Member
0 Likes
5,450

Hi,

See this link

Read Avinash's answer.

Read only

Former Member
0 Likes
5,450

thanks all