2019-02-15——ABAP4常量和字面量

2019-02-15  本文已影响0人  林之禾

constants声明

constants <f> type <type> value <val>.

constants语句类似data语句

report yr_sep_12.
constants pqr type p decimals 4 value '1.2356'.
write: / 'the value of pqr is :', pqr.
the value of pqr is : 1.2356

复常数示例:

begin of employee,
name(25) type c value 'management team',
organization(40) type c value 'tutorials point ltd',
place(10) type c value 'india',
end of employee.

在上面代码片段中,employee是一个由name,organization和place字段组成的复杂常量。
以下语句声明一个常量引用:

constants null_pointer type ref to object value is initial.
上一篇 下一篇

猜你喜欢

热点阅读