Skip to Content
author's profile photo Former Member
Former Member

unicode -- TYPE X VALUE '0020'.

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???????

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 26, 2009 at 04:08 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 26, 2009 at 07:47 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.