1.Decisions判断语法.
a.IF语句:
IF<condition_1>.
<Statements...>.
ENDIF.
--simple IF example:
Report YH_SEP_15.
Data Title_1(20) TYPE C.
Title_1 = 'Tutorials'.
IF Title_1 = 'Tutorials'.
write 'This is IF statement'.
ENDIF.
--IF ELSE语法:
IF<condition_1>.
<statement block 1>.
ELSE.
<statement block 2>.
ENDIF.
--Example:
Report YH_SEP_15.
Data Title_1(20) TYPE C.
Title_1 = 'Tutorials'.
IF Title_1 = 'Tutorial'.
write 'This is IF Statement'.
ELSE.
write 'Th
ABAP基本语法(IF/CASE/WHILE)
最新推荐文章于 2025-03-01 00:07:24 发布