‎2007 Sep 04 8:23 AM
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
‎2007 Sep 04 8:26 AM
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
‎2007 Sep 04 8:26 AM
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
‎2007 Sep 04 8:42 AM
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>
‎2007 Sep 04 8:50 AM
<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.