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

Former Member
0 Likes
2,831

Hi all,

I have declare my internal table and workarea as below ...

TYPES: BEGIN OF t_mara,

matnr type mara-matnr,

END OF t_mara.

DATA : it_mara TYPE t_mara OCCURS 0 WITH HEADER LINE.

DATA :wa_mara like mara-matnr.

when iam loopimg my internal table into work area(like loop at it_mara into wa_mara ......) .. iam getting below error

A line of "IT_mara" and "wa_mara" are not mutually convertible in a Unicode program. Unicode program.

Can any one let me know what is the exact problem ?..

Thanks

MAHA

6 REPLIES 6
Read only

Former Member
0 Likes
1,162

HI Maha

Try this


TYPES: BEGIN OF t_mara,
matnr type mara-matnr,
END OF t_mara.
DATA : it_mara TYPE STANDARD TABLE OF t_mara.
DATA :wa_mara TYPE mara-matnr.

Pushpraj

Read only

GauthamV
Active Contributor
0 Likes
1,162

Use this.


DATA :wa_mara type mara-matnr.  ---> type instead of like

Read only

viquar_iqbal
Active Contributor
0 Likes
1,162

HI

you need to write like this

TYPES: BEGIN OF t_mara,

matnr type mara-matnr,

END OF t_mara.

DATA : it_mara TYPE t_mara OCCURS 0 WITH HEADER LINE.

DATA :wa_mara like line of it_mara.

Read only

Former Member
0 Likes
1,162

Work area & itab should have declared with same type. In this case you have created itab with one field (MATNR) but workarea has been created directly like MATNR. Create work area as structure of type itab.

Regards,

~Satya

Read only

dev_parbutteea
Active Contributor
0 Likes
1,162

Hi,

TYPES: BEGIN OF t_mara,

matnr type mara-matnr,

END OF t_mara.

DATA : it_mara TYPE STANDARD TABLE OF t_mara OCCURS 0 WITH HEADER LINE.

DATA :wa_mara TYPE T_MARA.

Regards.

Read only

keerthy_k
Product and Topic Expert
Product and Topic Expert
0 Likes
1,162

Hi Maha,

pls see the declaration as below..it is working..

TYPES: BEGIN OF t_mara,

matnr type mara-matnr,

END OF t_mara.

DATA : it_mara TYPE t_mara OCCURS 0 WITH HEADER LINE.

DATA :wa_mara like line of it_mara.

Keerthi.