ABAP选择屏幕笔记(二)

*&---------------------------------------------------------------------*
*& Report Z_SCREEN_1
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT z_screen_1.
TABLES: zemployees2.

DATA: my_employees LIKE zemployees2-eenum.
*data: my_ee LIKE zemployees2-eenum.
*PARAMETERS: my_ee    LIKE zemployees-eenum,
PARAMETERS: my_ee    LIKE zemployees2-eenum DEFAULT '20000001' OBLIGATORY,
            my_fname LIKE zemployees2-surname,
            my_numbr TYPE i,

            "复选框
            my_chkb  AS CHECKBOX,
            "单选框
            my_green RADIOBUTTON GROUP grp1,
            my_blue  RADIOBUTTON GROUP grp1,
            my_red   RADIOBUTTON GROUP grp1,
            "下拉菜单
            my_g     LIKE zemployees2-gender.

* 选择范围的语法规则,有扩展
* SELECT-OPTIONS my_dob for zemployees2-dob.

* 选择范围的语法规则,没有扩展
SELECT-OPTIONS my_dob FOR zemployees2-dob NO-EXTENSION.

INITIALIZATION.

  SELECT * FROM zemployees2.
    my_employees = zemployees2-eenum.
  ENDSELECT.

  SELECTION-SCREEN ULINE.
  SELECTION-SCREEN SKIP 2.
    WRITE: / 'Surname'..



  WRITE: / 'Surname'.
  WRITE: / TEXT-001.

AT SELECTION-SCREEN ON my_ee.
  IF my_ee > my_employees.
    "MESSAGE e000(zmes1).
    MESSAGE e001(zmes1) WITH my_ee.

  ENDIF.