Default  value for select options.

Hi folks
I have to default four values in select-options.
eg.,
S_lfart for likp-lfart, default zse, zin, znd, zps.
Thanks in Advance,
Rao

Hi,
Go through the following syntax:
SELECT-OPTIONS <sel> FOR <f>
               [DEFAULT <g> [to <h>] [OPTION <op>] SIGN <s>]
               [MEMORY ID <pid>]
               [LOWER CASE]
               [OBLIGATORY]
               [NO-DISPLAY]
               [MODIF ID <key>]
               [NO-EXTENSION]
               [NO INTERVALS]
               [NO DATABASE SELECTION].
Declares a selection table <sel> for the field <f>. For <sel>, places input fields on the corresponding selection screen. The additions allow you to set a default value, accept input in lowercase, define a required field, suppress or modify the display on the selection screen, restrict the selection table to a line or a selection to a single field, or prevent input from being passed to a logical database
Regards,
Bhaskar

Similar Messages

  • Set of default values for Select-Options

    Hi Gurus,
    I have a requirement where I need to set default values for select options
    ex: SELECT-OPTIONS: S_MTART FOR MARA-MTART
    default values must be ERSA - HIBE- FHMI - DIEN - GEST
    Please tell me how to do it.
    Effective replies will be rewarded with full points
    Karthik

    Hi,
    For each SELECT-OPTION, you can only specify one DEFAULT.
    You must specify the default value g in its internal format, e.g. "SELECT-OPTIONS DATE FOR SY-DATUM DEFAULT '19931224'", not "... DEFAULT '24.12.1993'".
    The default value g should normally be a literal because, at runtime when you use SUBMIT, it is transferred to the selection options table sel so early that no value can be assigned to the field g. System fields like SY-DATUM are an exception here because the system usually assigns values to them as soon as the report processing starts.
    When you use user-defined selection screens in your programs that you do not call using SUBMIT, the DEFAULT value is transfered when the selection screen is first called. In this case, therefore, you can use other fields g.
    regards,
    sowjanya
    Message was edited by: sowjanya suggula

  • How to assign list of default value for select-option variable???

    Hi every one
    This is Deepak,
    I want to know how to assign list of default value to select-option variable ? please any body tel me solution
    for example
    select-option matnr for mara-matnr default ..............and here i want to give more than 1 values that will be default value and use can choose any one at the time of input .
    Thank you in advance
    Deepak

    Hi.
    Check the following sample code.
    REPORT ztn_test.
    " It is example for list populating.
    TABLES:knvp.
    data: BEGIN OF itab OCCURS 10,
          kunnr like knvp-kunnr,
          END OF itab.
    data: wa_itab like itab.
    TYPE-POOLS: vrm.
    DATA: name TYPE vrm_id,
    list TYPE vrm_values,
    value LIKE LINE OF list.
    PARAMETERS: s_kunnr(20) type c  as LISTBOX VISIBLE LENGTH 40 .
    AT SELECTION-SCREEN OUTPUT.
    SELECT kunnr from knvp  into  CORRESPONDING FIELDS OF TABLE itab WHERE parvw = 'SP'. " SP for ur requirement
    " I have used loop to populate some values from table
    loop at itab into wa_itab.
      name = 'S_KUNNR'.
      value-key = sy-tabix.
      value-text = wa_itab-kunnr.
      append value to list.
      clear wa_itab.
    endloop.
    " If u want individaully assign the values change the code as
    name = 'S_KUNNR'." Select option name
      value-key = 1." Index
      value-text = 'VAL1'.
      append value to list.
    name = 'S_KUNNR'." Select option name
      value-key = 2." Index
      value-text = 'VAL2'.
      append value to list.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING id = name
    values = list.
    Edited by: tahir naqqash on Feb 21, 2009 4:38 PM

  • Default Values for Select-options In Webdynpro-ABAP

    Hi Freinds,
    Kindly,Help me in setting the Default values for the Select-options in Webdynpro ABAP.
    Here the Node and the Attributes are Created Dynamically, and then Displayed Select-options Component View.
    Regards,
    Xavier.P

    Xavier Reddy Penta sent me this question via email and I answered it directly yesterday. Here is the solution that I provided to him, so that it is stored with the original question:
    I believe your problem is that you are not setting the value into the range correctly.  You are setting it directly into the field symbol of the range like such:
    <FS> = L_STRING2.
    But ranges are deep objects. They have four fields: Sign, Option, High, and Low. This is from the online help:
    1.     sign of type c and length 1. The content of sign determines for every row whether the result of the condition formulated in the column is included or excluded in the entire resulting set for all rows. Evaluable values are "I" for include and "E" for exclude.
    2.     option of type c and length 2. option contains the selection option for the condition of the row in form of logical operators. Analyzable operators are "EQ", "NE", "GE", "GT", "LE", "LT", "CP" and "NP" if column high is initial, and "BT", "NB" if column high is not initial. With the options "CP" and "NP", the data type of the columns low and high must be of the data type c, and special rules apply for entries on the selection screen.
    3.     low of the data type defined after FOR. This column is designated for the comparison value or the lower interval limitation.
    4.     high of the data type defined after FOR. This column is designated for the upper interval limitation.
    So when you are moving the value into the field symbol you are setting it into the sign column.
    Here is an example of how you can access the components of the range:
    * create a range table that consists of this new data element
        lt_range_table =
          wd_this->lv_sel_handler->create_range_table(
               i_typename = l_typename ).
        IF l_fieldname = 'CARRID'.
          FIELD-SYMBOLS: <tab>         TYPE INDEX TABLE,
                             <struct>      TYPE ANY,
                             <wa>          TYPE ANY,
                             <option>      TYPE char2,
                             <sign>        TYPE char1,
                             <high>        TYPE ANY,
                             <low>         TYPE ANY,
                             <wa_values>   TYPE ANY.
          ASSIGN lt_range_table->* TO <tab>.
          APPEND INITIAL LINE TO <tab> ASSIGNING <wa>.
          ASSIGN COMPONENT 'OPTION' OF STRUCTURE <wa> TO <option>.
          ASSIGN COMPONENT 'HIGH' OF STRUCTURE <wa> TO <high>.
          ASSIGN COMPONENT 'LOW' OF STRUCTURE <wa> TO <low>.
          ASSIGN COMPONENT 'SIGN' OF STRUCTURE <wa> TO <sign>.
          <sign> = 'I'.
          <option> =  'EQ'.
          <low> = 'AA'.
        ENDIF.

  • Specific default values for select-options high and low

    Hi
    My requirement is in the selection screen i have a select-options field for which i need to give default values as mentioned below.
    Description                              Data Type       Default Value     Mandatory?             Sel Scrn Type     
    Delivery/BOL Date        ekab-bedat                         1st DOM to current day     Y              Range     
    The datatype is ekab-bedat.
    In the low value field ,it should be 1st Date of month(DOM) and in the high value field it should be current day.
    Give me the code for the same asap.

    >
    sreedeep.sreekumar wrote:
    > Dont mistake my intensions. When i tried to write it in the form of a request it showed me that it cannot me posted beacuse the words that i am using (please,kindly) is not following the terms and conditions of the words to be written in the threads
    Sounds quite vague to me.
    >
    sreedeep.sreekumar wrote:
    > I was asking help for this as i am a novice in SAP-ABAP and i couldnt find solutions for it and also i have seen people directly writing codes for the queries.
    Becuase you see people posting pieces of code doesn't mean you can ask for a solution asap. Besides, whether you're new or a veteran in ABAP, what you need can be solved with some very basic knowlegde of ABAP. Just use a bit of common sense.

  • Default values for Select options

    Hi All,
      I want to have default values X0 and ND for a select-options field.how can i get the same?
    Thanks,
    Rakesh.

    Initialization.
    s_akont-low = 'X0'.
    s_akont-sign = 'I'.
    s_akont-option = 'EQ'.
    APPEND s_akont.
    s_akont-low = 'ND'.
    APPEND s_akont.

  • How to set default value in select option for ABAP query

    Hi experts,
    What is the way to set up default values for select-options in ABAP query.
    e.g.
    I have one field 'Year' in my ABAP query selection screen.
    I want value of current year to be appeared here whenever user execute report
    Thanks in Advance
    -Harkamal

    Hi Harkamal,
    execute your Query via SQ01. On Selection-Screen
    goto save Variant. Mark your field
    as selection variable an press Button election variable.
    Take variable from TVARV and use it.
    Than save the Variant.
    Look at TVARV if the 'Year' is updated to the actualYear!
    regards, Dieter

  • Default value for selection screen field

    Hi all,
      I am using LDB PNPCE. I want to give default value for field Personnel area on selection screen.
    How can I do it?
    Thanks
    Rahul

    Hi Rahul,
    In the INITIALIZATION event we can set the default values for selection screen fields.
    INITIALIZATION.
    loop at screen.
    if screen-name = 'S_MATNR-LOW'.
    CLEAR S_MATNR.
    s_matnr-low = '1234'.
    s_matnr-option = 'EQ'.
    s_matnr-sign = 'I'.
    append s_matnr.
    CLEAR S_MATNR.
    s_matnr-high = '5678'.
    s_matnr-option = 'EQ'.
    s_matnr-sign = 'I'.
    append s_matnr
    clear s_matnr.
    endif.
    endloop.
    Hope it helps.
    Mark if useful
    Regards,
    Saumya

  • How to set the default values for print options

    Hi all,
    We can set the default value for print options, just like Logical destination、numbers of messages、print immediately and so on, so where we should to maintain these default?

    Hi Sandy,
    This can be done by an abaper by making changes in the driver program. The Driver program feeds all the data which u have mentioned for printing.
    if the driver program is standard. copy to an z type and make modification on printer settings on the driver program code.
    this will surely solve the issue.
    Regards
    Gunaseelan

  • Restrict F4 help values for select option

    Hi All,
    How to restrict the F4 help for select option in Webdynpro for ABAP based on some input.
    Regards,
    Karthick S

    Hi Karthick,
    Use OVS help. It will take your inputs for search and give you corresponding search value list.
    Refer my blog, it will be helpful.
    [OVS Help in WDA|/people/shruti.rathour/blog/2008/05/05/ovs-help-in-web-dynpro-abap]
    Thanks.

  • Providing Default values to Select-Options in WD ABAP

    Dear Experts,
    Using reusable component  WDR_SELECT_OPTIONS im able to create select-options successfully ... I need your guidance to provide default values(type date) on the same select-options.
    Thanks a lot.
    Regards
    Siva Mandapudi.

    I do not see the relevance of this thread to FPM. Please follow this thread for your solution.
    [Default the value in  Parameter in wdr_select_options|Default the value in  Parameter in wdr_select_options]

  • How to pass the low value and high  values for select options.

    Hi,
           In selection screen I want to display the first date, last date of this month as a default value in low and high fields.  Please exaplain me how.
    Thanks and Regards,
    Surya

    hI,
         Very thanks ,
            I  did it what u said now. but those contents does not displaying on the screen.
    In this order I write the code. Please explain me
    SELECT-OPTIONS s_date FOR likp-wadat_ist.
    DATA  BEGIN TYPE wadat_ist.
    DATA LAST TYPE wadat_ist.
    initialization.
    s_date-low = BEGIN.
    s_date-high = LAST.
    at selection-screen output.
    CALL FUNCTION 'HRWPC_BL_DATES_MONTH_INTERVAL'
      EXPORTING
        datum                =  SY-DATUM
        month_pst            =  '0'
        month_ftr            =   '0'
    IMPORTING
       BEGDA                =  BEGIN
       ENDDA                =   LAST
    EXCEPTIONS
      INVALID_VALUES       = 1
      OTHERS               = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Multiple default values for Selection type variable

    Hi all,
    I am using Bex 3.5. I have a fundamental doubt while creating a User Entry, Selection Option, Optional type variable.  I am trying to include multiple single variables in the default section, but it accepts only one. Is it possible to add multiple default values to the variable so that they show up in the selection screen when we run the report via Bex Analyzer ?
    Thanks for the inputs !
    Regards
    Snehith.

    Hi,
    In one of my bi7 reports, i remember i have given multiple default values in a single variable. For example i wanted to have multiple material types in my selection screen.
    But i have to check out the type of that user entry variable.
    Hope the above reply was helpful.
    Kind regards,
    Ashutosh singh

  • Dynamic Values for Select Option

    Hi, 
      My requirement is that i have to set
      yesterday for the low range of select option
      and today for the high range.
      I tried the selection variables and found that
      only low range can be specified in the
      selection variable.
    Thanks,
    Siva

    Hi,
    You mean default display variant.
    Then try this.
    data w_variant TYPE disvariant.
    PARAMETERS P_LAYOUT LIKE DISVARIANT-VARIANT.
    INITIALIZATION.
    *Get Default display variant
    PERFORM F100_DISPLAY_DEFAULT_VARIANTS.
    FORM f100_display_default_variants.
      w_variant-report   = sy-repid.
      w_variant-handle   = c_handle.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save        = 'A'
           CHANGING
                cs_variant    = w_variant
           EXCEPTIONS
                wrong_input   = 1
                not_found     = 2
                program_error = 3
                OTHERS        = 4.
      IF sy-subrc EQ 0.
        p_layout = w_variant-variant.
      ENDIF.
    ENDFORM.

  • Define default value for Select List

    Hello,
    I have an Item on the page, which is a Select list
    And I have a LOV associated with this item, which is a database query.
    How do I make one of the values of this LOV to be a default value of this Select list?
    I need this value to be displayed first, instead of a Null value.
    Thanks!

    That's right - use the Default value area of your Item definition.
    Have a look at this post:
    Re: previous selected option as default value
    May be you will find it useful...

Maybe you are looking for

  • Report Output in PDF using htmldb_example.xslt yields blank page; commas

    I am able to generate a PDF file from a given region using FOP (Formatting Objects Processor). The file that is produced in the Adobe reader produces a nice report with a header and footer region. However, there is always a blank page (containing the

  • External number range in equipment

    Hello! I want to create a number range in equipment which contains letters, numbers, symbols. For example equipment numbers like: A125D-6 1-DSDV tHANK YOU!

  • Email -  settings for gmail on iphone; Gmail or Exchange?? what's the dif??

    hey there, can anyone itemize the differences between using Exchange for GMail, versus just using the GMAIL setup for email on the iphone4? In the past i have had IMAP and GMAIL, and the single exchange.. NOW I am using exchange for access to all my

  • Batch change dates - question?

    Can batch change (or some other app) change the date of the first pic in an event and then simply adjust ALL other pic dates by the 'change delta' you adjusted the first pic by? I just did a batch change and every pic in the event now has same date/t

  • MB1B and SM35

    I recorded a tranaction and created a BDC program that calls the session in SM35 to execute it immediately.  The problem is that I'm having "no batch input data for screen SAPLKACB 0002" error. I just copy the recording to my program and it seems ok.