首页 > 应用开发 > IT综合 > Move & Move-Corresponding in ABAP

Move & Move-Corresponding in ABAP

原创 IT综合 作者:qmhiro 时间:2008-05-12 14:44:20 0 删除 编辑

DATA: BEGIN OF wa_tab1,
fld1(4) VALUE ’FLD1’,
fld2(4) VALUE ’FLD2’,
fld3(4) VALUE ’FLD3’,
fld4(4) VALUE ’FLD4’,
fld5(4) VALUE ’FLD5’,
END OF wa_tab1,
BEGIN OF wa_tab2,
END OF wa_tab2.

************* Move Corresponding *************
MOVE-CORRESPONDING wa_tab1 to wa_tab2.
************ End Move Corresponding

MOVE: wa_tab1-fld1 to wa_tab2-fld1,
wa_tab1-fld2 to wa_tab2-fld2,
wa_tab1-fld3 to wa_tab2-fld3,
wa_tab1-fld4 to wa_tab2-fld4.
****************** End Move ******************

In above example, the result of MOVE and MOVE-CORRESPONDING is same. MOVE-CORRESPONDING is look like easy to coding but

MOVE statement have performance better than MOVE-CORRESPONDING because when you apply MOVE-CORRESPONDING CPU usage of system

will be increased.

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

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.


来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

下一篇: SmartForms总结(转)
请登录后发表评论 登录
  • 博文量
  • 访问量