zoukankan      html  css  js  c++  java
  • ABAP 选择屏幕创建标签页

    *&---------------------------------------------------------------------*
    *& Report  ZTEST_TAB
    *&
    *&---------------------------------------------------------------------*
    *&
    *&
    *&---------------------------------------------------------------------*
    
    REPORT  ZTEST_TAB.
    TABLES MARA.
                                                                 "定义子屏幕 100
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    SELECT-OPTIONS: S_FG1 FOR MARA-MATNR.
    SELECTION-SCREEN END OF SCREEN 100.
    
    SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
    SELECT-OPTIONS: S_FG2 FOR MARA-MATNR.
    SELECTION-SCREEN END OF SCREEN 200.
    
    SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.
    SELECT-OPTIONS: S_RAW FOR MARA-MATNR.
    SELECTION-SCREEN END OF SCREEN 300.
    
    "定义一个TAB空间, 取名为MYTAB, 控件高2行, 共分为三个页签.
    "三个页签的功能代码分别为push1, push2, push3.
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK MYTAB FOR 2 LINES,
       TAB (25) BUTTON1 USER-COMMAND PUSH1,
       TAB (25) BUTTON2 USER-COMMAND PUSH2,
       TAB (25) BUTTON3 USER-COMMAND PUSH3,
    END OF BLOCK MYTAB.
    
    "为TAB控件分配初始化值
    
    INITIALIZATION.
       BUTTON1 = TEXT-010.
       BUTTON2 = TEXT-020.
       BUTTON3 = TEXT-030.
       MYTAB-PROG = SY-REPID.
       MYTAB-DYNNR = 100.
    
       "为控件页签单击事件, 选择不同页签显示不同子屏幕.
    
    AT SELECTION-SCREEN.
       CASE SY-UCOMM.
         WHEN 'PUSH1'.
           MYTAB-DYNNR = 100.
           MYTAB-ACTIVETAB = 'BUTTON1'.
         WHEN 'PUSH2'.
           MYTAB-DYNNR = 200.
           MYTAB-ACTIVETAB = 'BUTTON2'.
         WHEN 'PUSH3'.
           MYTAB-DYNNR = 300.
           MYTAB-ACTIVETAB = 'BUTTON3'.
       ENDCASE.
    
       "处理各个屏幕的触发
    
    START-OF-SELECTION.
       IF MYTAB-DYNNR = 100.
    *    PERFORM GET_FG1.
       ELSEIF MYTAB-DYNNR = 200.
    *    PERFORM GET_FG2.
       ELSEIF MYTAB-DYNNR = 300.
    *    PERFORM GET_MATNR.
       ENDIF. 
  • 相关阅读:
    JavaScript学习总结(一)——ECMAScript、BOM、DOM(核心、浏览器对象模型与文档对象模型)
    IDEL——maven的搭建
    JDBC——Mysql 5.7绿色版配置安装过程
    JAVA的面向对象编程--------课堂笔记
    Javaweb第九章、jsp引入JSTL
    jsp引入JSTL后实现jsp的解耦
    servret的引入
    网页设计学习笔记小结
    jdk和Tomcat环境变量设置
    SLZ-VMware虚拟机_ORACLE安装监听器
  • 原文地址:https://www.cnblogs.com/mingdashu/p/6824161.html
Copyright © 2011-2022 走看看