Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error while copying Z program to another enviroment

Former Member
0 Likes
385

Hi, experts

I have a Z program into one client's enviroment, which works fine. I tried copying this program into another client's enviroment, and i get the following error message, while syntax check:

"RC_IN1 must be a byte-type field. (Typ X or XSTRING)."

And this error is on the following form:


*-----------------------------------------------------------------------
form xor using rc_in1 type c rc_in2 type c rc_out type c.

  data:
    li_abit type i,
    li_bbit type i.

  rc_out = space.
  if rc_in1 <> space.
    do 8 times.
      get bit sy-index of rc_in1 into li_abit.
      get bit sy-index of rc_in2 into li_bbit.
      if li_abit <> li_bbit.
        set bit sy-index of rc_out to 1.
      else.
        set bit sy-index of rc_out to 0.
      endif.
    enddo.
    if rc_out = space.
      rc_out = rc_in1.
    endif.
  endif.
endform.

When I check into one client's enviroment, it does not gives error. Only in THAT client.

Why is this happening?

Thanks in advance,

Brian Gonsales

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
364

Hi,

are the both client environments hav same version (ECC 6).

In ECC 6 version type X is not allowed.

To avoid this problem,

you need to declare the field of TYPE C.

you need to get the value from Cl_ABAP_CHAR_UTILITIES.

Regards

Sandeep Reddy

2 REPLIES 2
Read only

b_deterd2
Active Contributor
0 Likes
364

Hi,

Looks like a unicode check.

De-check the checkbox 'Unicode checks active' in the program attributes and see if it works then.

Regards,

Bert

Read only

Former Member
0 Likes
365

Hi,

are the both client environments hav same version (ECC 6).

In ECC 6 version type X is not allowed.

To avoid this problem,

you need to declare the field of TYPE C.

you need to get the value from Cl_ABAP_CHAR_UTILITIES.

Regards

Sandeep Reddy