Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Q) how to create tabstrips in selection screen?

Former Member
0 Kudos

Q) how to create tabstrips in selection screen?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

Please check the fallowing code...Award me points if it solves ur problem....

&----


*& Report ZTABSTRIP *

*& Author: Kevin Wilson *

*& HTTP://www.sapgenie.com - Portal for SAP consultants *

&----


REPORT ztabstrip LINE-SIZE 120 NO STANDARD PAGE HEADING.

TABLES: mara, lfa1, ekpo.

----


  • selection screen *

----


  • Define screen 101 as subscreen

SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t00.

SELECT-OPTIONS matnr FOR mara-matnr.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN END OF SCREEN 101.

  • Define screen 102 as subscreen

SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.

SELECT-OPTIONS: kunnr FOR lfa1-kunnr.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN END OF SCREEN 102.

  • Define tab screen

SELECTION-SCREEN BEGIN OF TABBED BLOCK t1 FOR 20 LINES.

SELECTION-SCREEN TAB (10) name1 USER-COMMAND PUSH1 DEFAULT SCREEN 101.

SELECTION-SCREEN TAB (20) name2 USER-COMMAND PUSH2 DEFAULT SCREEN 102.

SELECTION-SCREEN END OF BLOCK t1.

INITIALIZATION.

name1 = text-n01. "Material

name2 = text-n02. "Vendor

name3 = text-n03. "Plant

at selection-screen.

case sy-ucomm. "To set the screen on tab

when 'PUSH1'. "when cliched on any one of tab

tabb1-dynnr = 101.

tabb1-activetab = 'TABS1'.

when 'PUSH2'.

tabb1-dynnr = 102.

tabb1-activetab = 'TABS2'.

endcase.

Regards,

Sanjeev

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Here ya go.



report zrich_0001
       no standard page heading.

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.
selection-screen end of block b1.
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 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 type c.
selection-screen end of block b3.
selection-screen end of screen 103.

selection-screen begin of tabbed block one for 20 lines.
selection-screen tab (15) name1 user-command ucomm1
default screen 101.
selection-screen tab (17) name2 user-command ucomm2
default screen 102.
selection-screen tab (17) name3 user-command ucomm3
default screen 103.
selection-screen end of block one.

initialization.

  name1 = 'Tab 1'.
  name2 = 'Tab 2'.
  name3 = 'Tab 3'.


at selection-screen output.

  loop at screen.
    if p_rad2 = 'X'.
      if screen-name = 'NAME3'.
        screen-invisible = '1'.
        modify screen.
      endif.
    endif.
  endloop.


start-of-selection.

Regarsds,

Rich Heilman

Former Member
0 Kudos

hi,

Please check the fallowing code...Award me points if it solves ur problem....

&----


*& Report ZTABSTRIP *

*& Author: Kevin Wilson *

*& HTTP://www.sapgenie.com - Portal for SAP consultants *

&----


REPORT ztabstrip LINE-SIZE 120 NO STANDARD PAGE HEADING.

TABLES: mara, lfa1, ekpo.

----


  • selection screen *

----


  • Define screen 101 as subscreen

SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t00.

SELECT-OPTIONS matnr FOR mara-matnr.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN END OF SCREEN 101.

  • Define screen 102 as subscreen

SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.

SELECT-OPTIONS: kunnr FOR lfa1-kunnr.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN END OF SCREEN 102.

  • Define tab screen

SELECTION-SCREEN BEGIN OF TABBED BLOCK t1 FOR 20 LINES.

SELECTION-SCREEN TAB (10) name1 USER-COMMAND PUSH1 DEFAULT SCREEN 101.

SELECTION-SCREEN TAB (20) name2 USER-COMMAND PUSH2 DEFAULT SCREEN 102.

SELECTION-SCREEN END OF BLOCK t1.

INITIALIZATION.

name1 = text-n01. "Material

name2 = text-n02. "Vendor

name3 = text-n03. "Plant

at selection-screen.

case sy-ucomm. "To set the screen on tab

when 'PUSH1'. "when cliched on any one of tab

tabb1-dynnr = 101.

tabb1-activetab = 'TABS1'.

when 'PUSH2'.

tabb1-dynnr = 102.

tabb1-activetab = 'TABS2'.

endcase.

Regards,

Sanjeev

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Welcome to SDN!

Please make sure to award points for helpful answers and mark your posts as solved when solved completely. Thanks.

Regards,

Rich Heilman