matinal:abap 条件判断

2023-10-14 13:59:48 浏览数 (1)

代码语言:javascript复制
*&---------------------------------------------------------------------*
*& Report  Z8
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT Z8.

DATA result TYPE i.

result = 10.

IF result = 0.
  WRITE 'false'.
ELSE.
  WRITE 'true'.
ENDIF.


CASE result.
    WHEN 0.
    WRITE '000'.
    WHEN 1.
    WRITE '111'.
    WHEN OTHERS.
    WRITE '222'.
ENDCASE.

0 人点赞