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

Move statement

Former Member
0 Likes
786

Hi ,

I am working in ECC 6.0 . Actually i have my declarations like below :

data : itab1 like table of zabc with header line.

data : itab2 like table of zabc1 with header line.

here zabc is a table having more than 20 numc fields.

zabc1 is again a table with 1 numc fields.

and we are moving the tables as

move itab1 to itab.

but its giving unicode error.

regards,

satish

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
758

Hi Satish..

If u use only move statement it will simply map the first field of the source table

with the first field of the target table.....second field to second field and likewise

It does not really checks whether the fields are of similar datatypes or eeven they are compatible or not..thats the reason u r getting the error.

But if u use move corresponding it checks for the particular field in the target table and then assigns...but again it consumes a lot of runtime and becomes a performance issue.

It is best suggested to use Move ITAB1-name to ITAB2-name.

It definitely solves your purpose.

Reward points if helpful.

Dev

8 REPLIES 8
Read only

Former Member
0 Likes
758

Hi

Try using Move corresponding

Thanks

Sandeep

Read only

Former Member
0 Likes
758

Hello ,

Use explicit move to the corresponding fields.

i.e move : itab1-field1 to itab-field1.

Hope this will solve ur problem.

Let me know if not .

Regards,

Deepu.K

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
758

Hi

Use

Itab = Itab1.

Regards,

Sreeram

Read only

Former Member
0 Likes
758

Hi,

Try to transfer all fileds in ur internal table from numc field to char field, and then use the MOVE statement.

According To SAP:

In Unicode programs the following rules apply:

If the work area or the line of the internal table is a structure, the system also checks whether the fragment views of the work area and the database table are identical with regard to the length of the database table.

If the work area is a single field, the field must be character-type and the database table purely character-type. These requirements are valid for all statements listed above.

If helpful reward with points

Regards,

Pulokesh

Read only

Former Member
0 Likes
758

boss

use move-corresponding itab1 to itab.

hope this helps.

regards

ramesh

Read only

Former Member
0 Likes
758

hi,

data : itab1 like table of zabc with header line.

data : itab2 like table of zabc1 with header line.

move corresponding fields of itab1 to itab.

reward with points if helpful.

Read only

Former Member
0 Likes
758

Hi Satish,

When ever we use the Move Stmt, the field or structure to which we are passing the values should be a Char Type .

Avoid using the move stmt & try with assignment '='

Or else make the fields of the ITAB into char Type.

Regards,

Daniel

Read only

Former Member
0 Likes
759

Hi Satish..

If u use only move statement it will simply map the first field of the source table

with the first field of the target table.....second field to second field and likewise

It does not really checks whether the fields are of similar datatypes or eeven they are compatible or not..thats the reason u r getting the error.

But if u use move corresponding it checks for the particular field in the target table and then assigns...but again it consumes a lot of runtime and becomes a performance issue.

It is best suggested to use Move ITAB1-name to ITAB2-name.

It definitely solves your purpose.

Reward points if helpful.

Dev