what is difference between MOVE and MOVE-CORRESPONDING?
Answers were Sorted based on User's Feedback
Answer / bhabaneesh
Move is used to data transfer between the same structure
but move-corresponding data transfer between two structure
if both have some common fields
Is This Answer Correct ? | 38 Yes | 2 No |
Answer / yasin
Take a look at this example
05 WS-CURRENT-DATE.
10 CURRENT-CC PIC X(02).
10 CURRENT-YY PIC X(02).
10 CURRENT-MM PIC X(02).
10 CURRENT-DD PIC X(02).
05 WS-INSERT-DATE.
10 CURRENT-MM PIC X(02).
10 FILLER PIC X(01) VALUE '/'.
10 CURRENT-DD PIC X(02).
10 FILLER PIC X(01) VALUE '/'.
10 CURRENT-CC PIC X(02).
10 CURRENT-YY PIC X(02).
MOVE CORRESPONDING WS-CURRENT-DATE TO WS-INSERT-DATE
Here 'Move Corresponding' moves the fields in WS-CURRENT-
DATE variable to their same field names in WS-INSERT-DATE,
irrespective of their Structure .
Move Statement will just moved the contents as is from a
variable to other, irrespective of the fields .
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / malli.gontla
move statement is more effienet 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.
Movecorresponding :
If DBtable having 1000 fields and you are using
movecorresponding, then system has to check all the field in
table to move.
Is This Answer Correct ? | 4 Yes | 7 No |
Answer / srinivas
move-corresponding is the one used to move internal body
work area to screen fields.
move-corresponding itab to lfa1.
where as move statement is used to move field by field from
internal body to screen fields.
move : itab-lifnr = lfa1-lifnr.
Is This Answer Correct ? | 4 Yes | 7 No |
how to use table control in bdc
what is the role of ST05 in performance tuning?
Name some system global variables you can use in abap programs?
If I have put commit in badi implementation class after update, is it allowed? Also if some standard functionality already implemented an update and now i m doing update and if it fails, what will be the impact of commit?
Difference between interactive and ALV Reports
what is the various print modes available with SAP scripts?
what is difference between update and modify
what is OSS?please answer if anybody knows
What is Basic IDOC type?
Explain buffering concept usage?
what is difference between include structure and append structure?
What is pseudo comment (#EC) and How it is different from normal comments(i.e. '*' and '"')