04-14-2009 8:08 AM
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
04-14-2009 8:16 AM
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>.
04-14-2009 8:16 AM
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>.
04-14-2009 8:29 AM
04-14-2009 11:45 AM
Hello ,
Thanks for your response .
I did that but it is not working.
thanking you,
Suman
04-14-2009 12:15 PM
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.
04-14-2009 10:12 AM
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
04-14-2009 11:37 AM
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
08-19-2009 5:27 PM
Hi Suman,
Could you please let us know how did u resolve this issue as even i face a similar issue.
Thank You,
Divaker