Dynamically generating selection screen variants

Hi,
I have a report for which i have to create a variant. This report will be executed in background. There is a parameter Planning Date on the selection screen of this report. The format of this date is week.year i.e., ww.yyyy. Week should change automatically based on the week it is executed. For example, lets suppose that the current planning date is 19.2007. When you execute this report in the next week, the date should be 20.2007.
Please suggest me on how to do this.
Best Regards,
Phani.

Hi,
Create two variants for the below program say VAR1 and VAR2.
For the variant VAR1 take the default values say 12 and 3.
and for VAR2 take the values 10 and 5.
Now execute the program by selecting the variants VAR1 and VAR2. You can see the difference.
when you select VAR1 the parameters can be seen in disable mode.
parameters: p_num1 type i default 12,
                  p_num2 type i default 3.
at selection-screen output.
if sy-slset = 'VAR1'.
loop at screen.
  if screen-name = 'P_NUM1' or
     screen-name = 'P_NUM2'.
     screen-input =  0.
  endif.
  modify screen.
endloop.
endif.
write:/5 p_num1, 35 p_num2.
Edited by: Velangini Showry Maria Kumar Bandanadham on Apr 14, 2008 12:52 PM

Similar Messages

  • How do I add validation to a system-generated Selection Screen?

    As HR ABAPers know, using the Logical Database approach (I'm using PNPCE) gives you a system-generated Selection Screen.  Part of the specs I have for this report involves making sure that the begin and end dates for the period selected are for a two-week period.  If not, I should display an error message until the user enters a period such that the period (pn-begda and pn-endda) reflect a two-week period.
    The code for the validation is easy enough, and I put it in the AT SELECTION-SCREEN event.  But here's the problem -- the code fires every time the user clicks the "Reporting Period" drop-down box, never giving the user a chance to specify a two-week period.  It fires because pn-begda and pn-endda are still all zeroes.  Even if I select "Other Period" from the drop-down list, the text boxes to allow me to specify the begin and end dates don't appear.
    I've been working on this for quite a while, trying all kinds of things, but I'm spinning my wheels now.  I just want that check to happen when the user clicks the Execute button on the Selection Screen, not when he/she is still trying to enter criteria.  I'm thinking screen field validation for a system-generated Selection Screen has to be a pretty common thing, and there must be a good solution out there.
    Any ideas?

    Rich,
    Absolutely beautiful -- that's exactly what I needed to learn.  Thank you so much.
    Rob, I thought about that.  I even proposed to the users that I could default in a two-week range beginning with today, exactly as you suggested, but they didn't want that.  They felt that this report would more often than not be run to reflect data from two-week periods not necessarily starting today.  Still thought it was a good idea, but that's their call. _
    Again, thanks Rich.  Points awarded.

  • To display the selection screen variant name in WAD report output.

    Hello experts,
    I have a requirement which is to display the selection screen variant description in the output of the WAD report.
    I managed halfway, by using the object "Information field", which displays all the values which are selected by the variant.
    Example:I have created a cost center report created using WAD, since I need some graphical displays..
    In the selection screen, I have the characteristic "cost center" as input field. I have created a variant " GM - IT" which will include few cost centers managed by GM. In the output, I want the dispaly to be "Cost center - GM IT". Currently it displays "Cost Center - a,b,c,d" as the values a,b,c,d are the values from the variant name "GM-IT"
    Please let me know if this required any java script. I am not familiar with java / html codes and any help would be much appreciated (and rewarded)
    Thanks in advance
    KS

    Hi,
    Try this.
    If you want to include your variables in your WAD means you have to choose "Force Variable Screen" option to be in enabled condition.
    TO enable this,in WAD select your Template(New Template1) click the WEBITEM , it'll shows all generic properties , here you can enable this "Force variable screen"
    Save and execute your WAD now you can get your variable screen.
    Thanks,
    JituK

  • Selection screen variant for report

    Hi,
    Can we restrict the selection screen variants for reports by user? For example my report is ZREPORT. Different users can save variants for the report. When they choose a variant for executing the report, they would like to see only the variants they created.
    By default SAP lists all variants created (irrespective of who created).
    Thanks
    Anil

    Hi,
      If you want the other users doesn't want to execute (Not see) other variant..you can check if that user has created the variant in the AT SELECTION-SCREEN event..
      By checking VARI-VARIANT against the table VARID and check if sy-uname <> VARID-ENAME.
    Thanks,
    naren

  • How to limit the creation of the selection screen variant

    Hi,
    I have a question concerning the selection screen variants. Is it possible to limit the number of variant created by users (in customizing, authorization..)  ?
    If, yes, can you please tell me the procedure to follow.
    thanks for help.

    Cannot be restricted during creation but you can do a program that reads the report's existing variants, delete some, or modify the variant's content, you can put that in the program itself so when executed, apply your validation, or a background job depending on your requirements.
    You can do it with this function modules:
    RS_ALL_VARIANTS_4_1_REPORT
    RS_CHANGE_CREATED_VARIANT
    RS_VARIANT_DELETE
    Hope it helps

  • Generate Selection Screen as Popup dynamically

    Hello to all,
    is there a way to generate a selection screen popup at runtime dynamically?
    Is there any guide, that explains how "generate dynpro" has to be used?
    Thanks
    Christian

    Hello Oliver,
    sorry that i didn't update this thread. I tried the way you described above and it works. Sometimes I get short dumps in the shared memory block. I didn't solve this yet.
    I post you my code below:
      DATA la_dssfield TYPE /XXX/zssys_dssfield.
      CLEAR: wa_code, it_code.
      CLEAR: Ranges.
      wa_code = '*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'.
      APPEND wa_code TO it_code.
      wa_code = '*!!!!!! Generated program. Do not change anything!!!!'.
      APPEND wa_code TO it_code.
      wa_code = '*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'.
      APPEND wa_code TO it_code.
      wa_code = 'REPORT /XXX/ZSYS_GENSELSCREEN.'.
      APPEND wa_code TO it_code.
    **** Generate Tables Section
      DATA lt_tmp_dssfield TYPE /XXX/ztsys_dssfield.
      lt_tmp_dssfield[] = it_dssfield[].
    **** Delete Parameters
      DELETE lt_tmp_dssfield WHERE basictype EQ 'P'.
    **** Delete Duplicates
      SORT lt_tmp_dssfield BY reftable.
      DELETE ADJACENT DUPLICATES FROM lt_tmp_dssfield COMPARING reftable.
    **** Generate Tables Code
      LOOP AT lt_tmp_dssfield INTO la_dssfield.
        CONCATENATE 'TABLES' la_dssfield-reftable '.' INTO wa_code SEPARATED BY space.
        APPEND wa_code TO it_code.
      ENDLOOP.
    **** Build Selection Screen
      DATA: l_tabix(10) TYPE c,
            l_type(128) TYPE c,
            l_desc(10) TYPE c.
      LOOP AT it_dssfield INTO la_dssfield.
        l_tabix = sy-tabix.
        CONDENSE l_tabix.
        wa_code = 'SELECTION-SCREEN BEGIN OF LINE.'.
        APPEND wa_code TO it_code.
        CONCATENATE 'SELECTION-SCREEN COMMENT 1(32) cmt' l_tabix '.' INTO wa_code.
        APPEND wa_code TO it_code.
        CONCATENATE la_dssfield-reftable la_dssfield-reffield INTO l_type SEPARATED BY '-'.
        CASE la_dssfield-basictype.
          WHEN 'P'.
            CONCATENATE 'PARAMETERS' la_dssfield-fieldname 'LIKE' l_type '.' INTO wa_code SEPARATED BY space.
          WHEN 'S'.
            CONCATENATE 'SELECT-OPTIONS' la_dssfield-fieldname 'FOR' l_type '.' INTO wa_code SEPARATED BY space.
          WHEN 'V'.
            CONCATENATE 'SELECT-OPTIONS' la_dssfield-fieldname 'FOR' l_type ' NO INTERVALS.' INTO wa_code SEPARATED BY space.
        ENDCASE.
        APPEND wa_code TO it_code.
        wa_code = 'SELECTION-SCREEN END OF LINE.'.
        APPEND wa_code TO it_code.
      ENDLOOP.
    **** Initialize Comment Fields
      wa_code = 'INITIALIZATION.'.
      APPEND wa_code TO it_code.
    **** Set GUI-Status
      MOVE 'SET PF-STATUS ''STATUS_1000'' OF PROGRAM ''/XXX/ZSYS_GENSELSCREEN''.' to wa_code.
      APPEND wa_code to it_code.
    **** Set title
      DATA: l_stitle type string,
            l_sprog type string,
            l_stitletxt type string.
      MOVE '''TITLE_1000''' To l_stitle.
      MOVE '''/XXX/ZSYS_GENSELSCREEN''' to l_sprog.
      CONCATENATE 'SET TITLEBAR' l_stitle 'OF PROGRAM' l_sprog 'WITH'
                   INTO wa_code SEPARATED BY space.
      APPEND wa_code TO it_code.
      CONCATENATE '''' i_title '''' into wa_code.
      append wa_code to it_code.
      MOVE '.' to wa_code.
      APPEND wa_code TO it_code.
      LOOP AT it_dssfield INTO la_dssfield.
        l_tabix = sy-tabix.
        CONDENSE l_tabix.
        CONCATENATE 'cmt' l_tabix INTO l_tabix.
        CONCATENATE l_tabix ' = ''' la_dssfield-descr '''.' INTO wa_code.
        APPEND wa_code TO it_code.
      ENDLOOP.
    *** Start of Selection
    *  wa_code = 'START-OF-SELECTION.'.
    *  APPEND wa_code TO it_code.
    **** AT SELECTION-SCREEN
      wa_code = 'AT SELECTION-SCREEN.'.
      APPEND wa_code TO it_code.
      wa_code = 'DATA: okcode type SYUCOMM.'.
      APPEND wa_code TO it_code.
      wa_code = 'MOVE sy-ucomm to okcode.'.
      APPEND wa_code TO it_code.
    * Data types for shared objects
      wa_code = 'DATA t_ranges TYPE ACE_FIELD_RANGES_T.'.
      APPEND wa_code TO it_code.
      wa_code = 'DATA wa_ranges LIKE LINE OF t_ranges.'.
      APPEND wa_code TO it_code.
      wa_code = 'DATA t_fldrange TYPE ACE_GENERIC_RANGE_T.'.
      APPEND wa_code TO it_code.
      wa_code = 'DATA wa_fldrange TYPE ACE_GENERIC_RANGE.'.
      APPEND wa_code TO it_code.
    * Read the input from the selection screen and
    *  store it in Shared Objects
      LOOP AT it_dssfield INTO la_dssfield.
    *   Assign the fieldname in the variable
        CONCATENATE 'wa_ranges-fieldname = '''
                     la_dssfield-fieldname '''.'
          INTO wa_code SEPARATED BY space.
        APPEND wa_code TO it_code.
        wa_code = 'REFRESH t_fldrange.'.
        APPEND wa_code TO it_code.
    *   Processing for SELECT-OPTIONS
    *   Loop and move data to the shared memory
        IF la_dssfield-basictype EQ 'S'
           OR la_dssfield-basictype EQ 'V'.
          CONCATENATE 'LOOP AT ' la_dssfield-fieldname '.'
            INTO wa_code SEPARATED BY space.
          APPEND wa_code TO it_code.
          wa_code = 'CLEAR wa_fldrange.'.
          APPEND wa_code TO it_code.
          CONCATENATE 'MOVE-CORRESPONDING ' la_dssfield-fieldname 'TO' 'wa_fldrange.'
             INTO wa_code SEPARATED BY space.
          APPEND wa_code TO it_code.
          wa_code = 'APPEND wa_fldrange TO t_fldrange.'.
          APPEND wa_code TO it_code.
          wa_code = 'ENDLOOP.'.
          APPEND wa_code TO it_code.
          wa_code = 'wa_ranges-fieldrange[] = t_fldrange[].'.
          APPEND wa_code TO it_code.
          wa_code = 'APPEND wa_ranges TO t_ranges.'.
          APPEND wa_code TO it_code.
        ELSEIF la_dssfield-basictype EQ 'P'.
    *   Processing for PARAMETERS
          wa_code = 'CLEAR wa_fldrange.'.
          APPEND wa_code TO it_code.
    *     Process if the parameter is not initial
          CONCATENATE 'IF ' la_dssfield-fieldname 'IS NOT INITIAL.'
            INTO wa_code SEPARATED BY space.
          APPEND wa_code TO it_code.
          wa_code = 'wa_fldrange-sign = ''I''.'.
          APPEND wa_code TO it_code.
          wa_code = 'wa_fldrange-option = ''EQ''.'.
          APPEND wa_code TO it_code.
          CONCATENATE 'wa_fldrange-low = ' la_dssfield-fieldname '.'
            INTO wa_code SEPARATED BY space.
          APPEND wa_code TO it_code.
          wa_code = 'APPEND wa_fldrange TO t_fldrange.'.
          APPEND wa_code TO it_code.
          wa_code = 'ENDIF.'.
          APPEND wa_code TO it_code.
          wa_code = 'wa_ranges-fieldrange[] = t_fldrange[].'.
          APPEND wa_code TO it_code.
          wa_code = 'APPEND wa_ranges TO t_ranges.'.
          APPEND wa_code TO it_code.
        ENDIF.
      ENDLOOP.
      wa_code = 'DATA: area type ref to /XXX/zsmasys_genselscreen.'.
      APPEND wa_code TO it_code.
      wa_code = 'DATA root type REF to /XXX/zclsys_genselscreen.'.
      APPEND wa_code TO it_code.
    * Get ref to the shared memory
      wa_code = 'area = /XXX/zsmasys_genselscreen=>attach_for_write( ).'.
      APPEND wa_code TO it_code.
      wa_code = 'create object root area handle area.'.
      APPEND wa_code TO it_code.
    * Store the value in memory
      wa_code = 'root->set_fields( t_ranges ).'.
      APPEND wa_code TO it_code.
    * Store ok_code in memory
      wa_code = ' root->set_okcode( okcode ).'.
      APPEND wa_code TO it_code.
      wa_code = 'area->set_root(  root ).'.
      APPEND wa_code TO it_code.
    * Commit and detatch
      wa_code = 'area->detach_commit( ).'.
      APPEND wa_code TO it_code.
    * Quit the program: Return to the main code
      wa_code = 'LEAVE PROGRAM.'.
      APPEND wa_code TO it_code.
    * Generate the report program
      INSERT REPORT '/XXX/ZSYS_GENSELSCREEN' FROM it_code.
      COMMIT WORK.
    * Execute the report
      SUBMIT /XXX/zsys_genselscreen VIA SELECTION-SCREEN AND RETURN.
    Importing parameters are:
    it_dssfield type /XXX/zTsys_dssfield
    i_title type title_txt
    /XXX/ztsys_dssfield has the following line structure:
    FIELDNAME     CHAR08
    REFTABLE     TABNAME
    REFFIELD     FIELDNAME
    BASICTYPE     CHAR01
    DESCR     CHAR30_BRO
    I hope It helps you!
    I'm looking for a way to do the same in a selection-screen Pop-Up.
    For further questens contact me!
    Regards Christian

  • Dynamic selection screen variant

    Hi Gurus,
    There are two parameters in the selection screen of a report. One for Date, whose format is ww.yyyy and purchasing organization. Both the fields are mandatory fields.
    I have to create variants for this report in such a way that when user selects the variant, it should give current week in combination with year in Date parameter and Purchasing organization from the saved variant list.
    Suppose there are two variants created with purchasing organizations 0001 and 0002, if i select 1st variant today then date should be 22.2007 and purchasing organization as 0001... if i select 1st variant in next week then date should be 23.2007 with purchasing organization 0001...
    Thanks in Advance,
    Phani.

    Hi Sivapuram ,
      I am not sure we can create a varaint where we have some processing involved  .
    What i would suggest is if you want this to be done for a specific varaint , then you will have to write the processing code in the at selection-screen output event .
    This code must include the logic to calcuate the value as per your requirement , the code must be executed when the specific variant is loaded , the current varaint loaded in the system is stored in the system varaible sy-SLSET.
    This is a solution which is very specific to a varaint and not a generic solution.
    Regards
    Arun

  • How to print the selection screen variant as a report header

    I want to print the variant selected on the selection screen as a report header in the report painter.....Kindly help....The variant selected prior to generating the report painter output must be displayed on the final output screen as the header on the screen...

    Hi
    Here you've to use 'Z_HEADER_FOOTER' function module at TOP-OF-PAGE
    Just pass parameters for report_name                 as repid
                                              show_select_options  as 'Y'
                                              show_parameters       as 'Y'
                                              line_size                       as you wish
                                              action                           as 'X'
    Hope this fulfills your requirement
    Thanks
    Suren

  • Auto generated selection screen in Modulepool program

    Hi Experts!!
    How to develop/Desing auto-generated screen for accepting values from the user as criteria for database selections while running a report.
    pls. guide me.
    Thanks in advance

    Use this - two FMS-
    here is the code -
    FORM extended_selection.
      DATA : t_dyn    LIKE rsdsfields OCCURS 0 WITH HEADER LINE.
    *Work Areas.
      DATA : wa_range  TYPE LINE OF rsds_trange,
             wa_ranget TYPE rsds_frange_t,
             wa_line   TYPE LINE OF rsds_frange_t,
             t_selopt  TYPE rsds_selopt_t.
    *Fields to be Put on the dynamic selection screen
      t_dyn-tablename = 'KNA1'.
      t_dyn-fieldname = 'KUNNR'.
      APPEND t_dyn.
      CLEAR  t_dyn.
      t_dyn-tablename = 'CEPC'.
      t_dyn-fieldname = 'PRCTR'.
      APPEND t_dyn.
      CLEAR  t_dyn.
      IF ( ( g_sel IS INITIAL ) OR ( t_ranges[] IS INITIAL ) ).
    *Initialize Free Selection Mode.
        CALL FUNCTION 'FREE_SELECTIONS_INIT'
             EXPORTING
                  kind                     = 'F'
             IMPORTING
                  selection_id             = g_sel
             TABLES
                  fields_tab               = t_dyn
             EXCEPTIONS
                  fields_incomplete        = 1
                  fields_no_join           = 2
                  field_not_found          = 3
                  no_tables                = 4
                  table_not_found          = 5
                  expression_not_supported = 6
                  incorrect_expression     = 7
                  illegal_kind             = 8
                  area_not_found           = 9
                  inconsistent_area        = 10
                  kind_f_no_fields_left    = 11
                  kind_f_no_fields         = 12
                  too_many_fields          = 13
                  dup_field                = 14
                  field_no_type            = 15
                  field_ill_type           = 16
                  dup_event_field          = 17
                  node_not_in_ldb          = 18
                  area_no_field            = 19
                  OTHERS                   = 20.
        IF sy-subrc NE 0.
          MESSAGE e717(db).
        ENDIF.
      ENDIF.
    *Dialog for Selection.
      REFRESH t_ranges.
      CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
           EXPORTING
                selection_id    = g_sel
                title           = 'Extended Selection'(s12)
                as_window       = true
                start_row       = 5
                start_col       = 20
                tree_visible    = space
           IMPORTING
                field_ranges    = t_ranges
           TABLES
                fields_tab      = t_dyn
           EXCEPTIONS
                internal_error  = 1
                no_action       = 2
                selid_not_found = 3
                illegal_status  = 4
                OTHERS          = 5.
      IF sy-subrc NE 0.
        CHECK sy-subrc NE 2.
        MESSAGE e717(db).
      ENDIF.
    This will create a dynamic selection screen for you. For more information u can refer to the documentations of those function mdoules.
    Hope it solves ur prob.

  • How to get selection screen variant name of a report ?

    Hi Experts,
    Can any body please suggest, how I can get the variant name that was selected when a report program was being scheduled in background?
    I am using system field SY-SLSET but it is working only at foregrounf execution.In background mode it holds different value like '&0000000000038'.
    Thanks in advance.

    Hi !
    When running the program in foreground (SE38 -> F8) or in a background job (SM36), sy-slrel is correctly filled.
    When running in background via SE38 transaction (run in background  : F9), sy-slrel is not filled correctly (&000010 for example).
    However, in the second case, you still are in foreground when in the selection screen. Thus this simple but quite efficient idea of  [Vinod Vemuru|http://wiki.sdn.sap.com/wiki/display/~ncz6anw] :
    http://wiki.sdn.sap.com/wiki/display/ABAP/Howtogetthevariantnamewhenrunningthereportinbackgroundfromselectionscreen

  • Dynamic selectionof selection-screen

    parameters table1.
    parameters input.
    i have enter dynamic text into table1
    like table1 = vbak.
    i like to see instead of input as table1(i.e vbak) on selection-screen
    when user dynamically gives value of table1 
    help me plz
    <b></b><b></b><b></b><b></b>
    Message was edited by:
            shravan ramidi

    Hi Shravan
    declare like this
    PARAMETERS : COMPANY LIKE BSEG-BUKRS.
    or you can declare like this
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 25(23) text-002.
    SELECT-OPTIONS: S_ebelp FOR eKPO-ebelp.
    PARAMETERS:p_lifnr LIKE ekko-lifnr .
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    and on the editor goto Text elements then goto change mode and there goto selection texts there u declare your name which you want to display outside for user
    Reward all helpfull answers
    Regards
    Pavan

  • Dynamic variables: SELECTION-SCREEN PUSHBUTTON

    hi, how I can create 100 buttons on a cycle so dynamic?
    example:
    SELECTION-SCREEN BEGIN OF LINE.
       SELECTION-SCREEN PUSHBUTTON (4)  TEXT-001    USER-COMMAND but1.
       SELECTION-SCREEN PUSHBUTTON (4)  TEXT-002    USER-COMMAND but2.
       SELECTION-SCREEN PUSHBUTTON (4)  TEXT-003    USER-COMMAND but3.
       SELECTION-SCREEN PUSHBUTTON (4)  TEXT-004    USER-COMMAND but4.
    SELECTION-SCREEN END OF LINE.
    .....must be dynamic and they can be 100 and just 10
    thanks in advance.
    goudden.

    It gives you an error cause the macro is wrong. Try like this:
    define create_line.
    SELECTION-SCREEN BEGIN OF LINE.
       SELECTION-SCREEN PUSHBUTTON (4)  TEXT-&1    USER-COMMAND b&1.
       SELECTION-SCREEN PUSHBUTTON (4)  TEXT-&2    USER-COMMAND b&2.
       SELECTION-SCREEN PUSHBUTTON (4)  TEXT-&3    USER-COMMAND b&3.
       SELECTION-SCREEN PUSHBUTTON (4)  TEXT-&4    USER-COMMAND b&4.
    SELECTION-SCREEN END OF LINE.
    end-of-definition.
    selection-screen begin of block b01.
         create_line: 001 002 003 004, 005 006 007 008.
    selection-screen end of block b01.

  • How to create check boxes dynamically in selection screen

    Hi Experts,
    I have a requirement of creating dynamic check boxes based on the number of records that are retrieved from a database table.
    Can you please suggest me how to achieve it.
    Regards
    RP.

    Hey RP,
    Try this way.
    REPORT ztest_program .
    DATA: it_data TYPE TABLE OF t001.
    DATA:check    TYPE char3.
    DATA:sy_index TYPE char2.
    DEFINE checkbox.
      parameters:&1 as checkbox.
    END-OF-DEFINITION.
    CHECKbox:c01,c02,c03,c04,c05,c06,c07,c08,c09,c10,
             c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,
             c21,c22,c23,c24,c25,c26,c27,c28,c29,c30,
             c31,c32,c33,c34,c35,c36,c37,c38,c39,c40.
    AT SELECTION-SCREEN OUTPUT.
      DESCRIBE TABLE it_data LINES sy-tfill.
      sy-tfill = 39. "This will be changed based on the itab records. I just hardcoded the value
      sy_index = 1.
      LOOP AT SCREEN.
        CONCATENATE 'C' sy_index INTO check.
        IF screen-name = check.
          IF sy_index GT sy-tfill.
            screen-active = '0'.
            MODIFY SCREEN.
            sy_index = sy_index + 1.
            CONTINUE.
          ENDIF.
          sy_index = sy_index + 1.
        ENDIF.
      ENDLOOP.
    Thanks
    Venkat.O

  • 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.

  • Selection screen variant...

    Hi Gurus,
    My requirement is I need to call a prepare a selection screen and create a variant of that screen..
    Then user will put the name of the variant as selection id in "Production Planning run " screen...I neeed to fetch all product ids based on the sejection screen variant and store that internal table of user exit
    APOCDPS1....The internal table name is "E_SEL_PEGID_TAB". It is there in the FM Exit_SAPLCDPSUSER_02 ....
    Please help,,,how to do??
    I also need to write a query in the user exit on a table  to fetch what are stored in the variants where the variant name is selection id given by the user...Which table and which fields are maintaining that in APO..

    You should go to transaction /SAPAPO/CDPSB0.  create the screen variant there and then you can call this varient in transaction CDPS1.
    Regards.
    Nitin Thatte

Maybe you are looking for