2007 Jul 06 11:03 AM
hi
Among "Move" and "Move Corresponding", which is efficient one?
2007 Jul 06 11:05 AM
Hi
MOVE: means from move one field to other , and the field names may be different
MOVE-CORRESPONDING means both the field names in both sides are to be same.then only we use this.
Reward points for useful Answers
Regards
Anji
2007 Jul 06 11:04 AM
2007 Jul 06 11:05 AM
Hi
MOVE: means from move one field to other , and the field names may be different
MOVE-CORRESPONDING means both the field names in both sides are to be same.then only we use this.
Reward points for useful Answers
Regards
Anji
2007 Jul 06 11:07 AM
Hi,
MOve-Corresponding is more convinient than moving fileds individually. but this command takes more CPU time this result in poor performance.
Reward if helpful
Regards
Raghavendra.D.S
2007 Jul 06 11:07 AM
Hi,
Move statement is more efficient than move-corresponding.
In case of dialog programming move/movecorresponding stsmt
are used to put internal table workarea data into screen fields.
data: begin of itab occurs 0,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
ort01 like lfa1-ort01,
end of itab.(here lfa1 is DBtable name)
:
:
in case of movecorresponding
Move-Corresponding itab to lfa1.
(here:lfa1 is screen fields name).
in case of MOVE stmt.
Move itab-lifnr to lfa1-lifnr.
Move itab-name1 to lfa1-name1.
Move itab-ort01 to lfa1-ort01.
Move-corresponding :
If DBtable having 1000 fields and you are using
movecorresponding, then system has to check all the field in
table to move.
Regards,
Padmam.
2007 Jul 06 11:19 AM
Move is more efficient than Move-corresponding.
coz in Move-Corresponding the prog search for the corresponding fields hence takes more time.
It is recommended to use MOVE individual fields.
Rewards if useful.
2007 Jul 06 11:28 AM
HI
To assign the value of a data object source to a variable destination, use the following statement:
MOVE source TO destination.
or the equivalent statement
destination = source.
The content of source remains unchanged, source does not therefore have to be a variable - it can also be a literal, a text symbol, or a constant. You must always specify decimal points with a period (.), regardless of the users personal settings.
Multiple assignments
f4 = f3 = f2 = f1.
are also possible. ABAP processes them from right to left as follows:
MOVE f1 TO f2.
MOVE f2 TO f3.
MOVE f3 TO f4.
***************************
MOVE-CORRESPONDING sourcestruct TO destinationstruct.
This statement assigns the contents of the components of structure sourcestruct to the components of the destinationstruct structure that have identical names.
When it is executed, it is broken down into a set of MOVEstatements, one for each pair of fields with identical names, as follows:
MOVE sourcestruct-comp1 TO destinationstruct-comp1.
MOVE sourcestruct-comp2 TO destinationstruct-comp2.
DATA: BEGIN OF address,
firstname(20) TYPE c VALUE 'Fred',
surname(20) TYPE c VALUE 'Flintstone',
initials(4) TYPE c VALUE 'FF',
street(20) TYPE c VALUE 'Cave Avenue',
number TYPE i VALUE '11',
postcode(5) TYPE n VALUE '98765',
city(20) TYPE c VALUE 'Bedrock',
END OF address.
DATA: BEGIN OF name,
surname(20) TYPE c,
firstname(20) TYPE c,
initials(4) TYPE c,
title(10) TYPE c VALUE 'Mister',
END OF name.
MOVE-CORRESPONDING address TO name.
In this example, the values of name-surname, name-firstname and name-initials are set to 'Flintstone, Fred, and 'FF'. name-title always has the value Mister.
Reward all helpfull answers.
Regards.
Jay
2007 Jul 06 11:43 AM
Hi,
Move Corressponding is efficient one.
MOVE CORRESPONDING:
********************************
In move corresponding we can move more than one data.
EXAMPLE:
************
MOVE-CORRESPONDING MARA TO ITAB.
MOVE:
********
By using move statement we can move only one data at a time.
EXAMPLE:
**************
MOVE ITAB-MATNR TO MARA-MATNR.
IF USEFULL REWARD
2007 Jul 06 12:18 PM