Selection screen variant default value

Hi,
I have a hidden parameter defined of type sy-slset to store the current selected variant. Now how do i make sure that this parameter will contain the actual variant name now matter whether the program is executed in background or foreground.

Hi Premal,
when you run the program in background using SM37 the dynamic varint will get created.
You might have storing the variant in the custom table.
First you maintain the entry for the particular vairant in the custom table.
Then you run the program in background using TCode- SM36 for the particular variant.
The particular fields for the variant will get maodified in th custom table.
Hope this will solve your issue.

Similar Messages

  • Selection-screen - add default value to multiple selection

    Hi,
    How I can add a default value for multiple selection, on a Select-options?
    Thanks in advance,
    Brian Gonsales

    By default, selection optoins are RANGES, therefore to fill these before display, in the INITIALIZATION section
      CLEAR: so_field, so_field[].
      so_field = 'IEQvalue'. append so_field.
      so_field = 'IEQvalue2'. append so_field.
      so_field = 'IEQvalue3'. append so_field.
    If you want ranges
      CLEAR: so_field, so_field[].
      so_field = 'IBT'. so_field-low = 'lowvalue'. so_field-high = 'highvalue' append so_field.
    *  ETC
    Edited by: Paul Chapman on May 15, 2008 9:30 AM

  • 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

  • Selection Screen search help values based on condition

    Hi All,
    I am developing this report for HR.And the requirement is in one of the selection screen field the
    value's should be appeared(when f4) based on some condition,ie not all values should come.
    My field is HRP1001-sobid,here there are many values,they dunt want all that to be shown when user
    tries to input the values(F4).And also i need to show the Text for this field(department name) in
    search help.
    Can anyone please guide...
    Thanks in advance.

    Hi Salz
    You can code your own search help procedure for this. To achieve this, first you should add the block:
    <u>e.g.</u>
    AT SELECTION-SCREEN ON VALUE REQUEST FOR p_sobid.
    Within this block you can use the standard FM "<b>RH_OBJID_REQUEST</b>" to call the standard HR help list for objects conditionally.
    Regards
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • Selection Screen Variant (optionally default) -I dont think it's possible!?

    I have spent a lot of time looking at this issue - researching forums/sap help/on the system  - so any help appreciated...
    On the selection screen (for tx me59n) is it actually possible for users to set a variant as default on the selection screen?  It's actually that I want "Test Run" to be defaulted.
    This is the ideal scenario:
    - The selection criteria variant is created centrally (or even individually by the user)
    - The user can then optionally set this variant as their default selection criteria for the transaction
    - Next time the user runs the transaction, the defualt variant is used
    What I do not want is:
    - User having to select the variant each time they run the transaction
    - The variant always being default (it should only be default when user decides they want it as such)
    Any ideas?  I can't see that it's possible....?
    thanks in advance,
    Matt

    I've been trying SHD0 alot, but doesnt seem to work - again, i've spent time reading and trying it out but with no luck.
    This is how I'm doing it to try to default "Test Run" checkbox for ME59n
    - Run transaction SHD0
    - Input "ZDefault" into Transaction Variant field
    - Click create
    - ME59n loads
    - I tick "Test Run" (which is what I want defaulting for the transaction)
    - Click save
    - It prompts me to create screen variant
    - I input ZTEST_VARIANT and click save
    - I get a pop-up box which I enter ZTEST_VARIANT to name field but dont make any other changes
    - Get message saying ZTEST_VARIANT saved
    - Click back to Transaction Variant screen
    - Save it as a local object
    - Get message saying "Trans Variant and Screen Variant Saved"
    - Click back to initial SHD0 screen
    - Click TEST to try it out.
    - ME59n loads, but "Test Run" is not checked - the variant appears not to have been loaded at all.
    I run ME59n independently and still nothing seems to get loaded when I run the transaction. Although the new screen variant is availbale in the variant list, which if I select it it works perfectly.  But I want make it default??? How do I do it?
    Any ideas what i'm missing?
    Usually I can figure these things out pretty quickly, but this one has me stumped!
    thanks
    Matt

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

  • 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

  • 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

  • Current Calendar Day on Selection Screen as Default

    Hi,
    I have a situation where i need to have a variable which pulls up current calender day as a default value in the selection screen.
    Here users can use the default value if they want or else they should be able to change the default value to their requirent date.
    I have gone thorugh number of posts in this forum , but non solved my problem . that is the reason i am posting new thread. Please suggest.
    Thanks,
    Kumar

    Hi Kumar,
    You can use the SAP standard  0DAT ,this will display the current calendar day.
    Or
    We can write it in CMOD 
    Create A variable by name Y_SDATE in the QD and in CMOD u can write this piece of Code.
    WHEN 'Y_SDATE'.
            SY_DATE = SY-DATUM .
            IF I_STEP = 1.
            L_S_RANGE-LOW  =  SY_DATE .
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT  = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
    Hope this helps
    Rgds
    SVV123

  • 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

  • Workbook selection screen shown diffent value than its query selection scre

    My work book contents only one query.
    But the selection screen of work book gives me pop-up as 45.2008 for calweek as default value while my query was showing me 04.2009 is value of my current calendar week.
    Regards,
    Krunal

    Krunal,
    When you say pop - up, do you mean the variables screen?
    Are you saying that the variable has a default value of 45.2008?  Is it a Customer Exit / SAP Exit variable or an input variable?
    Regards
    Gill

  • Using select list as default value in tabular form.

    Hi,
    I am using Application Express 4.1.0.00.32. I have two questions that are related.
    I have a Select item *'P1_SELECT'* and a tabular form My Items.
    Question 1. The My Items tabular form col1 Attributes are set Display As Text Field, and the Tabular Form Attributes are set Default Type = item(application or page item name), Default = P1_SELECT. I have checked the session state value is set on P1_SELECT ie. Fred. What I need to know is, why, when adding a row to the tabular form My Items does col1 not display 'Fred' as the default value from the select item P1_SELECT? I can change col1 of the Tabular form to be Display as Text (save state) and this will work. However that leads me on to:
    Question 2. After adding say 3 rows to the form, I then change the select P1_SELECT value to Bob and Bob is now set in session state on the P1_SELECT item, but when I again add row to the form the value Fred is still the value not Bob. It seems that the tabular form keeps the default value as Fred and not Bob. How can I get this to look or work like:
    col1_
    Fred
    Fred
    Fred
    Bob
    Your help is needed.
    Thanks.

    Howard (DBA in Training) wrote:
    Do you submit the page or set the value after changing the selection? If not, the display value seems to be Bob but the working value is still Fred. That's what you are seeing right? In the "Settings" section, what do you have for "Page Action when Value Changed". I've been using "Redirect and Set Value" because I was staying on the same page after the selection.
    Additional info which might be helpful (or NOT). ====================
    NOTE: I am just a novice's novice with APEX and I had much agony with Select Lists. It was challenging to have the Select List value displayed because there seem to be so many different sources of the Select List value, namely:
    1) the current value in the session state
    2) the value you can specify in "Source value or expression" in the "Source" section of the Select List item
    3) the value you can specify in the "Post Calculation Compution" in the "Source" section of the Select List item
    4) the value you can specify in the "Default value" of the "Default" section of the Select List item
    [Now, if I've misdescribed any of these, remember, this is from a novice's perspective.]
    It's like putting a clock (back) together. Get any of the pieces wrong and it will probably not work right.
    I had an addiitonal challenge in that I wanted the same Select List displayed on multiple pages and for the currently selected value (from the former page) to already be set on the new page when it was displayed. What fun!
    To see what I did here: http://apex.oracle.com/pls/apex/f?p=43250:101 login Dever/Ima9Dever
    Remember, I'm doing many things you will likely not need to do. I iniitalized the Select List for the first time it displayed. I copied the Select List value from old page to new page by storing it in an application item F217_SYS_NIC_NM.
    Best wishes,
    HowardHi Howard,
    You don't have submit the page for just setting one item's session state. you can use a Dynamic Action OR use Page Items to Submit property if available (this is available in various places such as sql region,chart region etc)
    In context to this question you don't have to do any of those..just see my example above
    Thanks

  • AT SELECTION SCREEN OUTPUT ON VALUE REQUESt problem

    hi I am fetching the values into second field based on first field by reading them like this
    <b>
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR ST_NAME.
      CLEAR: FIELD_VALUE, DYNPRO_VALUES.
      REFRESH DYNPRO_VALUES.
      FIELD_VALUE-FIELDNAME = 'EXCH'.
      APPEND FIELD_VALUE TO DYNPRO_VALUES.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          DYNAME             = SY-CPROG
          DYNUMB             = SY-DYNNR
          TRANSLATE_TO_UPPER = 'X'
        TABLES
          DYNPFIELDS         = DYNPRO_VALUES.
      READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.
      IF FIELD_VALUE-FIELDVALUE IS NOT INITIAL.
        IF SY-SUBRC = 0 AND FIELD_VALUE-FIELDVALUE = 1.
          FIELD_VALUE-FIELDVALUE = 'BSE'.
        ELSEIF SY-SUBRC = 0 AND FIELD_VALUE-FIELDVALUE = 2.
          FIELD_VALUE-FIELDVALUE = 'NSE'.
        ENDIF.
        SELECT STOCK ST_NAME
                       FROM
                       ZEXCH
                       INTO TABLE TEMP_ITAB
                       WHERE EXCH = FIELD_VALUE-FIELDVALUE.
        IF SY-SUBRC = 0.
          FLAG = 'X'.
        ENDIF.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            RETFIELD    = 'ST_NAME'
            DYNPPROG    = SY-CPROG
            DYNPNR      = SY-DYNNR
            DYNPROFIELD = 'ST_NAME'
            VALUE_ORG   = 'S'
          TABLES
            VALUE_TAB   = TEMP_ITAB.
      ENDIF.
    </b>
    This is working fine, now my requirement is to fetch a value into 3rd field from database table when the user selects a value through 'F4IF_INT_TABLE_VALUE_REQUEST'
    Please help me with this, hope u got my problem, i want to know how to continue and fill value into third field after filling the field ST_NAME
    points guaranteed

    Hi,
    If you have two parameters, you want to display values(f4) in parameter 2 
    depending on the values entered in parameter 1.
    REPORT Z_SRI_HELP_VALUE_FOR_TABLES .
    tables tcurt.
    DATA   DYFIELDS LIKE DYNPREAD OCCURS 1 WITH HEADER LINE.
    PARAMETERS: P_WAERS LIKE TCURT-WAERS,        "Currency
                P_LTEXT LIKE TCURT-LTEXT,        "Long Text
                P_KTEXT LIKE TCURT-KTEXT.        "Short Text
    *--- Example of updating value of another field on the screen -
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_WAERS.
      CLEAR: DYFIELDS[], DYFIELDS.
    *--- select currency
      CALL FUNCTION 'HELP_VALUES_GET'
           EXPORTING
                fieldname        =  'WAERS'
                tabname          =  'TCURT'
           IMPORTING
                SELECT_VALUE     =   P_WAERS.
    *--- get long text for the selected currency
      SELECT SINGLE LTEXT FROM TCURT
        INTO DYFIELDS-FIELDVALUE
        WHERE SPRAS = SY-LANGU
        AND   WAERS = P_WAERS.
      IF SY-SUBRC <> 0.
        CLEAR DYFIELDS-FIELDVALUE.
      ENDIF.
    *--- update another field
      DYFIELDS-FIELDNAME = 'P_LTEXT'.
      APPEND DYFIELDS.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
           EXPORTING
                DYNAME               = SY-CPROG
                DYNUMB               = SY-DYNNR
           tables
                dynpfields           = DYFIELDS .
    *--- Example of reading value of another field -
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_KTEXT.
    *--- read another field
      CLEAR: DYFIELDS[], DYFIELDS.
      DYFIELDS-FIELDNAME = 'P_WAERS'.
      APPEND DYFIELDS.
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                DYNAME                   = SY-CPROG
                DYNUMB                   = SY-DYNNR
           TABLES
                DYNPFIELDS               = DYFIELDS .
      READ TABLE DYFIELDS INDEX 1.
    *--- get short text and update current field
      SELECT SINGLE KTEXT FROM TCURT
        INTO P_KTEXT
        WHERE SPRAS EQ SY-LANGU
        AND   WAERS EQ DYFIELDS-FIELDVALUE.
    How to add F4 functionality to a paramter variable?  Say P_name ie Parameters: P_name like dbtab-fieldname
    in At selection-screen on value-request for p_name.  How should I add the values john, abraham, linga etc so that these values appear when f4 is pressed on the field in the selection screen?
    PARAMETERS: p_name(10).
    DATA: BEGIN OF value_tab OCCURS 0,
                   name(10),
                 END OF value_tab.
    DATA :field_tab LIKE dfies  OCCURS 0 WITH HEADER LINE.
    DATA : return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE. DATA : x TYPE string.
      AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_name.
      REFRESH value_tab[].
      REFRESH field_tab[].
      REFRESH return_tab[].
        field_tab-fieldname = 'ERNAM'.
      field_tab-tabname = 'VBAK'.
      APPEND field_tab.
        value_tab-name = 'John'.
      APPEND value_tab.
      value_tab-name = 'Abraham'.
      APPEND value_tab.
      value_tab-name = 'Lingam'.
      APPEND value_tab.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = field_tab-fieldname
        TABLES
          value_tab       = value_tab
          field_tab       = field_tab
          return_tab      = return_tab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc = 0.
        p_name = return_tab-fieldval.
      ENDIF.
    Regards
    Sudheer

Maybe you are looking for

  • How to change a thumbnail in Top Sites

    (Using  Safari 7) I know I can drag a URL to the Top Sites page to add it, but invaribly it does not add the thumbnail I want.  A good example of this is the Google Calendar.  If I have the calendar open and drag the URL to Top Sites I get a thumbnai

  • Hyperion Planning Last Login Date

    Hello Everyone, I have a requirement where in I need to track the usage of the Hyperion Planning application. I need to build a list of inactive or dormant users and clean them up from the application. In order for me to achieve this, I need the Last

  • OSB calling Tuxedo Not transactional?

    I have a web service with methods in it that calls OSB services (which I have configured to call Tuxedo services exposed through the WTC). However, my calls don't seem to be transactional... is there a way to conifgure OSB to be transactional when ca

  • How to increase the speed of my producer loop?

    Hi, I try to monitor two CAN channels and to compare values online. That's why I use a producer loop to collect all CAN messages and a consumer loop to calculate some stuff. But the producer is to slow. The queues of my CANCard are full after some mi

  • Firefox 4.0 won't close, have to close via task manager (Vista).

    I am unable to close Firefox 4.0 from "X' in upper right corner, File/Exit, or Right-Clicking on taskbar and selecting Close. Have to open task manager to stop the process. Running a Vista machine, never had this issue with any other program (or any