on 10-06-2008 6:59 AM
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???????
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
7 | |
7 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.