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
1,008

Hi experts,

Is correct statement below..

A.) Move-corresponding ztab to itab.

or

itab-empno = ztab-empno.

itab-empname = ztab-empname.

B.) Move ztab to itab.

or

itab-eno = ztab-eno.

itab-mno = ztab-mno.

Reply me immediately.

Regards,

S.Suresh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
985

Hi Suresh,

Move-Corresponding will work in case the field name in source structure and target structure are same.

Since in your case field names in source and target structure are same, move-corresponding will work.

Hope this answers your query.

Thanks,

Arun

8 REPLIES 8
Read only

Former Member
0 Likes
986

Hi Suresh,

Move-Corresponding will work in case the field name in source structure and target structure are same.

Since in your case field names in source and target structure are same, move-corresponding will work.

Hope this answers your query.

Thanks,

Arun

Read only

0 Likes
985

Hi Arun,

I knew that.

Is correct program below so that,

Move-corresponding ztab to itab

SAME AS

itab-eno = ztab-eno.????

Move ztab to itab.

SAME AS

itab-eno = ztab-eno???

Reply me soon,

S.Suresh

Read only

0 Likes
985

ya its the one and same when itab and ztab contain only one field eno ( data element and domain must be the same for using move-corresponding)

both the below statemnts can be used because first one is direct single step assignment and the next is individual assignment

regards

prasanth

Read only

0 Likes
985

Hi Suresh,

The first one is correct.

It will assign eno correctly.

The second one I am not sure.

SAP documents says MOVE can used only to moving a field and not an internal table.

So the second statement may dump or might give syntax error.

Thanks,

Arun

Read only

prasanth_kasturi
Active Contributor
0 Likes
985

hi,

you use

move-corresponding when the source structure and the destination srtucture are noth the same or the field order in both are not the same

both the below statemnts can be used because first one is direct single step assignment and the next is individual assignment

Move-corresponding ztab to itab.

itab-empno = ztab-empno.

itab-empname = ztab-empname.

move when source srtructure and destination are the one and same

both the below statemnts can be used because first one is direct single step assignment and the next is individual assignment

Move ztab to itab.

or

itab-eno = ztab-eno.

itab-mno = ztab-mno.

regards

prasanth

Read only

Former Member
0 Likes
985

Move-Corresponding will work if the field name and data element is same in source structure and target structure are same.

otherwise u can use like this

<zin_f1> = <zf1>

If it is usefull Plz Reward

Regards

Anbu

Read only

Former Member
0 Likes
985

Hi Suresh,

The statements are correct ...move corresponding statement and move statements will work fine.

Regards

Megha Sharma

Edited by: MEGHA SHARMA on May 26, 2008 9:25 AM

Read only

Former Member
0 Likes
985

hi,

When source and dest structures are different then we can make use of move-corresponding (or) if both are identical structres with same names then we can make use of Move staement.

Rgds

Umakanth