Mobile: 135 8576 5961 / WeChat: IM_WILLIAM_C / Mail: william.chen.cn@outlook.com /
分类: 其他平台
2016-01-26 10:38:01
WRITE ... TO 把源的格式 附值到目标。
MOVE ... TO 直接把源的值附到目标。
示例:
data: gv_char1(20) type c,
gv_char2(20) type c,
dec1(10) type 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.
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.
结果:
date variable
write to 2008-11-09
move to 20081109
decimal variable
write to 22,345.89
move to 22345.89
转载:
http://blog.163.com/fuwa_beijing/blog/static/50467514201042815647707/