ITPub博客

首页 > 应用开发 > IT综合 > 屏幕控制示例程序

屏幕控制示例程序

IT综合 作者:JuinBoy 时间:2015-12-10 10:33:11 0 删除 编辑
转来的,全面的程序控制内容,很不错。[@more@]

*&---------------------------------------------------------------------*
*& Report ZTEST_RAY *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*

REPORT ZTEST_RAY .
*REPORT dynamic_selscreen.

**DECLARATIONS FOR SELECTION SCREEN STATUS
DATA IT_UCOMM TYPE TABLE OF SY-UCOMM.

SELECTION-SCREEN BEGIN OF BLOCK B01 WITH FRAME.
PARAMETERS : PA RADIOBUTTON GROUP RAD USER-COMMAND COM,
PB RADIOBUTTON GROUP RAD.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (10) TEXT001 MODIF ID R01.
SELECTION-SCREEN POSITION 15.
PARAMETERS P_UP(10) TYPE C MODIF ID R01.
SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (10) TEXT002 MODIF ID R02.
SELECTION-SCREEN POSITION 15.
PARAMETERS P_DOWN(10) TYPE C MODIF ID R02.
SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (10) TEXT003 MODIF ID R02.
SELECTION-SCREEN POSITION 15.
PARAMETERS P_CHE AS CHECKBOX MODIF ID R02.
SELECTION-SCREEN END OF LINE.


SELECTION-SCREEN END OF BLOCK B01.

INITIALIZATION.
TEXT001 = '??????'.
TEXT002 = '??????'.
TEXT003 = '?????'.


LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'R01'.
SCREEN-INTENSIFIED = '1'.
SCREEN-ACTIVE = 1.
SCREEN-DISPLAY_3D = '1'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'R02'.
SCREEN-INTENSIFIED = '0'.
SCREEN-ACTIVE = 0.
SCREEN-DISPLAY_3D = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

AT SELECTION-SCREEN OUTPUT.
IF PA = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'R01'.
SCREEN-INTENSIFIED = '1'.
SCREEN-ACTIVE = 1.
SCREEN-DISPLAY_3D = '1'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'R02'.
SCREEN-INTENSIFIED = '0'.
SCREEN-ACTIVE = 0.
SCREEN-DISPLAY_3D = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

ELSEIF PB = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'R02'.
SCREEN-INTENSIFIED = '1'.
SCREEN-ACTIVE = 1.
SCREEN-DISPLAY_3D = '1'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'R01'.
SCREEN-INTENSIFIED = '0'.
SCREEN-ACTIVE = 0.
SCREEN-DISPLAY_3D = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.

**CUSTOMISING THE TOOLBARS OF THE SELECTION SCREEN
**WITH F8 BUTTON DISABLED
APPEND : 'PRIN' TO IT_UCOMM,
'SPOS' TO IT_UCOMM,
'ONLI' TO IT_UCOMM.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
P_STATUS = SY-PFKEY
TABLES
P_EXCLUDE = IT_UCOMM.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29484316/viewspace-1869545/,如需转载,请注明出处,否则将追究法律责任。

下一篇: SAP LINK
请登录后发表评论 登录
全部评论

注册时间:2014-02-13

  • 博文量
    10
  • 访问量
    22632