SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS p_r RADIOBUTTON GROUP g1 USER-COMMAND select DEFAULT 'X'. "日模式
PARAMETERS p_y RADIOBUTTON GROUP g1 . "月模式
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE T1.
SELECT-OPTIONS:
s_bukrs FOR bsid-bukrs . " 公司代码
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT .
IF p_r IS NOT INITIAL.
t1 = '日'
ELSE.
t1 = '月'
ENDIF.
这样就行了。
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE T1.
这里已经声明了t1这个变量,不需要重新定义