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 and move-corresponding

Former Member
0 Likes
461

can any body please explain about move and move-correspoding...thanks

1 ACCEPTED SOLUTION
Read only

anversha_s
Active Contributor
0 Likes
430

hi vijaya,

mOVE - > when we use Move,

MOVE source to TARGET.

here source and target shuld be of same structre and order.

MOVE COressponding - >

MOVE CORRESSPONDING source TO target.

the source and target shuld be same structure but can be in different order.

but the process will happend correctly like MOVE.

BUT PERFORMANCE

***********************

NEVER USE MOVE CORRESSPONDING.

IT WILL TAKE MORE TIME.

SO ALWYS USE 'MOVE'.

RGDS

anver

if hlped mark points

4 REPLIES 4
Read only

Former Member
0 Likes
430

Hi,

MOVE just move the values without looking at the field names. Meaning it just the moves the number of characters from the source to the target structure OR variable.

MOVE-CORRESPONDING looks for the corresponding field names in the target structure and move those values only..

DATA: BEGIN OF source,

matnr type matnr,

end of source.

DATA: BEGIN OF target,

vbeln type vbeln,

matnr type matnr,

end of target.

source-matnr = 'asdfasf'.

MOVE-CORRESPONDING source to target.

write: / 'vbeln- ', target-vbeln.

write: / 'matnr- ', target-matnr.

clear: target.

skip 1.

MOVE source to target.

write: / 'vbeln- ', target-vbeln.

write: / 'matnr- ', target-matnr.

  • If you see the second output the value in matnr is moved to

  • vbeln in target.

Thanks,

Naren

Read only

Former Member
0 Likes
430

MOVE is used to move data from one field to another field with similar datatype.

MOVE-CORRESPONDING is used to move data between structures. It searches for all names of subfields that occur both in struc1 and struc2.

Read only

anversha_s
Active Contributor
0 Likes
431

hi vijaya,

mOVE - > when we use Move,

MOVE source to TARGET.

here source and target shuld be of same structre and order.

MOVE COressponding - >

MOVE CORRESSPONDING source TO target.

the source and target shuld be same structure but can be in different order.

but the process will happend correctly like MOVE.

BUT PERFORMANCE

***********************

NEVER USE MOVE CORRESSPONDING.

IT WILL TAKE MORE TIME.

SO ALWYS USE 'MOVE'.

RGDS

anver

if hlped mark points

Read only

0 Likes
430

Thanks...answer is pretty clear