Chinaunix首页 | 论坛 | 博客
  • 博客访问: 404600
  • 博文数量: 120
  • 博客积分: 6000
  • 博客等级: 准将
  • 技术积分: 1266
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-16 16:04
文章分类

全部博文(120)

文章存档

2011年(4)

2010年(10)

2009年(38)

2008年(68)

我的朋友

分类:

2008-11-25 14:00:32

熟悉SELECTION-SCREEN相关语句做的小练习,随便看看.
 
REPORT ZTEST_002.
TYPE-POOLS ICON.
TABLES MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME .
PARAMETERS P_WERKS TYPE WERKS.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 1(4) BUT1 USER-COMMAND BUTTON1 VISIBLE LENGTH 2.
SELECTION-SCREEN COMMENT 6(20) COM1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME .
SELECT-OPTIONS:S_MATNR FOR MARA-MATNR MODIF ID BL1,
               S_GROES FOR MARA-GROES MODIF ID BL1.
SELECTION-SCREEN END OF BLOCK B2 .

INITIALIZATION.
  WRITE ICON_DATA_AREA_EXPAND AS ICON TO BUT1 .
  COM1 = 'DATA EXPAND'.
AT SELECTION-SCREEN.
  CASE SY-UCOMM.
    WHEN 'BUTTON1'.
      IF BUT1 = .
        WRITE ICON_DATA_AREA_COLLAPSE AS ICON TO BUT1.
        COM1 = 'DATA COLLAPSE'.
      ELSE.
        WRITE ICON_DATA_AREA_EXPAND AS ICON TO BUT1.
        COM1 = 'DATA EXPAND'.
      ENDIF.
  ENDCASE.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF BUT1 = AND SCREEN-GROUP1 = 'BL1'.
      SCREEN-ACTIVE = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
 
阅读(619) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~