zoukankan      html  css  js  c++  java
  • ABAP多标签选择屏幕的使用

    REPORT zzzzz.

    DATA: g_dynnr LIKE sy
    -dynnr. "当前屏幕的编号

    "定义两个子屏幕
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    PARAMETERS p_file TYPE tabname.
    SELECTION
    -SCREEN END OF SCREEN 100.

    SELECTION
    -SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.
    PARAMETERS p_file2 TYPE tabname.
    SELECTION
    -SCREEN END OF SCREEN 300.

    "将两个屏幕合并到TAB里面
    "
    类似于通常的BEGIN OF BLOCK
    "
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE title1.

    SELECTION
    -SCREEN BEGIN OF TABBED BLOCK mytab FOR 11 LINES.
    SELECTION
    -SCREEN TAB (20) text1 USER-COMMAND but1.
    SELECTION
    -SCREEN TAB (20) text2 USER-COMMAND but2.
    SELECTION
    -SCREEN END OF BLOCK mytab.

    INITIALIZATION .
    text1
    ='ONE'.
    text2
    ='TWO'.

    mytab
    -prog = sy-repid.
    "初始化屏幕0100
    IF g_dynnr = space.
    mytab
    -dynnr =100.
    mytab
    -activetab ='BUT1'.
    ENDIF.

    AT SELECTION
    -SCREEN. "PAI
    CASE sy-dynnr.
    WHEN
    1000.
    CASE sy
    -ucomm.
    WHEN
    'BUT1'.
    mytab
    -dynnr =100.
    WHEN
    'BUT2'.
    mytab
    -dynnr =300.
    WHEN OTHERS.
    ENDCASE.
    ENDCASE.

    AT SELECTION
    -SCREEN OUTPUT. "PBO

    START
    -OF-SELECTION.
    CASE mytab
    -dynnr.
    WHEN
    100.
    MESSAGE
    '100' TYPE 'S' DISPLAY LIKE 'S'.
    WHEN
    300.
    MESSAGE
    '300' TYPE 'S' DISPLAY LIKE 'S'.
    ENDCASE.
  • 相关阅读:
    redis中文API
    基于redis的分布式锁
    redis安装使用配置
    windows常用命令
    curl命令详解
    linux远程连接
    memcache在大型网站的应用策略
    缓存使用的一些注意事项
    记录memcache分布式策略及算法
    U盘安装Centos7.0图解
  • 原文地址:https://www.cnblogs.com/leotian/p/2028937.html
Copyright © 2011-2022 走看看