Tab in selection screen

Dear All,
I have to developed a new report in which I have to diplay two different report.For that two different report there are two different selection screen.I have developed two tabs in selection screen for two different report.
There are some mandatory fields in each screen,Now problem is that I can't go second tab unless I fill value in mandatory field.
But my requirment is when I want to go for second report then I will go for second tab without filling any value in tab 1 selection screen
Please give a sollution.
Regards,
Amar

Hi Amar,
<li>You can achieve the same using Dialog program . Instead of selection-screen, use dialog programming, use MODULE mod_name AT EXIT-COMMAND to navigate one tab to another tab. Once you give input on any tab and want to display data use LEAVE TO LIST PROCESSING AND RETURN TO SCREEN 0.
<li>Check the link: http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbaa9535c111d1829f0000e829fbfe/content.htm
<li>Normally AT EXIT-COMMAND is used to exit without giving mandatory fields. We can use for this situation.
Thanks
Venkat.O

Similar Messages

  • Tab Strip Selection Screen in ALV Report

    Hi All,
    I want to create a ALV report with TABStrip selection screen. How to proceede.
    Is there any necessary to create dailog program for the screens.
    Please advise.
    Thank You,
    ANu.

    Hi
    You can create it using module pool program in an easy way. Have the tab strip in main screen and use the sub-screens for display. By this way you can do it. If you wish, you could refer the following link, where they have given step by step procedure.
    <<Link-farm removed>>
    Hope this helps you.
    Regards
    Vinodh
    Edited by: kishan P on Nov 1, 2010 3:00 PM

  • Hide Tab in Selection Screen After Pressing Button

    Hiii All..
    My requirement is I have to disable the tab in the selection screen when the user presses the button 'Disable Tabstrip' which is present in Application toolbar..
    And it should come back if the user presses another button 'Enable Tabstrip' and that time the above screen should hide.
    I am showing u the screen..
    Link : [https://www.filesanywhere.com/FS/M.aspx?v=8972698c58616eb771af]
    If anyone knows then please help.
    Regards,
    Jhings.

    Thanks For the reply Anju...
    But the problem is.. this selection screen is not the default screen.. this is user defined screen.. and SY-UCOMM is not giving any value on the "AT SELECTION SCREEN OUTPUT" Event..
    I am giving u the code.. How I defined this..
    * This is screen where we are inclucing tab screen
    SELECTION-SCREEN : BEGIN OF SCREEN 100.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-005.
    SELECTION-SCREEN : BEGIN OF LINE.
    SELECTION-SCREEN : COMMENT 1(15) CUS_TXT.
    SELECT-OPTIONS : CUST_ID FOR VBAK-KUNNR.
    SELECTION-SCREEN : PUSHBUTTON 79(20) BUT1 USER-COMMAND CLICK1 VISIBLE LENGTH 20.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE.
    SELECTION-SCREEN : COMMENT 1(15) MAT_TXT.
    SELECT-OPTIONS :  MATNR FOR VBAP-MATNR.
    SELECTION-SCREEN : PUSHBUTTON 79(20) BUT2 USER-COMMAND CLICK2 VISIBLE LENGTH 20.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE.
    SELECTION-SCREEN : COMMENT 1(15) CRE_TXT.
    SELECT-OPTIONS : CRE_BY FOR VBAK-ERNAM.
    SELECTION-SCREEN : PUSHBUTTON 79(20) BUT3 USER-COMMAND CLICK3 VISIBLE LENGTH 20.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE.
    PARAMETERS : A AS CHECKBOX USER-COMMAND UC.
    SELECTION-SCREEN : COMMENT 5(33) CHK_TXT.
    PARAMETERS:        NUM TYPE I MODIF ID M1.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN: END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK T1 FOR 20 LINES.
    SELECTION-SCREEN TAB (10) NAME1 USER-COMMAND UCOMM1 DEFAULT SCREEN 101.
    SELECTION-SCREEN TAB (20) NAME2 USER-COMMAND UCOMM2 DEFAULT SCREEN 102.
    SELECTION-SCREEN TAB (30) NAME3 USER-COMMAND UCOMM3 DEFAULT SCREEN 103.
    SELECTION-SCREEN END OF BLOCK T1.
    SELECTION-SCREEN: FUNCTION KEY 1,
                      FUNCTION KEY 2.
    SELECTION-SCREEN : END OF SCREEN 100.
    * These are subscreens
    SELECTION-SCREEN : BEGIN OF SCREEN 101 AS SUBSCREEN.
    SELECTION-SCREEN : BEGIN OF BLOCK B6 WITH FRAME TITLE TEXT-006.
    PARAMETERS : CUS_NAM1(30) TYPE C,
                 CONTACT1(12) TYPE C,
                 CITY1(30) TYPE C.
    SELECTION-SCREEN : SKIP.
    SELECTION-SCREEN : PUSHBUTTON 1(20) BUT11 USER-COMMAND CLICK11 VISIBLE LENGTH 10.
    SELECTION-SCREEN : PUSHBUTTON 25(20) BUT12 USER-COMMAND CLICK12 VISIBLE LENGTH 10.
    SELECTION-SCREEN: END OF BLOCK B6.
    SELECTION-SCREEN : END OF SCREEN 101.
    SELECTION-SCREEN : BEGIN OF SCREEN 102 AS SUBSCREEN.
    SELECTION-SCREEN : BEGIN OF BLOCK B7 WITH FRAME TITLE TEXT-007.
    PARAMETERS : MAT_DES1(30) TYPE C MODIF ID M1,
                 UNT1(12) TYPE C MODIF ID M1,
                 MAT_TYP1(30) TYPE C MODIF ID M1.
    SELECTION-SCREEN : SKIP.
    SELECTION-SCREEN : PUSHBUTTON 1(20) BUT13 USER-COMMAND CLICK13 VISIBLE LENGTH 10.
    SELECTION-SCREEN : PUSHBUTTON 25(20) BUT14 USER-COMMAND CLICK14 VISIBLE LENGTH 10.
    SELECTION-SCREEN: END OF BLOCK B7.
    SELECTION-SCREEN : END OF SCREEN 102.
    SELECTION-SCREEN : BEGIN OF SCREEN 103 AS SUBSCREEN.
    SELECTION-SCREEN : BEGIN OF BLOCK B8 WITH FRAME TITLE TEXT-008.
    PARAMETERS : F_NAM1(30) TYPE C MODIF ID M1,
                 L_NAM1(12) TYPE C MODIF ID M1,
                 C_NO1(30) TYPE C MODIF ID M1.
    SELECTION-SCREEN : SKIP.
    SELECTION-SCREEN : PUSHBUTTON 1(20) BUT15 USER-COMMAND CLICK15 VISIBLE LENGTH 10.
    SELECTION-SCREEN : PUSHBUTTON 25(20) BUT16 USER-COMMAND CLICK16 VISIBLE LENGTH 10.
    SELECTION-SCREEN: END OF BLOCK B8.
    SELECTION-SCREEN : END OF SCREEN 103.
    Hope This could help u..
    Regards,
    Jhings

  • Selection-Screen TABS

    Hi All ,
    I have created one selection screen with TABS.
    But, I want to give the names for that TABS.
    My code is :
    SELECTION-SCREEN BEGIN OF TABBED BLOCK TABB1 FOR 20 LINES.
    SELECTION-SCREEN tab (40) tab1 USER-COMMAND tab1
    DEFAULT SCREEN 1010  .
    SELECTION-SCREEN TAB (20) TAB2 USER-COMMAND TAB2
    DEFAULT SCREEN 1020.
    SELECTION-SCREEN END OF BLOCK TABB1.
    *I have a radiobutton group in each of my tabs in the selection screen.
    SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN  .
    SELECTION-SCREEN BEGIN OF BLOCK GUI WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_GUI1 RADIOBUTTON GROUP GUI,
    P_GUI2 RADIOBUTTON GROUP GUI,
    P_GUI3 RADIOBUTTON GROUP GUI,
    P_GUI4 RADIOBUTTON GROUP GUI,
    P_GUI5 RADIOBUTTON GROUP GUI.
    SELECTION-SCREEN END OF BLOCK GUI.
    SELECTION-SCREEN END OF SCREEN 1010.
    SELECTION-SCREEN BEGIN OF SCREEN 1020 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK REP WITH FRAME." TITLE TEXT-REP.
    PARAMETERS: P_REP1 RADIOBUTTON GROUP REP,
    P_REP2 RADIOBUTTON GROUP REP,
    P_REP3 RADIOBUTTON GROUP REP.
    SELECTION-SCREEN END OF BLOCK REP.
    SELECTION-SCREEN END OF SCREEN 1020.
    Please any one help me how to solve this problem.
    Regards,
    Vandu.

    Pl. see this sample code.
    REPORT zravie_tabs_in_sel_screen .
    *Creating tabs in selection screen
    TABLES : zemp3,zdept,sscrfields.
    DATA : gt_itab LIKE zemp3 OCCURS 0 WITH HEADER LINE.
    *Subscreen 1
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN ULINE.
    SELECT-OPTIONS : so_dno FOR zdept-deptno.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN SKIP.
    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 TITLE text-001.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN ULINE.
    SELECT-OPTIONS : so_eno FOR zemp3-empno.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF SCREEN 200.
    SELECTION-SCREEN : FUNCTION KEY 1,
                       FUNCTION KEY 2.
    SELECTION-SCREEN : BEGIN OF TABBED BLOCK sub FOR 20 LINES,
                       END OF BLOCK sub.
    INITIALIZATION .
      sscrfields-functxt_01 = 'Department information'.
      sscrfields-functxt_02 = 'Employee information'.
      sub-prog = sy-repid.
      sub-dynnr = 100.
    AT SELECTION-SCREEN.
      CASE sy-dynnr.
        WHEN '0100'.
          IF sscrfields-ucomm = 'FC02'.
            sub-dynnr = 200.
          ELSE.
            sub-dynnr = 100.
          ENDIF.
        WHEN '0200'.
          IF sscrfields-ucomm = 'FC01'.
            sub-dynnr = 100.
          ELSE.
            sub-dynnr = 200.
          ENDIF.
      ENDCASE.
    TOP-OF-PAGE.
      PERFORM header_display.
    START-OF-SELECTION.
      CASE sub-dynnr.
        WHEN '100'.
         SELECT empno ename job salary FROM zemp3 INTO CORRESPONDING FIELDS
          OF TABLE gt_itab WHERE deptno IN so_dno.
          PERFORM records_display TABLES gt_itab.
        WHEN '200'.
         SELECT empno ename job salary FROM zemp3 INTO CORRESPONDING FIELDS
           OF TABLE gt_itab WHERE empno IN so_eno.
          PERFORM records_display TABLES gt_itab.
      ENDCASE.
    *&      Form  records_display
          text
         -->P_GT_ITAB  text
    FORM records_display TABLES   l_gt_itab STRUCTURE gt_itab.
      LOOP AT l_gt_itab.
        WRITE : / l_gt_itab-empno  UNDER text-003,
                  l_gt_itab-ename  UNDER text-004,
                  l_gt_itab-job    UNDER text-005,
                  l_gt_itab-salary UNDER text-006.
      ENDLOOP.
    ENDFORM.                    " records_display
    *&      Form  header_display
          text
    -->  p1        text
    <--  p2        text
    FORM header_display.
      FORMAT COLOR COL_HEADING INVERSE ON INTENSIFIED ON.
      WRITE AT 5  text-003.
      WRITE AT 20 text-004.
      WRITE AT 40 text-005.
      WRITE AT 70 text-006.
      SKIP 1.
      FORMAT COLOR OFF INVERSE OFF INTENSIFIED OFF.
    ENDFORM.                    " header_display
    Also check these standard demo programs
    DEMO_SEL_SCREEN_WITH_TABSTRIP
    DEMO_SEL_SCREEN_IN_TABSTRIP
    Regards,
    Joy.
    Edited by: Joyjit Ghosh on Jun 30, 2008 4:58 PM

  • Mutiple selection screen

    hi
    is it possible to have multiple selection screens?
    i want to do calculations using a selection screen.
    how do i do it?
    regards
    Arun

    Hi Arun,
    Yes, you can have multiple selection screens. Check following link from SAP Help -
    http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dba66935c111d1829f0000e829fbfe/content.htm
    You can have multiple selection screen using tabs.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK...
    Here are some examples
    http://www.sap-img.com/ge001.htm
    http://www.thespot4sap.com/Articles/Create_Subscreen_In_ABAP.asp
    Cheers,
    Manikandan R

  • Table control and a selection screen

    Hi,
    I have a requirement where I am supposed to be designing a screen that has a table control with fields
    w/selection column       label 1(non-editable)          i/o field(from)        i/o field(to)
    w/selection column       label 2(non-editable)          i/o field(from)        i/o field(to)
    On searching the forum threads, I found related threads as to how to implement a selection screen (as the I/O fields are similar to select-options) in module pool programming. But mine requires the use of table control and a kind of selection screen embedded into it. Please guide me through this requirement.

    Hi
    If you need to implement a table control on selection screen u need to use a tabstrip as graphic element supports the table control.
    So
    1 - Step: define a tabstrip with 1 tab only:
    SELECTION-SCREEN BEGIN OF BLOCK 3.
    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.
    SELECTION-SCREEN END OF BLOCK 3.
    2 - Step design the subscreen (in my sample the dynrpo 100) and insert the table control there:
    PROCESS BEFORE OUTPUT.
      MODULE INIT_CTRL.
      LOOP WITH CONTROL T_CTRL.
        MODULE DISPLAY_DATA.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP WITH CONTROL T_CTRL.
          MODULE UPDATE_DATA.
      ENDLOOP.
    In the module DISPLAY_DATA and UPDATE_DATA u need to implement the code to transfer the data from internal table to table control and from table control to internal table, in order to display and update the data.
    Max

  • Urgent : selection screen

    Hi Experts ,
       i am passing sub screens dynamically into the selection screen . IN output i am getting vertical scroll bar in subscreen. my requirement is to avoid scroll bar to that perticular subscreen.
    pls send the code how to avoid that scroll bar , here i am sending the coed below ( for 1300 sub screen i am getting scroll bar)
    pls do needfull .
    Thanks,
    Nagendra.
    tables
    TABLES:
      sscrfields,
      draw,          "Document Info Records
      drat,          "Texts for Document Info Records
      cabn,          "Characteristic
      cawn,          "characteristic values
      cawnt,         "characteristic value text
      ausp,          "Characteristic values
      tdwa,          "Document Types
      lfa1,          "Vendors
      ekko,          "Purchasing Documents Header
      ekpo,          "Purchasing Document items
      t023t,         "Material Group Descriptions
      klah,          "Classes
      cabnt,         "Characteristic descriptions
      lfb1,          "Vendor master (company Code)
      t059t,         "texts for minority indicators
      tdws,          "Document status
      tdwst,         "Document Status Text
      sos04,         "SAPoffice: screen fields for function group SO04
      t006,          "Units of Measurement
      tcurx,         "Decimal Places in Currencies
    *+MD1K960995
      ekbe.
    Parameters
    Program Parameters
    SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK buyingguide
                              WITH FRAME TITLE text-104.
      Company Code
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-300  FOR FIELD s_bukrs.
    SELECT-OPTIONS: s_bukrs FOR ekko-bukrs MEMORY ID buk.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document Category
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-301  FOR FIELD s_bstyp.
    SELECT-OPTIONS: s_bstyp FOR ekko-bstyp DEFAULT 'K'.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document type
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-302  FOR FIELD s_bsart.
    SELECT-OPTIONS: s_bsart FOR ekko-bsart MEMORY ID bsa.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document Creation Date
    SELECTION-SCREEN BEGIN OF LINE.  "MD1K964692
    SELECTION-SCREEN COMMENT 1(28) text-303  FOR FIELD s_aedat. "MD1K964692
    SELECT-OPTIONS: s_aedat FOR ekko-aedat.   "MD1K964692
    SELECTION-SCREEN END   OF LINE.           "MD1K964692
      Purchasing Document Creator
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-304  FOR FIELD s_ernam.
    SELECT-OPTIONS: s_ernam FOR ekko-ernam.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document Vendor Account Number
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-305  FOR FIELD s_lifnr.
    SELECT-OPTIONS: s_lifnr FOR ekko-lifnr MEMORY ID lif.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Organization
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-306  FOR FIELD s_ekorg.
    SELECT-OPTIONS: s_ekorg FOR ekko-ekorg MEMORY ID eko.
    SELECTION-SCREEN END   OF LINE.
    *+G1
      Purchasing Group
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-340  FOR FIELD s_ekorg.
    SELECT-OPTIONS: s_ekgrp FOR ekko-ekgrp MEMORY ID ekg.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document date
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-341  FOR FIELD s_ekorg.
    SELECT-OPTIONS: s_bedat FOR ekko-bedat MEMORY ID bed.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document item plant
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-307  FOR FIELD s_werks.
    SELECT-OPTIONS: s_werks FOR ekpo-werks MEMORY ID wrk.
    SELECTION-SCREEN END   OF LINE.
    *+MD1K971124
    *+MD1K971479
    Number of Purchasing Info Record
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-342  FOR FIELD s_infnr.
    SELECT-OPTIONS: s_infnr FOR ekpo-infnr MEMORY ID inf.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document item  material group
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-308  FOR FIELD s_matkl.
    SELECT-OPTIONS: s_matkl FOR ekpo-matkl MEMORY ID mkl.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document item category
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-309  FOR FIELD s_pstyp.
    SELECT-OPTIONS: s_pstyp FOR ekpo-pstyp DEFAULT 8 TO 9.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document item material number
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-310  FOR FIELD s_matnr.
    SELECT-OPTIONS: s_matnr FOR ekpo-matnr MEMORY ID mat.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document item deletion indicator
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-311  FOR FIELD s_loekz.
    SELECT-OPTIONS: s_loekz FOR ekpo-loekz DEFAULT space.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-317 FOR FIELD s_ebeln.
    SELECT-OPTIONS: s_ebeln FOR ekko-ebeln MEMORY ID vrt.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document item
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-312  FOR FIELD s_ebelp.
    SELECT-OPTIONS: s_ebelp FOR ekpo-ebelp MEMORY ID bsp.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document item purchase req number
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-313  FOR FIELD s_banfn.
    SELECT-OPTIONS: s_banfn FOR ekpo-banfn MEMORY ID ban.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document item reference purchase document
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-318  FOR FIELD s_konnr.
    SELECT-OPTIONS: s_konnr FOR ekpo-konnr.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document item reference purchase document item
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-319  FOR FIELD s_ktpnr.
    SELECT-OPTIONS: s_ktpnr FOR ekpo-ktpnr.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document validity from date
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-314  FOR FIELD s_kdatb.
    SELECT-OPTIONS: s_kdatb FOR ekko-kdatb.
    SELECTION-SCREEN END   OF LINE.
      Purchasing Document validity to date
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-315  FOR FIELD s_kdate.
    SELECT-OPTIONS: s_kdate FOR ekko-kdate DEFAULT sy-datum
                                                TO '99991231'.
    SELECTION-SCREEN END   OF LINE.
      Vendor Rating
    SELECTION-SCREEN BEGIN OF LINE.
    *SELECTION-SCREEN COMMENT 1(28) text-316  FOR FIELD s_zmrate.
    *SELECT-OPTIONS: s_zmrate FOR ekko-zz_moc_rating.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN END OF BLOCK buyingguide.
    SELECTION-SCREEN END OF SCREEN 1100.
    SELECTION-SCREEN BEGIN OF SCREEN 1200 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK document
                              WITH FRAME TITLE text-024.
      Document number
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) c_dokar  FOR FIELD s_dokar.
    SELECT-OPTIONS: s_dokar FOR draw-dokar DEFAULT 'CN1'.
    SELECTION-SCREEN END   OF LINE.
      Document type
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) c_doknr  FOR FIELD s_doknr.
    SELECT-OPTIONS: s_doknr FOR draw-doknr.
    SELECTION-SCREEN END   OF LINE.
      Document part
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) c_doktl  FOR FIELD s_doktl.
    SELECT-OPTIONS: s_doktl FOR draw-doktl.
    SELECTION-SCREEN END   OF LINE.
      Document version
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) c_dokvr  FOR FIELD s_dokvr.
    SELECT-OPTIONS: s_dokvr FOR draw-dokvr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN SKIP 1.
      Document Status
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) c_dokst  FOR FIELD s_dokst.
    SELECT-OPTIONS: s_dokst FOR draw-dokst." DEFAULT 'AC'.
    SELECTION-SCREEN END   OF LINE.
      Document Creation Date
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) c_adat   FOR FIELD s_adat.
    SELECT-OPTIONS: s_adat  FOR draw-adatum.
    SELECTION-SCREEN END   OF LINE.
      Document Creator
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) c_dwnam  FOR FIELD s_dwnam.
    SELECT-OPTIONS: s_dwnam  FOR draw-dwnam.
    SELECTION-SCREEN END   OF LINE.
      Document text
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) c_dktxt  FOR FIELD s_dktxt.
    SELECT-OPTIONS: s_dktxt  FOR drat-dktxt.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN SKIP 1.
      Parent Document number
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) c_prear  FOR FIELD s_prear.
    SELECT-OPTIONS: s_prear FOR draw-prear.
    SELECTION-SCREEN END   OF LINE.
      Parent Document type
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) c_prenr  FOR FIELD s_prenr.
    SELECT-OPTIONS: s_prenr FOR draw-prenr.
    SELECTION-SCREEN END   OF LINE.
      Parent Document part
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) c_pretl  FOR FIELD s_pretl.
    SELECT-OPTIONS: s_pretl FOR draw-pretl.
    SELECTION-SCREEN END   OF LINE.
      Parent Document version
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) c_prevr  FOR FIELD s_prevr.
    SELECT-OPTIONS: s_prevr FOR draw-prevr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN END OF BLOCK document.
    SELECTION-SCREEN END OF SCREEN 1200.
    SELECTION-SCREEN BEGIN OF SCREEN 1300 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK charact
                              WITH FRAME TITLE text-025.
      Class
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) c_class  FOR FIELD p_class.
    PARAMETERS: p_class LIKE klah-class OBLIGATORY
                                        MATCHCODE OBJECT clas
                                        DEFAULT 'CONTRACTS'.
    SELECTION-SCREEN END   OF LINE.
      Class Type
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) c_klart  FOR FIELD p_klart.
    PARAMETERS: p_klart LIKE klah-klart OBLIGATORY DEFAULT '017'.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN COMMENT /1(67) text-203.
    SELECTION-SCREEN COMMENT /5(16) text-204.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_01atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_01atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_01atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_02atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_02atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_02atm  FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_03atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_03atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_03atm  FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_05atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_05atm LIKE cabn-atnam OBLIGATORY
                                   VISIBLE LENGTH 26
                                   MODIF ID chr.
    SELECT-OPTIONS: s_05atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_04atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_04atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_04atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_06atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_06atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_06atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_07atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_07atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_07atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_08atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_08atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_08atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_09atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_09atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_09atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_10atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_10atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_10atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_11atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_11atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_11atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_12atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_12atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_12atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_13atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_13atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_13atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_14atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_14atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_14atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_15atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_15atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_15atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_16atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_16atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_16atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_17atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_17atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_17atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_18atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_18atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_18atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_19atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_19atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_19atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_20atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_20atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_20atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_21atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_21atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_21atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_22atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_22atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_22atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_23atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_23atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_23atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_24atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_24atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_24atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pc_25atm AS CHECKBOX
                                  MODIF ID chr.
    PARAMETERS: pt_25atm LIKE cabn-atnam OBLIGATORY
                                  VISIBLE LENGTH 26
                                  MODIF ID chr.
    SELECT-OPTIONS: s_25atm FOR  ausp-atwrt
                                  MODIF ID chr.
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN END OF BLOCK charact.
    SELECTION-SCREEN END OF SCREEN 1300.
      Main Selection screen that will incorporate the subscreens
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tabs FOR 24 LINES.
    SELECTION-SCREEN TAB (20) text-103 USER-COMMAND ucomm1
                                       DEFAULT SCREEN 1100.
    SELECTION-SCREEN TAB (20) text-100 USER-COMMAND ucomm2
                                       DEFAULT SCREEN 1200.
    SELECTION-SCREEN TAB (30) text-101 USER-COMMAND ucomm3
                                       DEFAULT SCREEN 1300.
    SELECTION-SCREEN END OF BLOCK tabs.
    SELECTION-SCREEN BEGIN OF BLOCK misc WITH FRAME TITLE text-061.
        ALV Variant
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(31) text-066 FOR FIELD p_alvvar.
    PARAMETERS: p_alvvar LIKE disvariant-variant.  "alv variant
    SELECTION-SCREEN END   OF LINE.
    SELECTION-SCREEN END   OF BLOCK misc.

    hi nagendra,
    i got ur problem. i put the subscreen in ur main screen.
    i was gone through from ur program. there is number of parameters and select-option. and ur subscreen size is small according to your taken fields.
    there is two option
    1 ) . make your subscreen size full in main screen .
    2) . Or you can put all fields in main screen . it does not matter for codding.
    rewards if helpfull.

  • Tabbed selection screen with AT SELECTION-SCREEN ON events does not work

    I have a selection screen with 3 tabs fields on each tab have AT SELECTION-SCREEN ON field events.  
    If you are on tab 1 and select a variant that populates fields on all tabs and then click the execute button ABAP does not seem to recognize that the field has changed when it executes AT SELECTION-SCREEN ON field event unless you physically go to each tab.
    I can work around this by:
    1) moving all of the AT SELECTION-SCREEN ON field events in a AT SELECTION-SCREEN OUTPUT event.  This is not efficient and it potentially opens me up to other problems.
    2) changing the selection screen to remove the tabs and have all of the fields on 1 screen.  This makes for a very long screen.
    Is there any way to have ABAP check all tabs?
    Thanks,
    Jerry

    I finally got it to start.   Let it sit and tried and it wouldn't but then I tried again and it did.  How do I blow the dust out?   I think it must be something with the heat since that comes up alot. 
    I will do it, I love my Mac.

  • 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

  • Selection Screen Variant does not set Tab as active -

    Hi experts,
    I have a Z-report. The selection screen of this report has got 8 tabs and sub screens, for different type of reporting ( SO, PO, Invoice reporting etc).
    Now the issue is, if a user creates a variant for the report with one particular tab as active tab, while running with this variant, the report starts with default tab(Tab 1) as active tab. The filed values in the particular tab are getting populated correctly from the variant. But the current/active tab is not getting set from the Variant. (Or in other words, none of the hidden fields in the screen P_TAB1, P_TAB2, etc are getting populated with X when creating a variant)
    This issue started recently, and old variants (created long back) are pointing to the correct tab as expected. I have checked for the changes in the report. Unfortunately there is only one version(latest) available in the system.
    Any kind of help will be appreciated.
    Thanking you in anticipation.
    Deeps

    Hi,
    I was wondering if you ever solved your issue.  I am facing the same
    problem.  When choosing a variant, I would like the active tab to
    display the correct select-option fields.

  • Retaining the selected tab in a tabbed block of selection screen

    Hi,
    My report has a selection screen with a tabbed block displaying 3 tabs. I want to retain the tab that was selected before executing the report and display that tab as the activetab when the user back navigates from the output list of the report to the selection screen.
    I tried to store the value of 'activetab' component of the tabbed block in a global variable and assigned the global variable to the 'activetab' component. But it is not working.
    Is there any other way by which we can do this?
    Thanks and Regards,
    Tongston

    I had a similar problem some time ago. One clarification first, global variables will not work because when you come back from report output, all the global/local variables are initialized that is when you come back to selection screen from report output, it is like a new instance of report.
    To resolve this you can use Export to memory ID / Import from memory ID statements, as these will retain the data across report instances.
    Now the following code is doing exactly what you wanted. You should copy/ paste it in an abap program and run it to see for yourself how I retained active tab.  Hope this will help you.
    REPORT  yy_test002.
    TABLES: bkpf, bseg, glt0, fdes, lfa1.
    DATA: g_acttab(132) TYPE c.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
    PARAMETERS: p_bukrs LIKE bkpf-bukrs,  "obligatory,
                p_upto LIKE bkpf-budat.
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
    SELECT-OPTIONS: s_hkon1 FOR bseg-hkont NO-EXTENSION,
                    s_lifn1 FOR bseg-lifnr.
    SELECTION-SCREEN END OF SCREEN 101.
    SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.
    SELECT-OPTIONS: s_hkon2 FOR bseg-hkont NO-EXTENSION,
                    s_lifn2 FOR bseg-lifnr.
    SELECTION-SCREEN END OF SCREEN 102.
    SELECTION-SCREEN BEGIN OF SCREEN 103 AS SUBSCREEN.
    SELECT-OPTIONS: s_hkon3 FOR bseg-hkont NO-EXTENSION,
                    s_lifn3 FOR bseg-lifnr.
    SELECTION-SCREEN END OF SCREEN 103.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME.
    PARAMETERS: p_dued LIKE bseg-fdtag.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tbblk FOR 8 LINES.
    SELECTION-SCREEN TAB (18) tabname1
    USER-COMMAND 'UTB1' DEFAULT SCREEN 101.
    SELECTION-SCREEN TAB (18) tabname2
    USER-COMMAND 'UTB2' DEFAULT SCREEN 102.
    SELECTION-SCREEN TAB (18) tabname3
    USER-COMMAND 'UTB3' DEFAULT SCREEN 103.
    SELECTION-SCREEN END OF BLOCK tbblk.
    SELECTION-SCREEN END OF BLOCK blk2.
    INITIALIZATION.
      tabname1 = 'GL Accounts set 1'.
      tabname2 = 'GL Accounts set 2'.
      tabname3 = 'GL Accounts set 3'.
      IMPORT g_acttab FROM MEMORY ID 'zssfsdfr3'.
      IF sy-subrc = 0.
        tbblk-prog = sy-repid.
        tbblk-activetab = g_acttab.
        CASE g_acttab.
          WHEN 'UTB1'.
            tbblk-dynnr = 101.
          WHEN 'UTB2'.
            tbblk-dynnr = 102.
          WHEN 'UTB3'.
            tbblk-dynnr = 103.
          WHEN OTHERS.
        ENDCASE.
      ENDIF.
    START-OF-SELECTION.
      g_acttab = tbblk-activetab.
      EXPORT g_acttab TO MEMORY ID 'zssfsdfr3'.
      WRITE:/ 'current active tab:', g_acttab.
      WRITE:/ 'bye'.

  • Call report selection screen in module pool program with tab strip control

    Hi,
    Could anyone explain in detail to call report selection screen in module pool program with tab strip control.
    Thanks
    Mano

    Hi,
    Refer std program:
    demo_sel_screen_in_tabstrip.
    demo_sel_screen_with_tabstrip.
    Call your program with SUBMIT stmt form module program.
    Reward points if this Helps.
    Manish

  • How to  create a selection screen with two tab strips

    Hi Experts,
    I need to craete a selection screen '100' with two tab strips, in the 1st tab strip i need create some select options as subscreen and in other tabstrip i need to call the subscren '4000' of the program 'SAPLCTMS' . i need to call this screen as selection screen from the zprogram. please help me out.
    Thanks in advance...
    Sarath...J

    Hi,
    I have developed some code.
    It just displays a table control and after entering the values init, upon hitting the return button, the values will be put into table itab. Have a look and make necessary changes as you see fit.
    *& Report  ZMADHU_TBCNTL
    REPORT  zmadhu_tbcntl.
    DATA: BEGIN OF itab OCCURS 0,
         sel TYPE s_flag,
         matnr TYPE matnr,
         ersda TYPE ersda,
         ernam TYPE ernam,
      END OF itab.
    CONTROLS: tab_cntl TYPE TABLEVIEW USING SCREEN 100.
    *START-OF-SELECTION.
    CALL SCREEN 100.
    *END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'TABCNTL'.   "pf status
    SET TITLEBAR 'xxx'.
      CASE sy-ucomm.
        WHEN 'BACK' OR
             'CANCEL' OR
             'EXIT'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  ITAB_MODIFY  INPUT
          text
    MODULE itab_modify INPUT.
      CASE sy-ucomm .
        WHEN ' '.        " When pressed enter
    if itab-sel = 'X'.
          MODIFY itab INDEX tab_cntl-current_line.
          APPEND itab.    " append lines to internal table
          CLEAR itab.
    *endif.
      ENDCASE.
    ENDMODULE.                 " ITAB_MODIFY  INPUT
    *Screen 100 flow logic.
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      LOOP AT itab WITH CONTROL tab_cntl CURSOR
      tab_cntl-current_line..
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE select_data.
      LOOP .
        CHAIN.
          FIELD itab-matnr.
          FIELD itab-ersda.
          FIELD itab-ernam.
          MODULE itab_modify ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
    MODULE USER_COMMAND_0100.
    Hope it will helps to u.
    Thanks,
    Shankar

  • Variants on tabbed selection screen for ALV reports

    Scenario: We use a tabbed selection screen for an ALV report. We create a variant, make a selection field on the second tab mandatory & save it without a value. When we run the report with the saved variant it does not check that the required field on the second tab is populated before it executes.
    Question: How can I code such a check?
    Edited by: Alridge Tom on Jul 4, 2008 3:43 PM

    Hi,
    try inserting this code apropietly in you program. (1 parameter + Initialization + At-selection-screen + 2 forms)
    START HERE
    PARAMETERS: pa_vari TYPE disvariant-variant.
    INITIALIZATION.
      g_repid = sy-repid.
      CLEAR e_variant.
      e_variant-report   = sy-cprog.
      e_variant-username = sy-uname.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = 'A'
        CHANGING
          cs_variant = e_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 0.
        pa_vari = e_variant-variant.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
      PERFORM alv_variant_f4 CHANGING pa_vari.
    *&      Form  ALV_VARIANT_F4
    FORM alv_variant_f4 CHANGING pa_vari.
      DATA: l_exit(1) TYPE c.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant       = e_variant
          i_tabname_header = 'ANYTHING'
          i_save           = 'A'
        IMPORTING
          e_exit           = l_exit
          es_variant       = e_variant
        EXCEPTIONS
          not_found        = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S'  NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF l_exit = space.
          pa_vari = e_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                               " ALV_VARIANT_F4
    END
    Hope iy helps!
    Alfonso

Maybe you are looking for

  • Feedback regarding HP products

    I have a long message, but this forum seems to be the only real feedback option, so I'll share my concerns here. Seven years ago I purchased an HP printer. For the reputation HP had, I thought it would work fine - it broke within a month. My second H

  • Sending through JavaMail starts to fail after several hours

    I have a strange problem send messages through JM. I have two applications, running on Jboss, regularly sending messages to external domains through javamail. On application startup, both work absolutely fine, for several hours. However, after a cert

  • Quicktime Pro hosed iTunes

    I'm getting very very aggravated. Had QT installed w/ iTunes. Upgraded (purchased) QT to Pro and now iTunes is completed hosed. I uninstalled iTunes, rebooted, reinstalled and am still having the problem. Info: QT 7 Pro iTunes 8 (latest release) Wind

  • Odd Migration from (CorporateTime) 5.0 via 5.4 to 10.1.1.0.2 /A.06.10

    There's a support document that states, that for upgrading from 5.0 to something supported I have to migrate to 5.4 first. I couldn't find this version for download and I'ld like to know if it's possible to get that version, just for the sake of migr

  • Writing data to Microsoft SQL Server/Dat​abase

    Hi All I have written a program in LV ver 6.1 that carries out various functional tests and at each test gathers 3 data values. At the moment the data is gathered at each stage of the test and written in a concatenated string to a file that was opene