Setting a default value for SQL based LOV

Hi There,
Is there a way to set the default value in an LOV. Like lets say the LOV gets distinct to_Char(date_field,'YYYY') from a table. I want that the highest year is the default value. Currently, since I have the null option also, when the page loads, the lov is always null. I need to change it manually.
Thanks,
Sun

You can easily set the dynamic item defaults
http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_item.htm#HTMDB28287
for example select the default type as PL/SQL Function Body and enter the following code
declare
v_return date;
begin
select max(date_field) into v_return from your_table;
return to_Char(v_return,'YYYY');
exception when others then
return null;
end;

Similar Messages

  • SRM 4.0- How to set the default values for product type (01) only for SC

    The radio button “Service” should not be visible.
    Also for search help (e.g. search for internal products) where a search should only be possible for product type 01 (goods). The system should not display the product type and internally always search for goods only.
    How to set the default values for product type (01) only for SC
    We needs to use Search help BBPH_PRODUCT which having parameter PRODUCT_TYPE
    Here we can set defalut value 01 but it is not correct one since same search help is using several places.
    We need to limit the search help results only for SC.
    Kindly help out me ASAP.

    The easiest way to set defautl values is to edit the batch class.
    Goto the characteiristic and go to update values.
    In here you probably have something like 0 - 100 as a spec range.
    On the next line enter the default value within this range.  At the end of the line, click in the box in the column labelled "D".  This indicates the defautl value for the characteristic.
    If you need to you can do this in the material classification view as well.
    Just to be clear, these values will only show up in the batch record.  You can not have defautl values in resutls recording screens.
    FF

  • How to set a default value for particular field in SRM PO Portal

    Dear Gurus,
    Im desparetly need a help in web dynpro on how to set a default value for a field(flag) in PO header tab in portal.
    My requirement is whenever the user press the edit button in PO screen,automatically a flag field should be set as abap_false.
    I dont think this will handle in check badi or change badi. i tried this part in onbuttonpressed overwriteexit in CNR_VIEW views,i can get the function EDIT in debugging mode,but dont know how to proceed further.....
    Many of them suggested to go with get attribute and set attribute for changing any particular field in web dynpro,but im not very familiar in using those get and set attributes.I request you people can give me sample code on how to identify my target field in the node and set the values while pressing EDIT Button.
    Thanks in advance...
    Regards,
    Sathish

    Dear Laurent,
    Thanks for your response,
    But i searched in enhancement spot of WD_BADI, but couldnt get the exact way to change the coding,
    My real requirement is, that particular flag should be enable and disable dynamically by checking a condition in my header values.So in that case i dont know how to proceed further to handle in the PO screen.
    Kinly guide me how to get the particular node of field in the Purchase order screen.
    Thanks you in advance,
    Sorry for the inconvenience if any
    Regards,
    sathish

  • How to set the Default values for Info Objects in Data Selection of InfoPac

    Hi All,
    Flat file Extracion:
    How to set the Default values for Info Objects in Data Selection Tab  for Info Package
    ex: Fiscal Year Variant  Info Object having values 'K4' 'Y2' etc  in Flat file
    Initially  default value(not constant)  for this info Object value should be 'K4'  in Info Package
    If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
    Rgds,
    CV

    Hi,
    suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
    haritha

  • Set a default value for a radio button populated with a List of value

    Hi,
    I am using jdeveloper 11.1.1.3.0. I need to set a default value for a radio button populated with a List of value(Yes/No). Here's the selectonechoice code.
    <af:selectOneRadio value="#{bindings.Code.inputValue}"
    label="#{bindings.Code.label}"
    required="#{bindings.Code.hints.mandatory}"
    shortDesc="#{bindings.Code.hints.tooltip}"
    id="sor1" autoSubmit="true"
    valuePassThru="true" layout="horizontal">
    <f:selectItems value="#{bindings.Code.items}" id="si1"/>
    </af:selectOneRadio>
    I want to have the selectonechoice set to No by default. In the previous versions, I set the default value in the base attribute VO. But it is not working in the new version.
    Thanks

    Hi,
    this should work in JDeveloper 11.1.1.3 the same as in 11.1.1.2. If it doesn't then it is better to file a bug than to work around it
    Frank

  • Can we set a default value for the container variable in BPM?

    Can we set a default value for the container variable.?
    Suppose if i have a loop step and i have given a container variable i=5 as end condition.What value will it take during its first execution?Can we set the value for container before a recieve step?

    Hi
    Define Container Variable of Type integer and Category Simple Type .Use Condtion in Loop.
    In Container Operation Step Assign value and Use Expression to
    Increase or Decrease Valus according to your operation.
    look Pattern 4 in this blog to understand Container Operation
    /people/sharathchandra.girmaji/blog/2008/09/11/bpm-with-patterns-explained-part-1

  • 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

  • Setting up default value for POV in Financial Reporting Studio

    hello
    We need to Set up default value for POV in Financial Reporting Studio. For example, we need period to pick up Sep as default value when we run the report.
    Is there any way we could do this???
    Regards
    Neha

    Hi Neha,
    Yes, there is a way to setup of your grid POV. Take a look at this: http://download.oracle.com/docs/cd/E12825_01/epm.111/fr_user/127.html
    Cheers,
    Mehmet
    p.s. Please mark the answers helpful or correct, if they've helped you or answered your question. Thanks!

  • How to set a default value for a drop down list box and then apply cascading based on the default value in Infopath 2010.

    Hello Everyone
    I have two drop downs. Both are coming from look up fields from two lists. i want to set a default value(first list item) for the first drop down list box and then apply cascading based on the default value for the next drop down list box. I found one article(http://www.bizsupportonline.net/infopath2010/display-first-item-drop-down-list-box-infopath-2010.htm)
    where in i can set a default value but i can't apply cascading based on that default value. Any suggestions would be highly appreciated.
    Thanks
    Ramanjulu Naidu N

    Hey Ramanjulu,
    Take a look at the below article which I believe will answer your question.
    http://basquang.wordpress.com/2010/03/29/cascading-drop-down-list-in-sharepoint-2010-using-infopath-2010/
    Daniel Christian (MCTS)

  • Setting a Default Value in SQL Query Report

    Hello:
    We are using a SQL Query Report to provide a mass update to a table. We are using the apex.collection and having it display a number of records in a SQL Query Report for mass update. We have 14 columns in the report, for which the first 11 are populated via the collection. The remaining 3 are open for input but the individual making the updates. We've were able to provide a default value for 2 of the remaining 3 columns using a named LOV's - however the fourth column we would like to default a sysdate - but we are not successful.
    We've attempted many things but none seem to work, including adding that column to the collection and assigning it a default sysdate value. We've also tried changing the settings in the report attributes --> Tabular Form Elements by setting the Display as to: Datepicker, Default type to PL/SQL Expression and setting the default to sysdate. We've also tried caputuring a date on the previous page and loading it onto the report page and trying to default the date column to a page item default.
    I'd appreciate any help.
    Thanks
    FYI - we are using version 3.2

    use as default
    to_char(sysdate, 'dd/mm/yyy') where the format is your application or item date format

  • How to set a default value for a page item

    I am working with a facility table that has name and address information. The user can add contact name information on a separate page. Since the address for the facility and contact is usually the same, I want to add a default value for the contact address. The facility page is on 201 and the link to add a new contact row is on page 202. I showed in the default value :P201_street for the contact's address. But, when I run the page, the contact address field shows the :P201_street, not the actual facility address. What am I leaving out? Must be something obvious?!
    Thanks very much.
    Judy

    In the default value, I showed: v('P201_STREET1') with the default value type of: PL/SQL Expression and received the following oracle error ==> Item default is not a PL/SQL expression. Use &ITEM syntax. The v('ITEM') syntax is not valid for item defaults. So I changed it to: &P201_STREET1 and got another oracle error , ERR-9132 error in PLSQL expression for item default code, item=P202_STREET1.
    Any more suggestions? Thx.
    Judy

  • 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

  • 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

  • Setting a default value for DropDownByIndex UI

    I have a drop down by index UI element which gets its values from a table.  i need to set the default value to 'Select a State' or something like that.  How do i do it? 
    Thanks,
    Lathika

    Hi Lathika,
    Please follow these links:
    To set default value as blank  in drop down by index
    and
    Re: Value of RFC in Dropdownbykey
    Also, try this solution:
    that means you have to set at design time,
    to set default drop down value you will have to set the value for particular attribute (which is linked to the dropdown element) in the context
    like
    wdContext.currentContext<nodeName>Element.set<FieldName>(<default value>)
    This generally done in Initialization method of the controller
    Thanks,
    Raj.
    Message was edited by: Raj

  • Unable to set the selected value for a ADF LOV

    Hi,
    I am developing an application using jdeveloper 10.1.3 and Struts.
    I have created a ADF LOV on my JSP Page as given below:
    <html:select property="lob" onchange="javascript:selectLOB(this.form)">
    <html:optionsCollection label="prompt" value="index" property="lob.displayData"/>
    </html:select>
    When i submit the form, i am able to get the value of the selected Value in the List.
    JUCtrlListBinding listBinding = (JUCtrlListBinding) formBean.get("Lob");
    Row r = (Row) listBinding.getSelectedValue();
    String SoLob = (String) r.getAttribute("LobLob");
    But i am unable to set the selected value back in the list when i return to the form again.
    I tried the following:
    int x = listBinding.getSelectedIndex();
    listBinding.setSelectedIndex(x);
    It would be really helpful if some one could let me know what needs to be done.
    Thanks,
    Subashini

    Gyan,
    I tried with the code you suggest , its trying to set the value of a field, but my requirement is to change the property for
    "Rendered" on the field so that based on search parameters we can hide result table column.
    After searching online, I modified the controller code as follows
    1.Created a new transient attribute (Testrender) with type "Boolean" and always updateable.
    2.changed the "Rendered" property value on the field I want to hide as ${oa.PoSearchVO1.Testrender}.
    3. Modified the controller code as follows :
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            OAViewObject testvo = (OAViewObject)am.findViewObject("PoSearchVO1");
            OADBTransaction txn = am.getOADBTransaction();
            if (testvo != null)
              OARow row = (OARow)testvo.first();
                if (a.equalsIgnoreCase("Approved"))
                     row.setAttribute("Testrender", Boolean.FALSE);
                else
                     row.setAttribute("Testrender", Boolean.TRUE);
            } But now when i run the page and populate the search field and click "Go" its hiding the field but throwing the following error and the search results are also bad.
    Its using only the value of one search parameter but not the second one .
    The search cannot be executed because the table has pending changes that would be lost. I think the vo is getting dirty when I update the transient attribute value. So I used txn.rollback ,then search is working fine but its not hiding the field.
    So can you please let me know how to proceed from here ?

Maybe you are looking for

  • IMac external monitor not working after lion upgrade

    Hi, I have had an external monitor hooked up to my 09' imac for over a year now. I upgraded to Lion and ever since then it hasnt worked but one other random time when I moved and hooked everything back up. Im very tech savy, but this just doesnt make

  • Require assistance in Interactive Report based in APEX 3.2

    Hi All, Thanks in advance I have created editable Interactive report based on Form with report . once report created , I have modified query with the column named TempNetto ,Temp Brutto .. Below is the query select "IDSUB", "JAHR", "IDMITARBEITERLIST

  • Image links broken when creating a page from template

    I have created a page in dw cs4 and saved it as a template. I have a navigation bar in a div tag. The image renders great in the template. I save the template. I go to File>New>PagefromTemplate and choose the template. I save the page as index.html.

  • Planning profile MDP6/MDPH and MD 61

    dear sir can i have many planning profiles for a material? if so let us say i have two planning profile P1 and P2 in MD 61, demand management t code while creating demand for a material say A with quantity 10, sap is taking a planning profile (first

  • Why is Creative Cloud hanging in Home, Files and Fonts?

    The Creative Cloud desktop app (Version 1.1.1.220, released on 8/20/2013), running on OS X v10.8.4, hangs completely in its Home, Files, and Fonts sections. The Apps tab works fine, and I'm able to update existing and install new apps ; Behance works