How to make default values in selection field?

hi,
      i have selection field date , using data element 'QENTST' using following code in view INIT Method. i get the input selection field when i test application.
DATA: LT_RANGE_TABLE TYPE REF TO DATA.
CALL METHOD WD_THIS->M_HANDLER->CREATE_RANGE_TABLE
  EXPORTING
    I_TYPENAME                     =     'QENTST'
  RECEIVING
    RT_RANGE_TABLE           =     LT_RANGE_TABLE.
CALL METHOD WD_THIS->M_HANDLER->ADD_SELECTION_FIELD
  EXPORTING
    I_ID                                     = 'QENTST'
    IT_RESULT                         = LT_RANGE_TABLE
    I_OBLIGATORY                 = ABAP_TRUE.
What i need now , to make default value in this selection field( low = sy-datum and high = sy-datum + 10 ) . I have checked , i found one method called... SET_RANGE_TABLE_OF_SEL_FIELD. Bt i m not able to understand how to assign values to input table parameter in this method?
Thanks In Advance.
Saurin Shah

Hi,
Refer this Article by Thomas on how to make default values in Select Options:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60474842-91ca-2b10-3390-d2fd30f335fd
I hope it would solve your problem.

Similar Messages

  • How to set default value to input field dynamically

    Hello Experts,
    I am using adobe forms inside Webdynpro Java.
    Adobe form is having few input fields where at run time i want to assign default value to those fields.
    How can i do it ?
    Thanks in advance,
    Vinay
    Edited by: VINAY on Feb 24, 2011 6:39 AM

    Hi Mate,
    Just set the value to the webdynpro context fields on view init.
    if its like that will override the values entered by use on the form.
    just check if the default value is equall to the field value if yes leave it, if not dont touch that field.
    does this make sense...?
    Cheers,
    Sai

  • How to get default values on selection screen(multiple ranges)?

    i want to know how to maintain default ranges in selection screen...like 2000 to 3000 and 7000 to 8000 and 11000 to 15000
    all the above ranges must get by default how to provide those to selection screen by default...please give me idea...with example...

    Hi Suresh,
    You can either use select-options or Ranges. If you want the selection screen to be displayed with allwoing user to enter values apart for the default ones use select options else use ranges. With ranges what ever values use hard code would be set and the end user will not be able to add any more values (or range of values).
    Simply write the following code
    tables : <name of the table from which the field belongs>
    select-options <fieldname> for <tablename>-<fieldname>.
    <fieldname>-sign = 'I'.
    <fieldname>-option = 'BT'.
    <fieldname>-low = '7000'.
    <fieldname>-high = '8000'.
    append <fieldname>..
    similiarly add all the ranges that you need to include as default and in your select statement use the IN operator inthe where clause to include the range.
    If using range replacethe select-option with the range statement.
    Thanks.

  • 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

  • Hello  Guru's,  How to setup default value to a field

    Hello Guru's,,
    will anyone guide me the procedure how to setup a default value to a field in mm01 SAP STD Transaction.
    example: material description  ' xxxxxxx ' , it should be constant for all materials.
    full points for the answer
    PV

    Hi,
    Pls look into it
    These are the way to set the default values.
    Step 1 :
    CONSTANTS : P_MAKTX TYPE MAKT-MAKTX VALUE 'DESCRIPTION'.
    STEP 2:
        SET PARAMETER ID 'MAT' FIELD 'DESC'.
        CALL TRANSACTION 'MM01' AND SKIP FIRST SCREEN.
    If it is useful reward points.

  • How to make default value of property "empty" with label "- Select -"?

    Hi,
    Is it possible to make the default value empty/null/blank, when one creates a new property in KM > CM > Global Services > Property Metadata > Properties?
    If I leave the default value blank, the dropdown menu turns empty, when the corresponding XML form uses the property. So how do I get around this problem?
    Regards,
    Martin

    Anyone?
    I guess the answer is not as simple as the question?

  • How to make default value in form input field disappear on user click

    I have an HTML input tag with a default value.
    How can I have that value disappear when user begins to type?
    Form is here:
    http://www.kardsbykaren.us/10pack.php
    Happy Holiday and thanks.

    Have a look here http://www.matiasmancini.com.ar/ajax-jquery-validation-html5-form.html
    Gramps

  • How to make default value in a drop down list

    Hi,
          I have created a drop down list using Selection-Screen code. I have three values in it. I would like to make one of the option as a default value. How to achieve it?
    I am working on module pool program. I have few screens as a part of my program. I have created print button on tool bar of one screen but that print button is appearing on the other screens too. How to avoid it?
    Help would be appreciated...
    Thanks
    Edited by: mohammed ibrahim on Oct 10, 2008 8:43 PM

    1) let drop down box be g_dd.
      if g_dd is initial.
      g_dd = option2.
      endif.
    2)
    by default same pf-status is used by all the screens in the same program
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status 'abc' excluding 'fcode_of_button'
    endif.
    or
    data: git_fcode type sy-ucomm with header line.
    git_fcode = 'fcode_of_button'.
    append git_fcode.
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status excluding git_fcode
    endif.
    Edited by: Amit Gupta on Oct 11, 2008 11:36 AM

  • How to set default value in one field depending on other field.

    Hi,
    I have one requirement.That is..One seede page having 2 field, one is Lov Input field and one more message choice filed.
    Requirement is after selecting value in Lov input field need to set one default value in to Message choice field. how to do this one.pls send any sample code for this requirement.
    Thanks in Advance,
    Hanimi...

    Hi,
    I used following code
    OAMessageLovInputBean lovbean=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("AssetNumber");
    OAMessageChoiceBean Choicevalue=(OAMessageChoiceBean)webBean.findIndexedChildRecursive("EamWrPriority");
    if (pageContext.isLovEvent())
    String lovInputSourceId = pageContext.getLovInputSourceId();
    if(lovInputSourceId.equalsIgnoreCase("AssetNumber"))
    if(lovbean!=null)
    String slovVal=(String)lovbean.getValue(pageContext);
    String prValue = getPRValue(pageContext.getApplicationModule(webBean).getOADBTransaction(),slovVal);
    //String prValue = "1";
    Choicevalue.setValue(pageContext,prValue);
    }// end of processFormRequest
    private String getPRValue(OADBTransaction con,String slovVal)
    // System.out.println("In WorkRequestDffCO.getContextValue.organizationID" + organizationID);
    String prValue = null;
    String sql = "select decode(ml.meaning,'AC1',1,'AC2',1,'AC3',3,'AC4',3,null) from FND_LOOKUP_VALUES_VL ml ,mtl_serial_numbers msi where ml.lookup_type = 'MTL_EAM_ASSET_CRITICALITY' and msi.ASSET_CRITICALITY_code = ml.lookup_code and msi.serial_number = 'slovVal' ; //'30AC-TR002B'"
    Statement st = null;
    ResultSet rs = null;
    try
    st = con.createStatement(1);
    rs = st.executeQuery(sql);
    if(rs.next())
    prValue = rs.getString(1);
    catch(Exception e)
    e.printStackTrace();
    finally
    try
    if(st != null)
    st.close();
    if(rs != null)
    rs.close();
    catch(Exception e)
    e.printStackTrace();
    return prValue;
    Query is executing but no value is retuning, if i use hard coded value in where condition like '30AC-TR002B' it is tt's returning value .

  • How to make default value for region based on city?

    Dear Experts,
    When city is selected in TRIP or PR05, how to make the default value of city based on region?
    The standard search help givenfot citydoesnt contain any enhancement point?
    Pls suggest how to resolve this!!!
    Thanks In Advance
    Rgrds,
    Sravan

    Hello Sahil
    Account and CC/PC are 2 different entity types. For PC and CC there is dependency. First you have to load Cost centers and then load PC.
    For CC - load CC master data first. Then load hierarchy file then group file and finally assignment file.
    Follow same process for PC.
    GL you can load independently but you have first load group GL then operational GL and then GL at company code level,
    Kiran

  • How to set default values to these fields

    Hello,
    I'm new with UCM 11g, and i need to add default values to fields, for example to these fields:
    Type -> Document should be the default and not editable value
    Title -> Should be the name of the file i'm checking in
    Security Group -> it's default and not editable value should be Secure
    How do i set these default values ??
    Regards
    Carlos

    Security Group and Document Type can be defined in your profile (as default values using dprDefaultValue - see e.g. Re: simple profiles and defaulting ). You can also define those fields as 'hidden' or 'info only'
    Title with the name of file is a bit trickier - you cannot define it up-front as you don't know what file will be chosen, do you? You can, however, use a global rule where you can fill in dDocTitle with the value in dOriginalName (or somehow process it, if you will).

  • How to make default value for controlling area for MDG-F 7.0

    how do we default certain pre-defined values for few fields? e.g. controlling area or company code for MDG finance?
    Thank you in advance.
    SP

    Hello Sahil
    Account and CC/PC are 2 different entity types. For PC and CC there is dependency. First you have to load Cost centers and then load PC.
    For CC - load CC master data first. Then load hierarchy file then group file and finally assignment file.
    Follow same process for PC.
    GL you can load independently but you have first load group GL then operational GL and then GL at company code level,
    Kiran

  • How to make default values for date range?

    Dear Colleagues,
    My customer is asking for a default value for a date range prompt.
    The FromDate should contain the 1st of current month, the ToDate should contain current date.
    Does anyone have any idea how I can meet this demand?
    Regards Silje

    Hi Federico,
    Thank you for the answer, we are back to the challenge after summer vacations!
    I have created a variable in the universe: SELECT current date  as TODAY FROM SYSIBM.SYSDUMMY1. I Called it TODAY.
    Then I created a prompt in the query based on Date. In Prompt Properties I tagged for "Set Default Values" and I typed in TODAY.
    When I try to run the query I get the error message:  The date for the query filter based on 'Date' is invalid (WIS10704).
    What is wrong? What do I have to do differently?
    My goal is to have a default for Date that gives me today..
    Regards Silje

  • How to set default value to input field

    Hi Experts,
    I need to set default value to one input field for the transaction crmd_order as a screen variant. Guide me in doing that.
    Regards,
    Harish

    Using the transaction SHD0, you can define the screen variant. While defining the sceen variant, you are allowed to define the default values.
    Using screen variant, for the main transactoin, you can also define the transaction variant and you can use this as an independent transaction.

  • How to Make one of 2 Selection Fields Obligatory

    Hi All,
    On my seletion screen, i have about 5 select-option input fields. The thing is I want to make the 'article' (s_matnr) and the 'merchandise category' (s_matkl) fields obligatory. The way it should be is that one of them should be obligatory at a time not the 2 at the same time. And 1 of them must be filled they can't be run wide open.
    So in Summary, the user must either provide an input for either the ariticle or the merchandize category, not the 2 at the same time and not neither.
    Thanks.

    hi basil
    how you did

Maybe you are looking for

  • Uninstalling iTunes

    I have PC operating on Windows XP and have continual problems with iPod nano purchased a week ago. I want to uninstall iTunes and start over, but running Remove Program gets error 1603 "fatal error during installation". Get same error when i tried st

  • Need configure wifi, but adobe air cd won't install, why?

    Am trying to configure wifi after installing new motorola wireless modem sbg901 and am trying to run the cd wifi instrux. It asks to install Adobe Air, but it won't install. Why can't I install Adobe Air?

  • Last night I started a new ipad2  today the sirus is gone the app store app is gone and the photo app is gone

    last night I opened the ipad 2 it worked fine today the seri does noe work the app for taking a photo does not exist nor does photoshop and the app store app is gone as well

  • Apps don't start anymore...

    I have an iPad1 which I use for over a year already without any issue. However today I have an issue starting Appss I have installed on my iPad. They start and immediatly stop...  Safari, Mail, Photos, Agenda etc...does still work.... Any idea what t

  • HELP! My toolbar is missing and it won't come back!

    Hi! I accidentally deleted the place where you type the website in as well as the back and forward buttons on my Safari screen, and I can't seem to retrieve them. I've been looking at solutions that say "Go to View- customize toolbar", but nothing ha