Application Development 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: 

move and move corresponding

Former Member
0 Kudos
562

hi

Among "Move" and "Move Corresponding", which is efficient one?

1 ACCEPTED SOLUTION

Former Member
0 Kudos
159

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

8 REPLIES 8

Former Member
0 Kudos
159

hi,

move is efficient than move-corresponding.

Former Member
0 Kudos
160

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

Former Member
0 Kudos
159

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

Former Member
0 Kudos
159

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.

Former Member
0 Kudos
159

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.

Former Member
0 Kudos
159

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 user’s 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

Former Member
0 Kudos
159

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

Former Member
0 Kudos
159

answeered