*&---------------------------------------------------------------------*
REPORT ztabstrip1
NO STANDARD PAGE HEADING.
*---------------------------------------------------------------------*
* Selection screen
*---------------------------------------------------------------------
REPORT ztabstrip1
NO STANDARD PAGE HEADING.
*---------------------------------------------------------------------*
* Selection screen
*---------------------------------------------------------------------
*Three subscreens 101, 102 and 103 are created.
SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS:
p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X' USER-COMMAND check,
p_rad2 RADIOBUTTON GROUP grp1.
p_rad2 RADIOBUTTON GROUP grp1.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 101.
SELECTION-SCREEN END OF SCREEN 101.
SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_char1(5) TYPE c.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 102.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_char1(5) TYPE c.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 102.
SELECTION-SCREEN BEGIN OF SCREEN 103 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS: p_char2(5) TYPE c.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN END OF SCREEN 103.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS: p_char2(5) TYPE c.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN END OF SCREEN 103.
*Three tabs are created and one subscreen is assigned to each tab
SELECTION-SCREEN BEGIN OF TABBED BLOCK one FOR 20 LINES.
*Tab 1
SELECTION-SCREEN TAB (15) name1 USER-COMMAND ucomm1
DEFAULT SCREEN 101.
SELECTION-SCREEN TAB (15) name1 USER-COMMAND ucomm1
DEFAULT SCREEN 101.
*Tab 2
SELECTION-SCREEN TAB (17) name2 USER-COMMAND ucomm2
DEFAULT SCREEN 102.
SELECTION-SCREEN TAB (17) name2 USER-COMMAND ucomm2
DEFAULT SCREEN 102.
*Tab 3
SELECTION-SCREEN TAB (17) name3 USER-COMMAND ucomm3
DEFAULT SCREEN 103.
SELECTION-SCREEN END OF BLOCK one.
SELECTION-SCREEN TAB (17) name3 USER-COMMAND ucomm3
DEFAULT SCREEN 103.
SELECTION-SCREEN END OF BLOCK one.
*---------------------------------------------------------------------*
* Initialization
*---------------------------------------------------------------------
* Initialization
*---------------------------------------------------------------------
*Initialize the name of each tab
INITIALIZATION.
INITIALIZATION.
name1 = 'Tab 1'.
name2 = 'Tab 2'.
name3 = 'Tab 3'.
name2 = 'Tab 2'.
name3 = 'Tab 3'.
*---------------------------------------------------------------------*
* AT SELECTION-SCREEN
*---------------------------------------------------------------------
* AT SELECTION-SCREEN
*---------------------------------------------------------------------
*When the second radio button is selected, Tab 3 is hidden
AT SELECTION-SCREEN OUTPUT.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_rad2 = 'X'.
IF screen-name = 'NAME3'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
IF p_rad2 = 'X'.
IF screen-name = 'NAME3'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
When module pool programs are not preferred, but a tab strip is required, the above approach can be used. Each subscreen can be designed as per requirement, with parameters, radio buttons, text, etc.
try hide the first tab
ReplyDelete