Tabstrip on selection screen

Hi All,
I have created selection screen with 3 tab strips.
i have 2 radios button in each tab strip. My problem is, when i have selected first radio button from 2nd tab strip and execute, then it is executing first tab strip radio button first and when i click on back button then my second tab strip radio button getting executed.
So could you please do let me know, how to execute directly 2nd tab strip radio button directly wiht out executing first tab strip.
Regards,
Jo

Hello,
Assign a user command to each tab strip as follows.
SELECTION-SCREEN BEGIN OF BLOCK sel .
SELECTION-SCREEN SKIP.
*---------------------------* TABSTRIP *-------------------------------*
SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 15 LINES.
SELECTION-SCREEN TAB (40) title1 USER-COMMAND ucomm1 DEFAULT SCREEN 1001.
SELECTION-SCREEN TAB (40) title2 USER-COMMAND ucomm2 DEFAULT SCREEN 1002.
SELECTION-SCREEN TAB (40) title3 USER-COMMAND ucomm3 DEFAULT SCREEN 1003.
SELECTION-SCREEN END OF BLOCK tabb1.
SELECTION-SCREEN END OF BLOCK sel.
*-------------------------* SCREEN 1001 *------------------------------*
SELECTION-SCREEN: BEGIN OF SCREEN 1001 AS SUBSCREEN          .
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE title.
PARAMETERS: radio_button1  RADIOBUTTON GROUP rad DEFAULT 'X'.
"Insert all your other radio button in the first tabstrip here
SELECTION-SCREEN: END OF BLOCK b1                            .
SELECTION-SCREEN: END OF SCREEN 1001                         .
*-------------------------* SCREEN 1002 *------------------------------*
SELECTION-SCREEN: BEGIN OF SCREEN 1002 AS SUBSCREEN          .
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE titlex.
PARAMETERS: radio_button2 RADIOBUTTON GROUP rad1.
"Insert all your other radio button in the second tabstrip here
SELECTION-SCREEN: END OF BLOCK b2                            .
SELECTION-SCREEN: END OF SCREEN 1002                         .
*-------------------------* SCREEN 1003 *------------------------------*
SELECTION-SCREEN: BEGIN OF SCREEN 1003 AS SUBSCREEN          .
SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE titlexx.
PARAMETERS: radio_button3 RADIOBUTTON GROUP rad2.
"Insert all your other radio button in the third tabstrip here
SELECTION-SCREEN: END OF BLOCK b3                            .
SELECTION-SCREEN: END OF SCREEN 1003                         .
In this case the first tabstrip has the user command UCOMM1, the second tabstrip has the user command UCOMM2 and likewise for the third and last tabstrip.
Now in the START-OF-SELECTION event.
Start by doing a case for active tabs before doing a check which radio button is selected as follows.
CASE tabb1-activetab.
     WHEN 'UCOMM1'.  "First tabstrip
          CASE 'X'. "To check which radio button is checked
           "Here you do the processing upon the radio button selected.
          WHEN radio_button1. 
               CALL TRANSACTION 'SE38'.
          ENDCASE.
     WHEN 'UCOMM2'.  "Second tabstrip
          CASE 'X'. "To check which radio button is checked
          "Here you do the processing upon the radio button selected.
          WHEN radio_button2. 
               CALL TRANSACTION 'SE11'.
          ENDCASE.
     WHEN 'UCOMM3'.  "Third tabstrip
          CASE 'X'. "To check which radio button is checked
          "Here you do the processing upon the radio button selected.
          WHEN radio_button3.
               CALL TRANSACTION 'SE09'.
          ENDCASE.
ENDCASE.
Hope it helps.
Thanks and Kind Regards,
Yovish.
Message was edited by: Yovish Bissessur

Similar Messages

  • TabStrip in Selection Screen

    Hi All,
    I have used tabstrip in selection screen of alv report. In tabstrip I have 2 tabs, one is "Initial Run" & second is "Incremental Run".
    I want to check active tab after start of selection and based on active tab my report gives output. Every thing runs perfect in foreground.
    But when I run same thing in background, at that time system uses my default tab (Initial Run) even though I have selected Incremental Run Tab.
    Please help me if I miss any thing in code.
    Regards,
    Meet Gohel

    Hi Meet,
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK tabs FOR 10 LINES,
                      TAB (20) button1 USER-COMMAND push1
                                       DEFAULT SCREEN 200,
                      TAB (20) button2 USER-COMMAND push2
                                       DEFAULT SCREEN 300,
                      END OF BLOCK tabs.
    In the above code tabs is the name of the tabstrip. In your program a global structure with the same name will be created with a structure having three components: prog of type c with length 40, dynnr of type c and length 4, and activetab of type c with length 132. So from trhe value of the component dynnr and activetab of tabs you can know which tab is activated.
    For more details press F1 on the keyword TABBED.
    Regards
    Dillip Sahoo

  • How to save varaint in a report program with tabstrip in selection-screen

    Hi Gurus,
    We have a custom report program and selection screen of this program has a tabstrip of 9 tabs. This program will run in background job and we are facing problem to save variant for this report program. 
    We saved one variant with 'TAB2' populated. But when we execute the report and select that variant and we are not navigated to 'TAB2' automatically. So, code for TAB2 is not triggerd and we are not getting desired output.
    When we set this program with variant in Job, program is not navigated to 'TAB2' as per variant setup.
    Is there any way to save variant for this kind of report ?
    Please help with your suggestions
    Thanks & Regards
    Chandan

    Thanks for your help.
    I found during debugging that it is holding the sy-ucomm of the first tab as default value.  So, I declared a new field in selection screen with No-Display option. When user will select a tab, this new field will hold the value of that sy-ucomm. As this field is in selection screen, it is getting stored in variant also.
    In start-of-selection of program I am checking this field value and accordingly set the TABSTRIP.
    Thanks again for your help.....
    Regards,
    Chandan

  • Include a dialog screen in tabstrip of selection-screen

    Hi All,
    Could anyone please tell me how to include a dialog screen into selection-screen? We have a normal selection screen for a report but now we need to add some more function and this requires to key in material number in first column and quantity in second column in a tabstrip subscreen(eg. screen 2000) and put current select-options(screen 1000) in another tabstrip to make user easily switch between new filters and previous filters. I've no idea if it's possible to have a dialog screen included in a tabstrip in the selection-screen. So please give me some suggestion. Thanks.
    Best Regards,
    Jeff

    Hi Jeff,
    In the selection screen you need to call a custom tab strip that would have two sub-screens 1000 and 2000. It is completely designing of tab strip and its code manipulation.
    Did you search for TAB STRIP IN SELECTION-SCREEN ?
    This will  help you in from start-up designing of tab-strip. It's not possible here in forum to explain all the steps in details.
    For your help you can refer the link
    [Sub-screen in Tab strip|Tabstrip and Subscreen;
    This link gives you a complete idea on Tab strip
    [Creating a Tab Strip Control|http://help.sap.com/saphelp_nw04/helpdata/en/04/10f2469e0811d1b4700000e8a52bed/frameset.htm]
    Still you can search and find more as per your requirement.

  • Different Report Output based on different tabstrips on selection screen

    Hi all,
    I have a selection screen which has 3 tabstrips.
    The screen nos are 101,102  and 103.
    Now in each tab there are different input parameters and based on each tab there will be 3 different outputs.
    i.e when I click on tab1 and give the required inputs i will get 1 report output.
    similarly I will get different ouput in the other 2 tabs.
    Can any one suggest some solution how to achieve this.
    Thanks and Regards
    Nazmul Azad

    Look for documentation at [SELECTION-SCREEN - TABBED BLOCK |http://help.sap.com/abapdocu/en/ABAPSELECTION-SCREEN_TABBED.htm]
    Adapgt the sample provided, and in the START-OF-SELECTON event add a CASE/WHEN to execute whichever report you want based on mytab-dynnr value.
    Regards,
    Raymond

  • Tabstrip on selection screen and validations

    Hi,
    I need to validate the selection screen data which is entered in tab strips.
    I need help in writing the validation for the data as below:
    If the MATERIAL (on tab1) is blank then the fields on tab2 are mandatory.
    AND if the MATERIAL (on tab1) is blank then the fields on tab2 are NOT mandatory.
    The code is as follows
    REPORT  ztest123.
    TABLES kna1.
    TABLES : sscrfields, vbap.
    DATA  gv_activetab(6) TYPE c .
    SELECTION-SCREEN BEGIN OF SCREEN 001 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS p_matnr TYPE mara-matnr.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF SCREEN 001.
    SELECTION-SCREEN BEGIN OF SCREEN 002 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECT-OPTIONS:  so_kunnr  FOR kna1-kunnr NO INTERVALS NO-EXTENSION.
    SELECT-OPTIONS:  so_datum  FOR vbap-erdat NO-EXTENSION." DEFAULT sy-datum.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF SCREEN 002.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 5 LINES.
    SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1 DEFAULT SCREEN 001.
    SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2.
    SELECTION-SCREEN END OF BLOCK tabb1.
    AT SELECTION-SCREEN .
      CASE sscrfields-ucomm.
        WHEN 'UCOMM1'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 001.
          tabb1-activetab = 'TABS1'.
          gv_activetab = 'TABS1' .
        WHEN 'UCOMM2'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 002.
          tabb1-activetab = 'TABS2'.
          gv_activetab = 'TABS2'.
      ENDCASE.
    START-OF-SELECTION.
      CASE gv_activetab.
        WHEN 'TABS1'.
          WRITE: 'Material ' .
        WHEN 'TABS2'.
          WRITE: 'Plant '.
      ENDCASE.

    you have to do 2 things
    1) set fields mandatory
    IF p_matnr IS INITIAL.
        LOOP AT SCREEN.
          IF screen-name EQ 'SO_KUNNR-LOW'.
            screen-required = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    2) ensure the program is not run without a value, because the point 1 will be done only if user goes through tabstrip 2
    AT SELECTION-SCREEN .
      IF sscrfields-ucomm EQ 'ONLI'.
        IF p_matnr IS INITIAL.
          IF so_kunnr-low IS INITIAL.
            sscrfields-ucomm = 'UCOMM2'.
          ENDIF.
        ENDIF.
      ENDIF.
      CASE sscrfields-ucomm.
        WHEN 'UCOMM1'.

  • INITIALIZATION event of Tabstrips in Selection screens

    Hello all.
    I created a selection screen with 6 tabs. Each tab is a "standalone" transaction with it's own logic (i.e. tab1 will execute form 1, tab2 will execute form 2 and so on).
    In the end each tab will display an ALV report.
    The problem: after the display of the ALV or if no data was found (an error msg. is displayed), the screen goes through the INITIALIZATION event and the tabs are reset again into the first (default) tab. So if the user in in tab4 and no data was displayed - he get's the error msg. and the selection screen displays tab1 again. All the selection data the user has entered into tab4 is still kept in tab4.
    Is there a way to bypass the INITIALIZATION event or control the activetab?
    Thanks and regards...

    May be to each subscreen you have given the First screen as next screen, that is why this is happening.....
    change the screen numebr of next screen of subscreen to itself.. then u should not get this error
    Regards.....

  • Reg: Selection screen tabstrip

    Hi all,
      I need to create a screen with tab strip and inside the tab it should hold a subscreen containing text element and checkbox and a  button.
    This is to be done using the selection-screen begin of screen method and not as a module pool.
    SELECTION-SCREEN BEGIN OF SCREEN 9000 TITLE title.
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                        TAB (20) button1 USER-COMMAND push1,
                      END OF BLOCK mytab.
    SELECTION-SCREEN END OF SCREEN 9000.
    I tried by above way but it's going to dump.
    Kindly help me on this by providing a sample code as to how to go about it.
    Thanks in advance,
    Krithika

    Hi
    Sample programs:
    DEMO_DYNPRO_TABSTRIP_LOCAL Tabstrip Control - Scrolling at SAPgui
    DEMO_DYNPRO_TABSTRIP_SERVER Tabstrip Control - Scrolling at Application Server
    DEMO_SEL_SCREEN_IN_TABSTRIP Selection Screen as Subscreen in Tabstrip
    DEMO_SEL_SCREEN_WITH_TABSTRIP Selection Screen with Tabstrips
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK selec FOR 17 LINES,
                        TAB (23) button1 USER-COMMAND push1,
                        TAB (23) button2 USER-COMMAND push2,
                        TAB (23) button3 USER-COMMAND push3
                        DEFAULT SCREEN 1001,
                        END OF BLOCK selec.
      SELECTION-SCREEN BEGIN OF SCREEN 1001 AS SUBSCREEN.
      SELECTION-SCREEN END OF SCREEN 1001.
      SELECTION-SCREEN BEGIN OF SCREEN 1002 AS SUBSCREEN.
      SELECTION-SCREEN END OF SCREEN 1002.
      SELECTION-SCREEN BEGIN OF SCREEN 1003 AS SUBSCREEN.
      SELECTION-SCREEN END OF SCREEN 1003.
    Initialization
    INITIALIZATION.
      button1 = text-det.
      button2 = text-sup.
      button3 = text-mef.
      selec-prog = sy-repid.
      selec-dynnr = 1001.
      selec-activetab = 'BUTTON1'.
    Managing the keys
    AT SELECTION-SCREEN.
      CASE sy-ucomm.
        WHEN 'PUSH1'.
          selec-dynnr = 1001.
          selec-activetab = 'BUTTON1'.
        WHEN 'PUSH2'.
          selec-dynnr = 1002.
          selec-activetab = 'BUTTON2'.
        WHEN 'PUSH3'.
          selec-dynnr = 1003.
          selec-activetab = 'BUTTON3'.
      ENDCASE.
    2)  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.
    <b>Reward if usefull</b>

  • Steps to create tabstrip for subscreen in selection screen

    hi,
    can let me know the steps taken to create subscreen in selection screen and put in tabstrip?
    i need to have 3 screens. 1000 being the tabstrip, 2000 being first subscreen and 3000 being the second subscreen.
    i have the abap code but i do not know the steps to create especially 1000 screen.
    for 2000 and 3000, once i activated the program, these 2 screens added but i do not know where can i create the 1000 screen.
    also, should i use wizard to create tabstrip?
    please advise. thanks
    SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.        SELECTION-SCREEN BEGIN OF BLOCK x WITH FRAME TITLE text-001.
    SELECT-OPTIONS: para1 FOR  field1 ,     
                                  para2 FOR field2.            
    SELECTION-SCREEN END OF BLOCK x.
    SELECTION-SCREEN END OF SCREEN 2000.
    SELECTION-SCREEN BEGIN OF SCREEN 3000 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK y WITH FRAME TITLE text-002.
    SELECT-OPTIONS: para3 FOR  field3 ,     
                                  para4 FOR field4.      
    SELECTION-SCREEN END OF BLOCK y.
    SELECTION-SCREEN:SKIP.
    SELECTION-SCREEN END OF SCREEN 3000.

    e_l,
      See the total doc.. with example.
    Assigning a Subscreen Area to a Tab Title
    You must assign a subscreen area to each tab title. There are two ways of doing this:
    Paging in the SAPgui
    You need to assign a separate subscreen area to each tab title, and define the function codes of the tab titles with type P (local GUI function). In the screen flow logic, you call all the subscreens in the PBO event. This means that all of the tab pages reside locally on the SAPgui.
    When the user chooses a tab title, paging takes place within the SAPgui. In this respect, the tabstrip control behaves like a single screen. In particular, the PAI event is not triggered when the user chooses a tab title, and no data is transported. While this improves the performance of your tabstrip control, it also has the negative effect that when the user does trigger the PAI event, all of the input checks for all of the subscreens are performed. This means that when the user is working on one tab page, the input checks may jump to an unfilled mandatory field on another page.
    Local paging at the SAPgui is therefore most appropriate for screens that display data rather than for input screens.
    Paging on the Application Server
    One subscreen area is shared by all tab titles and called in the PBO event. You define the function codes of the individual tab titles without a special function type. When the user chooses a tab page, the PAI event is triggered, and you must include a module in your flow logic that activates the appropriate tab page and assigns the correct subscreen to the subscreen area.
    Since the PAI event is triggered each time the user chooses a tab title, this method is less economical for the application server, but the input checks that are performed only affect the current tab page.
    Procedure in Either Case
    You create the subscreen areas within the tabstrip area. You assign the subscreen areas to one or more tab titles in the Screen Painter by selecting one or more titles. You can also assign a subscreen area to a tab title in the tab title attributes by entering the name of the subscreen area in the Reference field attribute.
    The procedure for the alphanumeric Screen Painter is described under Creating Tabstrip Controls.
    If you are paging at the SAPgui, create a subscreen area for each tab title. If you are paging at the application server, select all tab titles and create a single subscreen area. The subscreen areas may not cover the top line of the tab area. However, within a tab area, more than one subscreen area can overlap.
    Programming the Flow Logic
    In the flow logic, all you have to do by hand is include the correct subscreens. The screen flow and data transport to the ABAP program is the same as for normal subscreens. There are two ways of programming the screen flow logic, depending on how you have decided to page through the tabstrip control.
    Paging in the SAPgui
    When you page in the SAPgui, you must include a subscreen for each subscreen area:
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN: <area1> INCLUDING [<prog 1>] <dynp 1>,
                      <area2> INCLUDING [<prog 2>] <dynp 2>,
                      <area3> INCLUDING [<prog 3>] <dynp 3>,
    PROCESS AFTER INPUT.
      CALL SUBSCREEN: <area1>,
                      <area2>,
                      <area3>,
    Paging on the Application Server
    When you page on the application server, you only have to include a subscreen for the one subscreen area:
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN <area> INCLUDING [<prog>] <dynp>.
    PROCESS AFTER INPUT.
      CALL SUBSCREEN <area>.
    Handling in the ABAP Program
    Before you can use a tabstrip control in your ABAP program, you must create a control for each control in the declaration part of your program using the following statement:
    CONTROLS <ctrl> TYPE TABSTRIP.
    where <ctrl> is the name of the tabstrip area on a screen in the ABAP program. The control allows the ABAP program to work with the tabstrip control. The statement declares a structure with the name <ctrl> . The only component of this structure that you need in your program is called ACTIVETAB.
    Use in the PBO event
    Before the screen is displayed, you use the control to set the tab page that is currently active. To do this, assign the function code of the corresponding tab title to the component ACTIVETAB:
    <ctrl>-ACTIVETAB = <fcode>.
    When you page at the SAPgui, you only need to do this once before the screen is displayed. This initializes the tabstrip control. The default active tab page is the first page. After this, the page activated when the user chooses a tab title is set within SAPgui.
    When you page on the application server, you must assign the active page both before the screen is displayed for the first time, and each time the user pages. At the same time, you must set the required subscreen screen.
    You can suppress a tab page dynamically by setting the ACTIVE field of table SCREEN to 0 for the corresponding tab title.
    Use in the PAI event
    In the PAI event, ACTIVETAB contains the function code of the last active tab title on the screen.
    When you page in the SAPgui, this allows you to find out the page that the user can currently see. When you page at the application server, the active tab page is controlled by the ABAP program anyway.
    The OK_CODE field behaves differently according to the paging method:
    Paging in the SAPgui
    When you page in the SAPgui, the PAI event is not triggered when the user chooses a tab title, and the OK_CODE field is not filled. The OK_CODE field is only filled by user actions in the GUI status or when the user chooses a pushbutton either outside the tabstrip control or on one of the subscreens.
    Paging on the application server
    If you are paging at the application server, the PAI event is triggered when the user chooses a tab title, and the OK_CODE field is filled with the corresponding function code.
    To page through the tabstrip control, you must assign the function code to the ACTIVETAB component of the control:
    <ctrl>-ACTIVETAB = <ok_code>.
    This statement overwrites the function code of the last active tab page with that of the new tab title. At the same time, you must ensure that the correct subscreen is inserted in the subscreen area.
    Otherwise, tabstrip controls are handled like normal subscrens in ABAP programs, that is, the ABAP program of a subscreen screen must contain the dialog modules called from the flow logic of the subscreen.
    Examples
    Tabstrip control, paging at SAPgui
    REPORT DEMO_DYNPRO_TABSTRIP_LOCAL.
    CONTROLS MYTABSTRIP TYPE TABSTRIP.
    DATA: OK_CODE TYPE SY-UCOMM,
          SAVE_OK TYPE SY-UCOMM.
    MYTABSTRIP-ACTIVETAB = 'PUSH2'.
    CALL SCREEN 100.
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE USER_COMMAND INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'OK'.
        MESSAGE I888(SABAPDOCU) WITH 'MYTABSTRIP-ACTIVETAB ='
                                      MYTABSTRIP-ACTIVETAB.
      ENDIF.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is itself. It has the following layout:
    The screen contains a tabstrip area called MYTABSTRIP with three tab titles PUSH1, PUSH2 and PUSH3. The function codes have the same name, and all have the function type P. One of the subscreen areas SUB1 to SUB3 is assigned to each tab title. The pushbutton has the name BUTTON and the function code ‘OK’.
    In the same ABAP program, there are three subscreen screens 110 to 130. Each of these fits the subscreen area exactly. The layout is:
    The screen flow logic for screen 100 is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
      CALL SUBSCREEN: SUB1 INCLUDING SY-REPID '0110',
                      SUB2 INCLUDING SY-REPID '0120',
                      SUB3 INCLUDING SY-REPID '0130'.
    PROCESS AFTER INPUT.
      MODULE CANCEL AT EXIT-COMMAND.
      CALL SUBSCREEN: SUB1,
                      SUB2,
                      SUB3.
      MODULE USER_COMMAND.
    The screen flow logic of subscreens 110 to 130 does not contain any module calls.
    When you run the program, a screen appears on which the second tab page is active, since the program sets the ACTIVETAB component of the structure MYTABSTRIP to PUSH2 before the screen is displayed. The user can page through the tabstrip control without the PAI event being triggered. One of the three subscreens is included on each tab page.
    When the user chooses Continue, the PAI event is triggered, and an information message displays the function code of the tab title of the page that is currently active.
    Tabstrip control with paging on the application server.
    REPORT DEMO_DYNPRO_TABSTRIP_LOCAL.
    CONTROLS MYTABSTRIP TYPE TABSTRIP.
    DATA: OK_CODE TYPE SY-UCOMM,
          SAVE_OK TYPE SY-UCOMM.
    DATA  NUMBER TYPE SY-DYNNR.
    MYTABSTRIP-ACTIVETAB = 'PUSH2'.
    NUMBER = '0120'.
    CALL SCREEN 100.
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE USER_COMMAND INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'OK'.
        MESSAGE I888(SABAPDOCU) WITH 'MYTABSTRIP-ACTIVETAB ='
                                      MYTABSTRIP-ACTIVETAB.
      ELSE.
        MYTABSTRIP-ACTIVETAB = SAVE_OK.
        CASE SAVE_OK.
          WHEN 'PUSH1'.
            NUMBER = '0110'.
          WHEN 'PUSH2'.
            NUMBER = '0120'.
          WHEN 'PUSH3'.
            NUMBER = '0130'.
        ENDCASE.
      ENDIF.
    ENDMODULE.
    The statically-defined next screen for screen 100 is itself, and its layout is the same as in the above example. However, the function codes of the three tab titles have the function type <blank> and they all share a single subscreen area SUB.
    The same subscreen screens 110 to 130 are defined as in the last example.
    The screen flow logic for screen 100 is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
      CALL SUBSCREEN SUB INCLUDING SY-REPID NUMBER.
    PROCESS AFTER INPUT.
      MODULE CANCEL AT EXIT-COMMAND.
      CALL SUBSCREEN SUB.
      MODULE USER_COMMAND.
    In this example, the program includes a subscreen screen in the subscreen area SUB dynamically during the PBO event.
    The screen flow logic of subscreens 110 to 130 does not contain any module calls.
    This example has the same function as the previous example, but the paging within the tabstrip control is implemented on the application server. Each time the user chooses a tab title, the function code from the OK_CODE field is assigned to the ACTIVETAB component of structure MYTABSTRIP. At the same time, the variable NUMBER is filled with the screen number of the subscreen that has to be displayed in the subscreen area SUB of the tabstrip control
    Pls. reward if useful

  • Calling a selection screen in a subscreen of a tabstrip

    hi,
    I have created a tabstrip where i have included a subscreen.
    I want to create and call a selection screen within that subscreen.
    Can anybody tell me the steps required?
    thanks in advance,
    Abhishek

    hi
    good
    try this
    In the same way that you can define a screen as a subscreen in the Screen Painter, it is now possible to define selection screens as subscreens in an ABAP program:
    SELECTION-SCREEN BEGIN OF SCREEN scrn AS SUBSCREEN
                                         [NO INTERVALS]
                                         [NESTING LEVEL n].
    SELECTION-SCREEN END OF SCREEN scrn.
    go through this link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/content.htm
    http://sap.niraj.tripod.com/id40.html
    thanks
    mrutyun^

  • Customizable ABAP Selection Screen with Tabstrips

    Hello everybody,
    we have a ABAP and a MASTER-Selection Screen. In this Selection Screen it should be able for Customers to enhance the MASTER-Selection via a Subscreens (realized in Tabstrips).
    The amount of Tabs has to be dynamic. Ist there a ABAP Sample?
    Does anybody has some ideas to keep this dynamic?
    Thanks
    Regards
    Mario

    Hi,
    examples are in the transaction BIBS.
    regards
    Fred

  • Issue with tabbed block in selection screen

    Hi All,
    I have created a report program with the following code.
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    PARAMETERS: p1 TYPE c LENGTH 10.
    SELECTION-SCREEN END OF SCREEN 100.
    SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
    PARAMETERS: q1 TYPE c LENGTH 10.
    SELECTION-SCREEN END OF SCREEN 200.
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                      TAB (20) button1 USER-COMMAND push1,
                      TAB (20) button2 USER-COMMAND push2,
                      END OF BLOCK mytab.
    INITIALIZATION.
      button1 = 'Selection Screen 1'.
      button2 = 'Selection Screen 2'.
      mytab-prog = sy-repid.
      mytab-dynnr = 0100.
      mytab-activetab = 'PUSH1'.
    AT SELECTION-SCREEN.
      CASE sy-dynnr.
        WHEN 1000.
          CASE sy-ucomm.
            WHEN 'PUSH1'.
              mytab-dynnr = 100.
            WHEN 'PUSH2'.
              mytab-dynnr = 200.
          ENDCASE.
      ENDCASE.
    Execute the program and click on the second tab-page. Now, click on the 'Execute' button or press F8 (there is no specific functionality coded here).
    The issue now is that the first tab-page is displayed, instead of the second tab remaining displayed. I require the navigation to remain within the second tab-page after the EXECUTE button is clicked.
    Could someone help me out with this issue?
    Regards,
    Dinup
    Edited by: Dinup Sudhakaran on Feb 18, 2008 1:40 PM

    Hi,
    Go through below document with example code.
    It will help you.
    Tabstrip Controls on Selection Screens
    As with screens, you can now use tabstrip controls on selection screens. To do this, you must define a tabstrip area and the associated tab pages, and assign a subscreen to the tab pages. You do not have to (indeed, cannot) declare the tabstrip control or program the screen flow logic in your ABAP program, since both are automatically generated.
    To define a tabstrip area with tab pages, use the following statements in your selection screen definition:
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK <tab_area> FOR <n> LINES,
                      TAB (<len>) <tab1> USER-COMMAND <ucom1>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      TAB (<len>) <tab2> USER-COMMAND <ucom2>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      END OF BLOCK <tab_area>.
    This defines a tabstrip control <tab_area> with size <n>. The tab pages <tab1>, <tab2>… are assigned to the tab area. <len> defines the width of the tab title. You must assign a function code <ucom> area to each tab title. You can find out the function code from the field SY-UCOMM in the AT SELECTION-SCREEN event.
    For each tab title, the system automatically creates a character field in the ABAP program with the same name. Before the selection screen is displayed, you can assign a text to the field. This then appears as the title of the corresponding tab page on the selection screen.
    You must assign a subscreen to each tab title. This will be displayed in the tab area when the user chooses that title. You can assign one of the following as a subscreen:
    A subscreen screen defined using the Screen Painter.
    A selection screen subscreen, defined in an ABAP program.
    You can make the assignment either statically in the program or dynamically at runtime. If, at runtime, one of the tab titles has no subscreen assigned, a runtime error occurs.
    Static assignment
    Use the DEFAULT addition when you define the tab title. You can specify an ABAP program and one of its subscreens. If you do not specify a program, the system looks for the subscreen in the current program. When the user chooses the tab title, it is activated, and the subscreen is assigned to the tabstrip area. The static assignment is valid for the entire duration of the program, but can be overwritten dynamically before the selection screen is displayed.
    Dynamic assignment
    For each tab area, the system automatically creates a structure in the ABAP program with the same name. This structure has three components – PROG, DYNNR, and ACTIVETAB. When you assign the subscreens statically, the structure contains the name of the ABAP program containing the subscreen, the number of the subscreen, and the name of the tab title currently active on the selection screen (and to which these values are assigned). The default active tab page is the first page. You can assign values to the fields of the structure before the selection screen is displayed, and so set a subscreen dynamically.
    If you assign a normal subscreen screen to a tab title, the dialog modules containing its flow logic must be defined in the current ABAP program. If the subscreen is a selection screen, user actions will trigger the AT SELECTION-SCREEN event and its variants (see Selection Screen Processing). This includes when the user chooses a tab title. If one selection screen is included on another, AT SELECTION-SCREEN will be triggered at least twice – firstly for the "included" selection screen, then for the selection screen on which it appears.
    REPORT demo_sel_screen_with_tabstrip.
    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.
    This program defines two selection screens – 100 and 200, as subscreens, and places a tabstrip control area with three tab pages on the standard selection screen. A subscreen screen 300 (from the same program) is assigned statically to the third tab page.
    The layout of screen 300 is:
    The input/output fields P1 to Q3 are defined by using the parameters from the ABAP program The pushbutton has the function code TOGGLE.
    The screen flow logic for screen 300 is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE init_0100.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
    Both dialog modules are defined in the ABAP program.
    When you run the program, the standard selection screen appears. In the INITIALIZATION event, the texts are defined on the tab titles, the subscreen selection screen 100 is assigned to the tab area, and the first tab title is activated.
    User actions on the selection screen are processed in the AT SELECTION-SCREEN event block. In particular, it is here that the subscreens are assigned and tab titles activated when the user chooses one of the first two tab titles. This is not necessary for the third tab title, since the dynamic assignment (screen 300) is always placed in the structure MYTAB when the user chooses it.
    Before the subscreen screen is displayed, the PBO module INIT_100 is executed. User actions on the subscreen screen trigger the PAI module. This includes when the user chooses a tab title. After that, the AT SELECTION-SCREEN event is triggered.
    Messages in the status line show where an action has been processed.

  • Determine the active tab in a selection screen

    Hello,
    is it possible to determine which tab is currently activated in a selection screen with several tabs?
    I will include different code in different tabs. When pressing the "execute" button the  program should return the active tab (as a value).
    Thanks
    Florian Schwaiger

    Hi florain,
    Before you can use a tabstrip control in your ABAP program, you must create a control for each control in the declaration part of your program using the following statement:
    CONTROLS <ctrl> TYPE TABSTRIP.
    where <ctrl> is the name of the tabstrip area on a screen in the ABAP program. The control allows the ABAP program to work with the tabstrip control. The statement declares a structure with the name <ctrl> . The only component of this structure that you need in your program is called ACTIVETAB.
    Use in the PBO event
    Before the screen is displayed, you use the control to set the tab page that is currently active. To do this, assign the function code of the corresponding tab title to the component ACTIVETAB:
    <ctrl>-ACTIVETAB = <fcode>.
    When you page at the SAPgui, you only need to do this once before the screen is displayed. This initializes the tabstrip control. The default active tab page is the first page. After this, the page activated when the user chooses a tab title is set within SAPgui.
    When you page on the application server, you must assign the active page both before the screen is displayed for the first time, and each time the user pages. At the same time, you must set the required subscreen screen.
    You can suppress a tab page dynamically by setting the ACTIVE field of table SCREEN to 0 for the corresponding tab title.
    Use in the PAI event
    In the PAI event, ACTIVETAB contains the function code of the last active tab title on the screen.
    When you page in the SAPgui, this allows you to find out the page that the user can currently see. When you page at the application server, the active tab page is controlled by the ABAP program anyway.
    The OK_CODE field behaves differently according to the paging method:
    Paging in the SAPgui
    When you page in the SAPgui, the PAI event is not triggered when the user chooses a tab title, and the OK_CODE field is not filled. The OK_CODE field is only filled by user actions in the GUI status or when the user chooses a pushbutton either outside the tabstrip control or on one of the subscreens.
    Paging on the application server
    If you are paging at the application server, the PAI event is triggered when the user chooses a tab title, and the OK_CODE field is filled with the corresponding function code.
    To page through the tabstrip control, you must assign the function code to the ACTIVETAB component of the control:
    <ctrl>-ACTIVETAB = <ok_code>.
    This statement overwrites the function code of the last active tab page with that of the new tab title. At the same time, you must ensure that the correct subscreen is inserted in the subscreen area.
    Otherwise, tabstrip controls are handled like normal subscrens in ABAP programs, that is, the ABAP program of a subscreen screen must contain the dialog modules called from the flow logic of the subscreen.
    Examples
    Tabstrip control, paging at SAPgui
    REPORT DEMO_DYNPRO_TABSTRIP_LOCAL.
    CONTROLS MYTABSTRIP TYPE TABSTRIP.
    DATA: OK_CODE TYPE SY-UCOMM,
          SAVE_OK TYPE SY-UCOMM.
    MYTABSTRIP-ACTIVETAB = 'PUSH2'.
    CALL SCREEN 100.
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE USER_COMMAND INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'OK'.
        MESSAGE I888(SABAPDOCU) WITH 'MYTABSTRIP-ACTIVETAB ='
                                      MYTABSTRIP-ACTIVETAB.
      ENDIF.
    ENDMODULE.
    thanks
    nagendra

  • Table control in report selection screen

    I have a selection screen with some fields. Now, below these fields, I need a table control in which i will have input parameters with 3 fields so that i can enter data in combinations and use the same while executing the report like an internal table.
    1. I should be able to save it as a Variants.
    2. I should be able to schedule a background job.
    I found similar notes but they dont help me save variants and with job schedules.
    Request your help in this regard.
    Regards
    Kasi

    Hi
    In the selection-screen u can generated a tabstrip:
    SELECTION-SCREEN BEGIN OF TABBED BLOCK MAX FOR 22 LINES.
    SELECTION-SCREEN TAB (25) TABS1 USER-COMMAND UCOMM1
             DEFAULT SCREEN 100.
    SELECTION-SCREEN END OF BLOCK MAX.
    So the system'll generate a tabstrip in the selection-screen, here it'll load only the screen 100.
    By screen painter u have to create a subscreen 100 where u insert your table control.
    Max

  • Active tab in Tabstrip on Report screen

    Hi.
    I developed a Report which has a tabstrip on its selection screen. After user press F8 and execute the report and it writes the result. When it come back to selection screen, it always come back to first tab. I want to back to last selected tab.
    I want to define the active tab. How to do that ?
    thanks.
    Glauco

    Solved by myself.
    AT SELECTION-SCREEN
          IF sy-ucomm(5) = 'UCOMM'.
            g_active_tab   = sy-ucomm. "tabs-activetab.
            g_active_dynnr = 9000.
            g_active_dynnr+3(1) = sy-ucomm+5(1)."tabs-dynnr.
            EXPORT ztab = g_active_tab   TO MEMORY ID 'ztab'.
            EXPORT zdyn = g_active_dynnr TO MEMORY ID 'zdyn'.
          ENDIF.
    AT SELECTION-SCREEN OUTPUT.
      IMPORT ztab = g_active_tab   FROM MEMORY ID 'ztab'.
      IMPORT zdyn = g_active_dynnr FROM MEMORY ID 'zdyn'.
      IF g_active_tab IS NOT INITIAL.
        tabs-activetab = g_active_tab.
        tabs-dynnr     = g_active_dynnr.
      ENDIF.

Maybe you are looking for

  • Can receive but not send mail

    Because of buyout, had to switch over from Adelphia to Comcast this weekend. With the help of Comcast, reset Mac mail on both G4 and G3 running OS 10.4.9. Got everything finally working Sunday, but today, G4 will not send. Error: "Message could not b

  • Idoc extension for eewb custom fields for BUS20001

    Hello. I have an almost exact question as , but I still need to ask what I'm supposed to do. We've done enhancements in EEW and I can see some append structures in CRMXIF_BUSTRANS (for example). The problem is that when I generate outbound idoc the s

  • Scrolling through Camera Roll is Jumpy

    The title says it all really. When scrolling through the photos in Camera Roll, it is not a smooth scroll. It jumps and stutters. However, when I am in any other folder of photos, the scrolling is as smooth as glass. This only happens in the Camera R

  • My CD won't eject with all the steps in the owner's manual. Any suggestions?

    I have a Mac mini, early 2009.  I put in a CD and the icon doesn't show on the desktop.  I used all suggestions in the owner's manual to eject the CD, but nothing works. Any suggestions on how to get my CD out?

  • Why can't I drag clips to be edited in the free trial of final cut?

    I downloaded the trial of final cut but can't seem to drag clips to edit them, any ideas? thanks