CSDN博客

img moqing

Move to 与Write to 的区别

发表于2008/9/30 8:55:00  299人阅读

Move to 与Write to 的区别:

Move to只是把值做了传递.

Write to 把值与格式同时做了传递.

例子:

 *------------------------------------------------------------*
* Program ID/Name:        ZCORD_04
* Author's name:          易登科
* Date written:           2008-09-26
* Last update:            2008-09-28
* Program title:          Move to 与Write to 的区别示例

*-
* Date            Userid             Reason/Description of Change

*------------------------------------------------------------*

  data: gv_char1(20type c,
     gv_char2(20type c,
     dec1(10type p decimals 2 value '22345.89'.

start-of-selection.
* date *
  write:/ 'date variable'.
  write sy-datum to gv_char1.
  write:/ 'write to', gv_char1.
  move sy-datum to gv_char2.
  write:/ 'move to', gv_char2.
  gv_char2 = sy-datum.
  write:/ 'gv_char2= ', gv_char2.
  skip 1.
* decimal *
  write:/ 'decimal variable'.
  write dec1 to gv_char1.
  write:/ 'write to', gv_char1.
  move dec1 to gv_char2.
  write:/'move to', gv_char2.
  
  gv_char2 = dec1.
  write:/ 'gv_char', gv_char2.

0 0

相关博文

我的热门文章

img
取 消
img