REPORT zcp_saptest2 .
DATA: result TYPE i,
int1 TYPE i VALUE 1,
int2 TYPE i VALUE 2.
int1 TYPE i VALUE 1,
int2 TYPE i VALUE 2.
DEFINE operation.
result = &1 &2 &3.
output &1 &2 &3 result.
END-OF-DEFINITION.
result = &1 &2 &3.
output &1 &2 &3 result.
END-OF-DEFINITION.
DEFINE output.
write:/ 'the result of &1 &2 &3 is',&4.
end-of-definition.
write:/ 'the result of &1 &2 &3 is',&4.
end-of-definition.
operation 1 + 2 .
operation int2 - int1.
operation int2 - int1.
运行结果:
the result of 1 + 2 is 3
the result of INT2 - INT1 is 1
the result of INT2 - INT1 is 1