abap多標籤頁實現(tabstrip)

2021-05-02 15:27:02 字數 2661 閱讀 1310

如圖:

可以通過畫螢幕即call screen或者純**實現。以下**為純**實現方式

data flag(1) type c.

* subscreen 1

selection-screen begin of screen 100 as subscreen.

selection-screen begin of block b1 with frame.

parameters: p1(10) type c,

p2(10) type c,

p3(10) type c.

selection-screen end of block b1.

selection-screen end of screen 100.

* subscreen 2

selection-screen begin of screen 200 as subscreen.

selection-screen begin of block b2 with frame.

parameters: q1(10) type c obligatory,

q2(10) type c obligatory,

q3(10) type c obligatory.

selection-screen end of block b2.

selection-screen end of screen 200.

* standard selection screen

selection-screen: begin of tabbed block mytab for 10 lines,

tab (20) button1 user-command push1,

tab (20) button2 user-command push2,

tab (20) button3 user-command push3

default screen 300,

end of block mytab.

initialization.

button1 = text-010.

button2 = text-020.

button3 = text-030.

mytab-prog = sy-repid.

mytab-dynnr = 100.

mytab-activetab = 'button1'.

at selection-screen.

case sy-dynnr.

when 1000.

case sy-ucomm.

when 'push1'.

mytab-dynnr = 100.

mytab-activetab = 'button1'.

when 'push2'.

mytab-dynnr = 200.

mytab-activetab = 'button2'.

endcase.

when 100.

message s888(sabapdocu) with text-040 sy-dynnr.

when 200.

message s888(sabapdocu) with text-040 sy-dynnr.

endcase.

module init_0100 output.

loop at screen.

if screen-group1 = 'mod'.

case flag.

when 'x'.

screen-input = '1'.

when ' '.

screen-input = '0'.

endcase.

modify screen.

endif.

endloop.

endmodule.

module user_command_0100 input.

message s888(sabapdocu) with text-050 sy-dynnr.

case sy-ucomm.

when 'toggle'.

if flag = ' '.

flag = 'x'.

elseif flag = 'x'.

flag = ' '.

endif.

endcase.

endmodule.

start-of-selection.

write: / 'p1:', p1,'q1:', q1,

/ 'p2:', p2,'q2:', q2,

/ 'p3:', p3,'q3:', q3.

300螢幕是建立的,顯示的是前兩個螢幕的值,只要螢幕上變數名稱和100,200定義相同即可。

tab 標籤頁實現

標籤頁功能是乙個比較常用的功能。雖然很多前端框架 外掛程式都帶有若干種標籤頁的功能實現,我依然覺得掌握其基本實現會更有利於我們對這個功能的理解,我們也可以更容易地根據實際情況進行修改。以下 示例是乙個比較常見的實現 春天的雨是柔和的,只見春雨在竹枝 竹葉上跳動著。那雨時而直線滑落,時而隨風飄灑,留下...

京京 多標籤頁的顯示

健康狀況 rownum 身高 cm 體重 kg 足長 cm 血型血壓 特殊標記 健康狀況 社會關係 關係人姓名 性別年齡 關係工作單位 聯絡位址 郵編 同案犯在押人員編碼 看守所名稱 姓名證件號 性別出生日期 監室號主案類別 辦案環節 入所日期 關押期限 收押狀態 談話記錄 談話型別 談話負責民警 ...

MFC多標籤頁對話方塊

1.新建乙個mfc工程 取名pagesheet,選擇dialog based,然後finish。2.在對話方塊資源中插入兩個對話方塊idd dialog1 idd dialog2,作為兩個子頁。3.為這兩個對話方塊增加兩個類,分別為cpage1和cpage2,其基類選擇cpropertypage。4...