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

difference between move-corresponding and =

Former Member
0 Likes
740

Hello All,

can someone expalin the difference between move-correpnsponding and =.

i have two structures wa1 and wa2.

move-corresponding wa1 to wa2.

wa2 = wa1.

is there any diffrence between above two statements.?

thanks in advance.

Amarender Reddy B

4 REPLIES 4
Read only

former_member188827
Active Contributor
0 Likes
572

in case of move-corresponding only dose fields of wa1 will be move to wa2 which have same field names..i.e. even if wa1 and wa2 have different structres(fields) dis statemnt 'll b executed but incase of wa2 = wa1, dis statment 'll only b execute if both structures are identical 'i.e all fields same otherwise it'll giv error

plz reward points if di helps

Read only

Former Member
0 Likes
572

Hi

In move-corresponding ITAB1 to ITAB2, fields are moved field/record by record/field, if the fields are similar in both itabs and we have to APPEND ITAB2 every time

where as

ITAB2[] = itab1[]

all the data from itab1 is dumped at a time to ITAB2, including complete body.

here also both should have same structures.No need of Append here.

reward points if useful

regards,

pritha

Read only

varma_narayana
Active Contributor
0 Likes
572

Hi Amarendar..

1.

Move-Corresponding is used to Assign only work areas . where as MOVE or = can be used to Assign any type of variables.

2.

Move-corresponding wa1 to wa2.

Move-Corresponding will assign the Fields of the Source work area to the Target work area when the field names are same irrespective of their position.

Move wa1 to wa2.

of

wa2 = wa1.

This will Copy the Workarea character by character irrespective of the fieldnames.

<b>reward if Helpful</b>

Read only

Former Member
0 Likes
572

<b>move-corresponding wa1 to wa2.</b> - Using this will move the values of the similar fields of WA1 to WA2. In this case WA1 and WA2 needs to have some common fields.

<b>wa2 = wa1</b> >> U can do this if and only is Wa2 and WA1 are the same structures. Otherwise WA2 will be populated wrongly.