‎2008 May 19 7:46 PM
Hi,
Can anybody with following code. I am converting program to unicode and getting an error 'Null space must be a data type C N D T'. Here is the code.
DATA NULL_SPACE(2) TYPE x VALUE '0020'.
TRANSLATE BDCDATA-FVAL USING NULL_SPACE.
Regards,
venkat.
‎2008 May 19 7:52 PM
First convert type x to type c using CLASS cl_abap_char_utilities. Then use it in the translate statement.
- Cheers
‎2008 May 19 8:07 PM
any idea which method to use to convert X to C in class CL_ABAP_CHAR_UTILITIES?
Regards,
Venkat.
‎2008 May 19 8:43 PM
Hi,
I think you need to find the display value of hexadecimal value of 20 first and then look for the replacement in char format.
LIke '09' in hexadeciamal is represnted as #.
I dont know if there is any method to convert in this CL_ABAP_CHAR_UTILITIES class.
Thanks,
Vamshi.
‎2008 May 19 8:47 PM
Do something like below: -
data: left_content type string,
right_content type string,
xcontent type xstring.
data: w_longchar(20).
constants: c_unknown(7) value 'Unknown'.
xcontent = '0020'.
data: conv type ref to cl_abap_conv_in_ce.
conv = cl_abap_conv_in_ce=>create( input = xcontent ).
conv->read( importing data = left_content ).
- Cheers