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: Data objects in a Unicode program are not convertible.

Former Member
0 Likes
1,095

Hi All,

I'm getting an above error while appending a record from field-symbol work area to field-symbol internal table.

Please let me know how to resolve this.

Thanks & Regards

Santhosh

6 REPLIES 6
Read only

Former Member
0 Likes
937

Hi

Probably they're pointing to 2 structures with different definitions.

Max

Read only

Former Member
Read only

uwe_schieferstein
Active Contributor
0 Likes
937

Hello Santosh

Apparently the structures of your work area and that of your itab are not (exactly) the same. This kind of sloppy coding is no longer possible on a Unicode system.

You may try the following approach:


...
" <ls_workarea> : work area having structure A
" <ls_record>: line structure B of your itab
" <lt_itab>: itab having line structure B

  CALL METHOD cl_abap_container_utilities=>read_container_c
    EXPORTING
      container = <ls_workarea>
   IMPORTING
      ex_...     = <ls_record>.


APPEND <ls_record> TO <lt_itab>.
...

If this approach fails you may try to use a string variable as intermediate, i.e.

1. Move <ls_workarea> to LD_STRING (using static method FILL_CONTAINER_C)
2. Move LD_STRING to <ls_record> (using static method READ_CONTAINER_C)

Regards

Uwe

Read only

0 Likes
937

Hi Uwe,

If u could explain with some good example, that would be more helpful to me.

Thanks & Regards

Santhosh

Read only

Sidh_M
Participant
0 Likes
937

Hi,

Go to program attributes uncheck the Unicode cheks active there.

Once i was getting unicode error i did the same & it worked.

Hope this will also work for you.

Regards,

SUDHIR MANJAREKAR

Read only

Former Member
0 Likes
937

Sorry Sir,

It wont work. Any suggestions.

Thanks & Regards

Santhosh