動態隱藏/顯示選擇螢幕
這個程式比較簡單,也沒太多的知識點,在此就不介紹了,程式如下:
*&---------------------------------------------------------------------*
*& Report ZTEST_SELECT_SCREEN
*&
*&---------------------------------------------------------------------*
*& Create By : flying
*& Create Date : 2009-11-25
*& descriptions : 測試隱藏/顯示選擇螢幕
*&---------------------------------------------------------------------*
REPORT ZTEST_SELECT_SCREEN.
tables: mbew,
ekpo,
mseg.
*----------------------------------------------------------------------*
* selection-screen
* 選擇螢幕
*
*----------------------------------------------------------------------*
*** 定義選擇表的選擇螢幕
selection-screen begin of block blk1 with frame title text-000.
parameters: r1 radiobutton group grp user-command sele default 'X', "這裡沒有user-command sele會不起作用的
r2 radiobutton group grp,
r3 radiobutton group grp.
selection-screen end of block blk1.
*** 定義表mbew的選擇螢幕
selection-screen begin of block blk2 with frame title text-001.
parameters: p_werks like mbew-bwkey modif id m1. "設定螢幕元素的組,方便操作
select-options: s_matnr for mbew-matnr modif id m1.
selection-screen end of block blk2.
*** 定義表ekpo的選擇螢幕
selection-screen begin of block blk3 with frame title text-002.
parameters: p_werks1 like ekpo-werks modif id m2.
select-OPTIONS s_matnr1 for ekpo-matnr modif id m2.
selection-screen end of block blk3.
*** 定義表mseg的選擇螢幕
selection-screen begin of block blk4 with frame title text-003.
parameters: p_werks2 like mseg-werks modif id m3.
select-options s_matnr2 for mseg-matnr modif id m3.
selection-screen end of block blk4.
*-----------------------------------------------------------------------*
* at selection-screen output
* 螢幕輸出之前處理
*
*-----------------------------------------------------------------------*
at selection-screen output.
loop at screen.
case screen-group1. "螢幕組
when 'M1'.
if r1 eq 'X'.
screen-active = 1. "設定螢幕顯示
else.
screen-active = 0. "設定螢幕隱藏
endif.
when 'M2'.
if r2 eq 'X'.
screen-active = 1.
else.
screen-active = 0.
endif.
when 'M3'.
if r3 eq 'X'.
screen-active = 1.
else.
screen-active = 0.
endif.
endcase.
modify screen. "修改選擇螢幕屬性
endloop.
執行效果如下:
*&---------------------------------------------------------------------*
*& Report ZTEST_SELECT_SCREEN
*&
*&---------------------------------------------------------------------*
*& Create By : flying
*& Create Date : 2009-11-25
*& descriptions : 測試隱藏/顯示選擇螢幕
*&---------------------------------------------------------------------*
REPORT ZTEST_SELECT_SCREEN.
tables: mbew,
ekpo,
mseg.
*----------------------------------------------------------------------*
* selection-screen
* 選擇螢幕
*
*----------------------------------------------------------------------*
*** 定義選擇表的選擇螢幕
selection-screen begin of block blk1 with frame title text-000.
parameters: r1 radiobutton group grp user-command sele default 'X', "這裡沒有user-command sele會不起作用的
r2 radiobutton group grp,
r3 radiobutton group grp.
selection-screen end of block blk1.
*** 定義表mbew的選擇螢幕
selection-screen begin of block blk2 with frame title text-001.
parameters: p_werks like mbew-bwkey modif id m1. "設定螢幕元素的組,方便操作
select-options: s_matnr for mbew-matnr modif id m1.
selection-screen end of block blk2.
*** 定義表ekpo的選擇螢幕
selection-screen begin of block blk3 with frame title text-002.
parameters: p_werks1 like ekpo-werks modif id m2.
select-OPTIONS s_matnr1 for ekpo-matnr modif id m2.
selection-screen end of block blk3.
*** 定義表mseg的選擇螢幕
selection-screen begin of block blk4 with frame title text-003.
parameters: p_werks2 like mseg-werks modif id m3.
select-options s_matnr2 for mseg-matnr modif id m3.
selection-screen end of block blk4.
*-----------------------------------------------------------------------*
* at selection-screen output
* 螢幕輸出之前處理
*
*-----------------------------------------------------------------------*
at selection-screen output.
loop at screen.
case screen-group1. "螢幕組
when 'M1'.
if r1 eq 'X'.
screen-active = 1. "設定螢幕顯示
else.
screen-active = 0. "設定螢幕隱藏
endif.
when 'M2'.
if r2 eq 'X'.
screen-active = 1.
else.
screen-active = 0.
endif.
when 'M3'.
if r3 eq 'X'.
screen-active = 1.
else.
screen-active = 0.
endif.
endcase.
modify screen. "修改選擇螢幕屬性
endloop.
執行效果如下:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/16794144/viewspace-681160/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ABAP選擇螢幕:根據使用者選擇動態顯示螢幕(轉老宋)
- javascript動態隱藏顯示技術(轉)JavaScript
- jqgrid動態顯示,隱藏指定列
- login介面 checkbox選擇顯示或者隱藏密碼密碼
- 在 Laravel 中動態 隱藏 / 顯示 API 欄位LaravelAPI
- javascript動態設定div的顯示和隱藏JavaScript
- js動態控制表單的顯示和隱藏JS
- mac顯示隱藏檔案,取消顯示隱藏檔案Mac
- CSS點選隱藏和顯示div效果CSS
- Android -- 工具類(七):[ScreenUtil] (截圖,獲取螢幕寬高,顯示、隱藏虛擬鍵盤,調節螢幕亮度)Android
- Android螢幕中隱藏標題欄和狀態列Android
- QT居中螢幕顯示QT
- 螢幕顯示機制
- iOS 隱藏&顯示tabBariOStabBar
- jquery點選按鈕顯示和隱藏DIvjQuery
- MacOS X隱藏和顯示隱藏檔案Mac
- Mac顯示和隱藏“隱藏檔案”命令Mac
- element-plus el-table 動態設定列顯示隱藏
- 動態控制C4C UI元素的顯示和隱藏UI
- 滾動cell 顯示隱藏導航欄
- LCD螢幕顯示PNG影像
- jQuery實現的點選元素隱藏和顯示jQuery
- 點選按鈕動畫方式隱藏和顯示div動畫
- 點選開關顯示或者隱藏input文字框
- JavaScript點選切換div的顯示和隱藏JavaScript
- jQuery 效果 – 隱藏和顯示jQuery
- mac隱藏檔案顯示Mac
- view的隱藏和顯示View
- Mac 顯示隱藏檔案Mac
- VB原始碼推薦: 動態的顯示/隱藏start按鈕 (轉)原始碼
- Mac顯示/不顯示隱藏檔案教程!Mac
- MAC如何顯示隱藏檔案和隱藏隱藏檔案的命令Mac
- Mac下顯示和隱藏隱藏檔案的命令Mac
- Android 顯示、隱藏狀態列和導航欄Android
- 點選同一按鈕顯示隱藏切換
- 點選按鈕實現div的顯示和隱藏
- JavaScript點選一個按鈕隱藏和顯示divJavaScript
- steam隱藏的遊戲怎麼顯示出來 steam隱藏顯示遊戲方法介紹遊戲