ABAP 选择屏幕创建标签页
Posted 明大叔
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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.
以上是关于ABAP 选择屏幕创建标签页的主要内容,如果未能解决你的问题,请参考以下文章
ABAP的Package interface, 安卓的manifest.xml和Kubernetes的Capabilities