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

not mutually convertible

Former Member
0 Likes
577

Hello experts,

When I import the following paragraph of code from non-unicode system to unicode system, I met a problem related to 'not mutually convertible'.

L_T_TEST[] = T_INDX[].

LOOP AT L_T_TEST ASSIGNING <F_TEST>.

<F_TEST>-ZUNAME = SY-UNAME.

<F_TEST>-ZDATUM = SY-DATUM.

<F_TEST>-ZTIMLO = SY-TIMLO.

ENDLOOP.

T_INDX[] = L_T_TEST[].

T_INDX STRUCTURE INDX.

L_T_TEST like other structure(structure A).

<F_TEST> refer to the same structure as L_T_TEST.

Structure A is totally different from table INDX, so in unicode system this paragraph of code is not allowed.

Notes: Field CLUSTD in table INDX is quite especial.

Could anyone help me?

Thanks & Best regards,

Christina

1 ACCEPTED SOLUTION
Read only

former_member404244
Active Contributor
0 Likes
555

Hi,

as the structures L_T_TEST and T_INDX are different u cannot move directly...in the new SAP version...in order to achieve ur functionality u have to move field by field to it..try like this

Assuming field1 ,field2 and field3 are thre in both the tables.

LOOP AT L_T_TEST .

move :L_T_TEST -field1 to t_indx-field1,

L_T_TEST -field2 to t_indx-field2,

L_T_TEST -field3 to t_indx-field3.

append t_indx.

endloop.

Regards,

Nagaraj

3 REPLIES 3
Read only

former_member404244
Active Contributor
0 Likes
556

Hi,

as the structures L_T_TEST and T_INDX are different u cannot move directly...in the new SAP version...in order to achieve ur functionality u have to move field by field to it..try like this

Assuming field1 ,field2 and field3 are thre in both the tables.

LOOP AT L_T_TEST .

move :L_T_TEST -field1 to t_indx-field1,

L_T_TEST -field2 to t_indx-field2,

L_T_TEST -field3 to t_indx-field3.

append t_indx.

endloop.

Regards,

Nagaraj

Read only

0 Likes
555

Thanks Nagaraj

Unfortunately, there is no corresponding fields in T_INDX.

From my point of view, basing on the psotion of fields, all these three fields will go to field CLUSTD in table INDX finally.

Read only

Former Member
0 Likes
555

Hi,

You can not asssign two diffrerent structure in Unicode Environment.

Try using move corresponding and move common individual fields to other wor area and append it to itab.

Regards

Shiva