Application Development 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: 

Unicode problem for converting raw data type to string

Former Member
0 Kudos

Hello all,

I am facing the problem in Unicode.

Before Unicode in version 4.7 we can able to convert the data from string to raw (ssfbin data type) and vise versa. But after Unicode check it is giving error as Unicode not compatible to pass to string .How can I over come to this problem could u please do me needful.

Thanking you,

Suman

1 ACCEPTED SOLUTION

Former Member
0 Kudos

unicode doesnt allow assignment of string to raw type as the data length for char type and X type differ in 6.0 version.

You can try using field-symbols for assignin string to raw as shown .....

field-symbols: <fs> type x.

assign str to <fs> casting.

raw = <fs>.

7 REPLIES 7

Former Member
0 Kudos

unicode doesnt allow assignment of string to raw type as the data length for char type and X type differ in 6.0 version.

You can try using field-symbols for assignin string to raw as shown .....

field-symbols: <fs> type x.

assign str to <fs> casting.

raw = <fs>.

0 Kudos

Hi,

Try with the FM ISH_N2_STRING_TO_RAWTAB

Thank you,

Sekhar.

0 Kudos

Hello ,

Thanks for your response .

I did that but it is not working.

thanking you,

Suman

0 Kudos

Hi suman ,

You need to follow the procedure given below

1) You need to load the class as mentioned below.

syntax : class CL_ABAP_CONTAINER_UTILITIES definition load.

2) Then call the method read_container_c

J_2IEXTRCT-EXTRCTDATA and I_RG23PART1-I_PART1_TYP are the 2 incompatable variables.

Syntax:

call method cl_abap_container_utilities=>read_container_c

exporting IM_CONTAINER = J_2IEXTRCT-EXTRCTDATA

importing EX_VALUE = I_RG23PART1-I_PART1_TYP

exceptions ILLEGAL_PARAMETER_TYPE = 1

others = 2.

Former Member
0 Kudos

Hi there.... .you can try MOVE command to move raw data into string. ..... if this does not help, please revert back....

best regards

Prem Sharma

Former Member
0 Kudos

Hi Suman,

The RAW datatype cannot be converted to a string type,As RAW type consists of sequence of bytes, so only numerical values can be converted , but in case of char it is not like that.

For any other datatype , u could have easily used MOVE statement.

Cheers,

Laveen

Former Member
0 Kudos

Hi Suman,

Could you please let us know how did u resolve this issue as even i face a similar issue.

Thank You,

Divaker