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: Not mutually convertible in a Unicode program

manoj_goyal2
Participant
0 Likes
2,014

Hi Guys,

I am trying to copy a work area to a variable, and it is giving me error

Error: "GV_RECORD" and 'GW_DATA" are not mutually convetible in Unicode program...

My declaration is a follows:

TYPES: BEGIN OF gt_data,

pernr TYPE p0001-pernr, "Associate ID

amount TYPE p0015-betrg, "Amount

END of gt_data.

DATA: GV_Record(255) type c.

DATA: GW_data type gt_data.

gv_record = gw_data.

Please help me to fix this.

Thanks,

mini

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
725

Hi,

Try this way


class cl_abap_container_utilities definition load.

  call method cl_abap_container_utilities=>fill_container_c
    exporting
      im_value               = GV_RECORD
    importing
      ex_container           = GW_data
    exceptions
      illegal_parameter_type = 1
      others                 = 2.
 

After this call GW_data contains data from GV_RECORD

a®

2 REPLIES 2
Read only

Former Member
0 Likes
725

In Unicode...Both structure and field must have the same "structure" and lenght...

You can do this...


move gw_data-pernr to GV_Record.

Or better, concatenate both fields in the variable...

Greetings,

Blag.

Read only

former_member194669
Active Contributor
0 Likes
726

Hi,

Try this way


class cl_abap_container_utilities definition load.

  call method cl_abap_container_utilities=>fill_container_c
    exporting
      im_value               = GV_RECORD
    importing
      ex_container           = GW_data
    exceptions
      illegal_parameter_type = 1
      others                 = 2.
 

After this call GW_data contains data from GV_RECORD

a®