Skip to Content
author's profile photo Former Member
Former Member

How to add sub screen to a tabstrip control

Hi...

can any one please tell me how to add a sub screen to a tabstrip control?

i have a subscreen named sub1, and please tell me how to add this sub screen to a tab strip.

thank you,

Prasad Babu.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2005 at 10:35 AM

    Hi Prasad,

    Steps to create Tab strip in the screen:

    1) Create tabstrip control and give the no of tabs

    you want in the attributes.

    2) Create subscreen area SCA in the tab strip.

    3) Assign user commands for each tab and give Ref.Field

    as SCA.

    4) Then in the Flow logic:

    Declarations :

    CONTROLS: TAB TYPE TABSTRIP.

    DATA: BEGIN OF G_TAB,

    SUBSCREEN LIKE SY-DYNNR,

    PROG LIKE SY-REPID VALUE 'YMAIN',

    PRESSED_TAB LIKE SY-UCOMM VALUE C_MAMU-TAB6,

    END OF g_TAB.

    • FUNCTION CODES FOR TABSTRIP

    CONSTANTS: BEGIN OF C_MAMU,

    TAB1 LIKE SY-UCOMM VALUE 'FC1',

    TAB2 LIKE SY-UCOMM VALUE 'FC2',

    TAB3 LIKE SY-UCOMM VALUE 'FC3',

    END OF C_MAMU.

      PROCESS BEFORE OUTPUT.
    * PBO FLOW LOGIC FOR TABSTRIP 'TAB'
      MODULE ACTIVE_TAB_SET.
    
      CALL SUBSCREEN SCA
        INCLUDING PROG SUBSCREEN.
    
      MODULE STATUS_0001.
    *
    PROCESS AFTER INPUT.
      MODULE EXIT AT EXIT-COMMAND.
    * PAI FLOW LOGIC FOR TABSTRIP 'TAB'
      CALL SUBSCREEN SCA.
      MODULE ACTIVE_TAB_GET.
    
      MODULE USER_COMMAND_0001.
     

    In the program

    MODULE MAMU_ACTIVE_TAB_SET OUTPUT.
    
      G_TAB-ACTIVETAB = G_TAB-PRESSED_TAB.
      CASE G_TAB-PRESSED_TAB.
        WHEN C_MAMU-TAB6.
          G_TAB-SUBSCREEN = '0007'.
        WHEN C_MAMU-TAB7.
          G_TAB-SUBSCREEN = '1007'.
        WHEN C_MAMU-TAB8.
          G_TAB-SUBSCREEN = '1008'.
        WHEN OTHERS.
    *      DO NOTHING
      ENDCASE.
    
    ENDMODULE.
    
    
    MODULE MAMU_ACTIVE_TAB_GET INPUT.
    * CASE OK_CODE.
      CASE SY-UCOMM.
        WHEN C_MAMU-TAB1.
    
          G_TAB-PRESSED_TAB = C_MAMU-TAB1.
    
        WHEN C_MAMU-TAB2.
    
          G_TAB-PRESSED_TAB = C_MAMU-TAB2.
     
        WHEN OTHERS.
    *      DO NOTHING
      ENDCASE.
    
     ENDMODULE.
    
    

    In screen painter create your subscreens.

    Hope this will help you.

    Thanks & Regards,

    Siri.

    Message was edited by: Srilatha T

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2005 at 09:46 AM

    Hi Prasad,

    Once you have ctreated tabstrip, Then create subscreen.

    Maintain its attributes as subscreen.

    Then declare your tabstrip in your main program.

    Then write flow logic for your main screen .

    PROCESS BEFORE OUTPUT.

    CALL SUBSCREEN: SUB1 INCLUDING SY-REPID '1001'.

    MODULE STATUS_1000.

    PROCESS AFTER INPUT.

    CALL SUBSCREEN SUB1.

    MODULE USER_COMMAND_1000.

    Please call your screen number in above statement.

    Then write code for your main screen PAI event

    like this. to trigger events on tabstrip and make default active tab.

    CASE SY-UCOMM.

    WHEN 'MAT'.

    MYTAB-ACTIVETAB = 'MAT'.

    NUMBER = '1001'.

    MAT is tab name.

    Hope this will work.

    Dhananjay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2005 at 10:18 AM

    Hi

    You should design your TABSTRIP and then add the the subarea to it by screen painter.

    In your flow logic you manage which subscreen has to be loaded in the sub area.

    PROCESS PBO.

    MODULE INIT_TABSTRIP.

    CALL SUBSCREEN SUB1 USING SY-REPID SUB_SCREEN.

    PROCESS PAI.

    MODULE USER_COMMAND.

    MODULE INIT_TABSTRIP.

    IF SUB_SCREEN IS INITIAL.

    SUB_SCREEN = XXXX

    TABSTRIP-ACTIVETAB = 'TAB1'.

    ENDIF

    ENDMODULE.

    MODULE USER_COMMAND.

    CASE OK_CODE.

    WHEN 'TAB1'.

    SUB_SCREEN = XXXX

    TABSTRIP-ACTIVETAB = 'TAB1'.

    WHEN 'TAB2'.

    SUB_SCREEN = YYYY

    TABSTRIP-ACTIVETAB = 'TAB2'.

    WHEN 'TABN'.

    SUB_SCREEN = ZZZZ

    TABSTRIP-ACTIVETAB = 'TABN'.

    ENDCASE.

    ENDMODULE.

    Max

    Message was edited by: max bianchi

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.