cancel
Showing results for 
Search instead for 
Did you mean: 

unicode -- TYPE X VALUE '0020'.

Former Member
0 Kudos

there was an unicode issue in the following translate statement on ecc 6.0 upgrade...

DATA: NULL_SPACE(2) TYPE X VALUE '0020'.

.

.

.

.

TRANSLATE BDCDATA-FVAL USING NULL_SPACE.

the bdcdata-fval is a character field.........

on testing we found the lower version does not replace any values,

can anyone tell me at what conditions this statement will work???????

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

use below code and test hex '20' replace the value with that variable.

data :  i1 type xstring,
        i2 type string,
        i3 type x.

parameters: sai1 like i3.

i1 = sai1.
call function 'NLS_STRING_CONVERT_TO_SYS'
  exporting
    lang_used                   = sy-langu
    source                      = i1
*   FROM_FE                     = 'MS '
 importing
   result                      = i2
*   SUBSTED                     =
 exceptions
   illegal_syst_codepage       = 1
   no_fe_codepage_found        = 2
   could_not_convert           = 3
   others                      = 4
          .
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.

write: i2.

or

data: cnt_1(2) type x value '61',

       cnt_2 type c.

call method cl_abap_conv_in_ce=>uccp
                            exporting
                              uccp = cnt_1
                            receiving
                              char = cnt_2.

 write : cnt_2.

Thanks

Vinod

Former Member
0 Kudos

Dear Ramachandran,

First declare a variable with type x, then convert your BDCDATA-FVAL into x or move BDCDATA_FVAL into the variable is of type x. then useTRANSLATE BDCDATA-FVAL USING NULL_SPACE.

Hope problem will solves, if not please let me know with clear inputs.

Regards

Arani Bhaskar