Select list on calendar years

I want to create a select list on calendar years, say from 2000 til date. It must be dynamic, that is each new year the year must automatically be added.
How do I do that?
Elsie

Sorry Elsie,
didn't test the query in APEX, seems that it's a little picky with connect by. The following statement works
SELECT TO_CHAR(YEAR) AS D
     , TO_CHAR(YEAR) AS R
  FROM ( SELECT 1999+LEVEL AS YEAR
           FROM DUAL
        CONNECT BY LEVEL <= TO_NUMBER(TO_CHAR(SYSDATE, 'YYYY')) - 1999
ORDER BY YEARPatrick
Check out my APEX-blog: http://inside-apex.blogspot.com

Similar Messages

  • Multi-Select prompt for Calendar Year range of values

    Hi All,
    I three prompts and one of them is a Multi-Select i.e Calendar_Year as i the user can select a range of years or random years like 2005,2008,2007 or 2005-2007. What do i need to do in the report so that the report(pivot table) can display the data accordingly. Presentation Variable is not possible as the option goes off when i select the multi-select, i using Guided Navigation in my report.
    Thanks in Advance for the help

    Where did you enter this code?SQL Results
    You mean Default to/SQL Results? YES
    Could you post your NQQuery.log (just filter)? -
    RqList
    S&OM - CUSTOMER MASTER.CUSTOMER_NAME as c1 GB,
    SALES DATA:[DAggr(CIC.SALES DATA by [ S&OM - CUSTOMER MASTER.CUSTOMER_NAME, S&OM - CUSTOMER MASTER.FRDW_CUSTOMER_NUMBER, CIC.CUSTOMER_NUMBER, CIC.CIC_LOV as c2 GB,
    CIC.CUSTOMER_NUMBER as c3 GB,
    left(cast(CIC.CALENDAR_YEAR as CHARACTER ( 30 )) , 4) as c4 GB,
    CIC.CIC_LOV as c5 GB,
    S&OM - CUSTOMER MASTER.FRDW_CUSTOMER_NUMBER as c6 GB
    DetailFilter: topN(SALES DATA:[DAggr(CIC.SALES DATA by [ S&OM - CUSTOMER MASTER.CUSTOMER_NAME, S&OM - CUSTOMER MASTER.FRDW_CUSTOMER_NUMBER, CIC.CUSTOMER_NUMBER, CIC.CIC_LOV , 10 at_distinct [ S&OM - CUSTOMER MASTER.CUSTOMER_NAME, S&OM - CUSTOMER MASTER.FRDW_CUSTOMER_NUMBER, CIC.CUSTOMER_NUMBER, CIC.CIC_LOV ) <= 10 and left(cast(CIC.CALENDAR_YEAR as CHARACTER ( 30 )) , 4) >= '2009'
    OrderBy: c2 desc
    Thanx                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Selective deletion based on Calendar Year/Month in process chains

    Hi all,
    I have a requirement from the business wherein I have to delete the past months data before I load the same data into 6 infocubes using a process chain.
    I checked the forums to understand how selective deletion is used in a process chain and I have come to know that RSDRD_DELETE_FACTS program or DELETE_FACTS Tcode can be used to generata a G* program that performs the deletion.
    I am to integrate this generated program in my process chain. I have 0CALMONTH(Calendar Year/Month) as the time characteristic in all my infocubes and therefore the only time characteristic available for selective deletion.
    My problem is that I am unable to create a dynamic selection for the Calendar Year/Month such that it takes the previous month.To be exact I am unable to use the "D" option in the Selection Variable column for this characteristic.
    Please can somebody help me out with this.

    Hi,
    Use this ABAP program code in your Process Chain...
    Type Pools
        TYPE-POOLS: rsdrd, rsdq, rssg.
    Local Internal Tables
        DATA: lit_msg     TYPE rs_t_msg,
                    lit_sel     TYPE rsdrd_thx_sel.
    Local Work Area
        DATA : lwa_sel_kf1     TYPE rsdrd_sx_sel,
                   lwa_range_kf1  TYPE rsdrd_s_range.
    Local Constants
        CONSTANTS :    lc_i(1)      TYPE c  VALUE 'I',
                                 lc_x(1)      TYPE c  VALUE 'X',
                                 lc_eq(2)     TYPE c  VALUE 'EQ',
                                 lc_kf1(11)   TYPE c  VALUE '0CALMONTH'.
        CONSTANTS :   lc_cube      TYPE rsddatatarget VALUE 'Z_C21'.
    Delete Existing cube records
    Key Field 1 (CALMONTH)
          lwa_range_kf1-sign    = lc_i.
          lwa_range_kf1-option  = lc_eq.
          lwa_range_kf1-high    = space.
          lwa_range_kf1-keyfl   = lc_x.
          lwa_range_kf1-low     = <Value of CALMONTH>.
          APPEND lwa_range_kf1 TO lwa_sel_kf1-t_range.
          CLEAR  lwa_range_kf1.
           lwa_sel_kf1-iobjnm = lc_kf1.
          INSERT lwa_sel_kf1 INTO TABLE lit_sel.
          CLEAR : lwa_sel_kf1.
    Selective Deletion through FM
          CALL FUNCTION 'RSDRD_SEL_DELETION'
            EXPORTING
              i_datatarget      = lc_cube
              i_thx_sel         = lit_sel
              i_authority_check = space
              i_mode            = lc_c
              i_no_enqueue      = lc_x
            CHANGING
              c_t_msg           = lit_msg
            EXCEPTIONS
              x_message         = 1
              inherited_error   = 2
              invalid_type      = 3
              OTHERS            = 4.
          IF sy-subrc = 0.
            REFRESH : lit_sel[],
                      lit_msg[].
          ENDIF.
    Thanks,
    Saru

  • Calendar Year variable is not showing listed values

    Hi,
    I have a query which I am running based on the standard variable ( 0CALYEAR ) input. When I run first time it shows the list of values in the selection editor and displays the result. But after executing when I am trying to change filter values in the output, it doesn't show list values as well if I enter manually, I am not getting the result. I am getting out put no data available....
    I created new variables on 0CALYEAR info object, but same problem. My query structure is
    In rows I just defined Calendar Year / Month ( so that I can get all months for that user entered Year ).
    In Columns I defined one Key Figure.
    Thanks
    Ganesh Reddy.
    Edited by: Ganesh Reddy on Mar 8, 2012 8:39 AM

    Problem is resolved my self. Removed 0CALYEAR from Char Restrictions to Default.
    Thanks
    Ganesh Reddy.

  • Converting Year in YYYY format for return in select list

    Using Apex 4.1.1 on Linux (Apex Listener on glassfish)
    I have a table with week ending dates and use this table for as my LOV.
    The select list comes up like 12-SEP-12 when I check the value attribute in Firebug. Problem is that this comes up as year 0012 instead of 2012 when I try to use it in my PL SQL code to save it to a table.
    Is there a way I can get the return value for the year in YYYY format for return value in select list? Have tried to_date(dt, 'DD-MON-YYYY') with no luck.
    Cheers.

    All APEX session state values are held as VARCHAR2s. Explicit conversion to and from DATE values using specified formats is recommended. Convert to VARCHAR2 in the LOV query:
    select to_char(week_ending, 'DD-MON-YYYY') l, to_char(week_ending, 'YYYY-MM-DD') v from ...and to DATE in the PL/SQL process code:
    ...to_date(:p1_week_ending, 'YYYY-MM-DD')...I'm trying to standardise on using ISO 8601 representations for non-displayed date values. These are unambiguous, sort properly using character semantics, and are compatible with other systems and technologies.

  • Newbie: how to create a dynamic select list of the current date + 5 years

    Hi - I'm a JSP newbie (coming from a PHP background), and am trying to create a select list that contains the current year, plus 5 years. So, the list when generated (today), would display:
    2007
    2008
    2009
    2010
    2011
    2012
    Obviously, the code would need to generate inside the option tags, as well as in the value property of the option tag.

    function addit(){
              var val = 2012; //you can take this from js date object and strip it off
              for (var i=2007; i <= val;++i){
                   addOption(document.getElementById("mycombo"), i, i);
    function addOption(selectbox,text,value)
         var optn = document.createElement("OPTION");
         optn.text = text;
         optn.value = value;
         selectbox.options.add(optn);
    }without hardcoding:
    function addit(){
              var dd = new Date();
              var yearnow = dd.getFullYear();
              for (var i=yearnow; i <= yearnow + 5 ;++i){
                   addOption(document.getElementById("mycombo"), i, i);
    function addOption(selectbox,text,value)
         var optn = document.createElement("OPTION");
         optn.text = text;
         optn.value = value;
         selectbox.options.add(optn);
    in your jsp:
    <body onload="addit();">
    <form>
    <select name="mycombo">
    <option> Select year</option>
    </select>
    </form>
    </body>
    Message was edited by:
    skp71
    Message was edited by:
    skp71

  • AHow long does the Cloud hold info on the calendar? I am unable to see appointments listed on calendar in previous calendar year. Is there a way to access those appointments or should I have printed them at the end of each calendar year?

    How long does the Cloud hold info on the iPad2 calendar? I am unable to see appointments listed for previous year (2011). Is there a way to access these appointments? If so, how would I do it? Or should I have printed a hard copy for my record keeping?

    > How long does the Cloud hold info on the iPad2 calendar?
    As far back as you tell it to in Settings > Mail, Contacts, Calendars > [Scroll down to Calendars] > Sync > [Choose how far back to sync]

  • Addition of a new field "Leave Details" in the LTA screen with dropdown val-ues from Infotype 2001 subtype ITEL. From the current calendar year in ESS

    Hi Experts,
    we are using portal 7.3 version,Our requirement  is addition
    of a new field “Leave Details” in the LTA screen with dropdown values from Infotype
    2001 subtype ITEL. From the current calendar year in ESS.The new field should
    be available only for the claim type LTA claim or claim against advance.
    please find the below screen shot and details.
    Current View
    Component: HRESS_CLMS_WD_EMCR
    Personalization: 4370750342A6297CC184E2B07FE6D13E
    Window: W_CLM_DYN_UI
    View: V_CLMS_DETAIL
    Application Component: PY-XX-RS
    Kindly help me how to add this field and in which method can i implement code.
    Thank you in advance
    Regards,
    Vanitha

    Hi Shankar Reddy,
    Business requirement is  the new field  should display the list entry in Infotype 2001 for the calendar year as selection option for employee. they would like to know ITEL subtype claim,
    Example.employee no: EE#9941
    As per screen shot you may see for EE#9941 there are 2 Leave requests.
    So in the leave details the selection drop down menu option or any other way  should be display 2 lines.
    Regards,
    Vanitha

  • List on Calendar

    What happened to the list magnifier on the calendar for iPhone 5C.  I lost it and I don't know how to get it back any suggestions?

    Sorry Elsie,
    didn't test the query in APEX, seems that it's a little picky with connect by. The following statement works
    SELECT TO_CHAR(YEAR) AS D
         , TO_CHAR(YEAR) AS R
      FROM ( SELECT 1999+LEVEL AS YEAR
               FROM DUAL
            CONNECT BY LEVEL <= TO_NUMBER(TO_CHAR(SYSDATE, 'YYYY')) - 1999
    ORDER BY YEARPatrick
    Check out my APEX-blog: http://inside-apex.blogspot.com

  • In Ical, can you print a list view calendar without notes?

    In Ical, can you print a list view calendar without notes?

    cj,
    After selecting Calendar>File>Print...> I am presented with a Print selection pane which offers among other choices, a "List" selection:
    What do you see?

  • Quota credit on 1st of calendar year for existing employees and for new joinees on prorata basis

    Dear All,
    we are having an issue in quota generation, where casual leave quota should get credited on 1st of every calendar year and for mid month joiners on prorate basis. If we select calendar year it is crediting on 31st of calendar year, but we need it to be credited on 1st  of January and also checking the prorate condition for new joiners.
    So please guide on whether it is possible through standard or any work around solution. If so how can it be achieved.
    Thanks
    Vijaya

    Hi,
    check this one prorate basis -
    http://scn.sap.com/docs/DOC-52928
    for you quota on 1st day of calender year, check the settings in the table V_T559L
    - Validity/deduction interval
    - Validity period for default values
    Best Regards.

  • Report with select list and link to call another report

    Hi,
    I am trying to do 2 reports (REPORT1 and REPORT2).
    The first is a summary report (REPORT1).
    This report will display sales figures for the year. Now, I need to have a select list in the result set that will have 2 options, depending on which option is chosen, I want to call REPORT2 with the select list as a parameter. How can I do this ?
    Let me try to explain what I did.
    I created REPORT1 on Page 100
    SELECT YEAR, sum(YTD_SALES), APEX_ITEM.SELECT_LIST(1,'DEPARTMENT','Department;DEPARTMENT,Division;DIVISION') Drilldown FROM SALES_ANALYSIS WHERE YEAR > 2000
    GROUP BY YEAR ORDER BY YEAR
    I created 2 hidden items namely P100_YEAR and P100_DRILLDOWN
    I also made the column YEAR as a link and specified both P100_YEAR and P100_DRILLDOWN as parameters to be passed.
    Next, I created REPORT2
    SELECT YEAR, DECODE(:P100_DRILLDOWN, 'Department', department, 'Division', Division) dept_div, sum(YTD_SALES) ytd_sales
    FROM SALES_ANALYSIS
    WHERE YEAR = :P100_YEAR
    When I run Report 1, it's fine, when I choose either Department or Division from the Select List and click on the link to call Report 2, report 2 is displayed, but the value being passed for P100_DRILLDOWN is not correct and as a result, I am unable to get correct results for Report 2
    Am I missing something ? Are there any alternate ways to do what I'm doing ?
    Thanks,
    Ashok

    Hi Ashok,
    The link definition will not know the value selected in the list as it is constructed only when the page is being rendered. You would need to create some javascript to handle this. I've done that here: [http://apex.oracle.com/pls/otn/f?p=267:182]
    The link on the EMPNO column has been defined in the HTML Expression setting for the column instead of the Link section. The HTML Expression that I have used is:
    &lt;a href="#" onclick="javascript:doDrilldown('#EMPNO#',this);"&gt;#EMPNO#&lt;/a&gt;And, in the page's HTML Header setting, I have added in:
    &lt;script type="text/javascript"&gt;
    function doDrilldown(empno,group)
    var g;
    var p = group.parentNode;
    while (p.tagName != "TR")
      p = p.parentNode;
    var x = p.getElementsByTagName("SELECT");
    if (x.length &gt; 0)
      g = x[0].value;
    var url = "f?p=&APP_ID.:183:&SESSION.::::P183_EMPNO,P183_GROUP:" + empno + "," + g;
    document.location.href = url;
    &lt;/script&gt;When a link is clicked, the doDrilldown function is called passing in the EMPNO value and the "this" object (which identifies the object triggering the call). The function starts from that object and goes up in the HTML tag tree to the nearest TR tag (the row tag that the link is on) and then finds the first SELECT list item on the row and gets its value. It then constructs a URL using this and the EMPNO value and performs a redirect to the second page (page 183 in this example).
    Andy

  • Unable to view the Calendar Year/Month in the Query

    Hi All,
    We are having a standard query on Customer InfoCube 0sd_c01_q0003.
    I was able to get the data. But I am unable to view the Calendar Year/month. In that place I am getting '#'.
    I am able to view the details in the InfoCube. There aren't any errors while executing the error.
    Regards
    YJ

    hi,
    U r Problem is not clear...if u r getting # for characteristic values means..u don't have data in Infoprovider...try to view data in InfoProvider with the same selections that u r executing the Query with.
    thnaks

  • Can't print a list of calendar events?

    Unable to print a list of calendar events in recent update to iCal.
    Is there some way of doing this

    cj,
    After selecting Calendar>File>Print...> I am presented with a Print selection pane which offers among other choices, a "List" selection:
    What do you see?

  • How to print list of calendar events?

    Hi,
    I'm trying to print a list of events for a specific calendar that only lists scheduled events, not days with nothing scheduled.
    After a time consuming process of delselecting all calendars I DON'T want on the list, selecting the time frame (4 months) and that I want to print a list, the result includes every day of the months and if there isn't something scheculed, it says "no scheduled event." 
    However, this takes up space and is distracting.  I just want a list of dates that have an event scheduled.  Does this make sense?
    Also, does it make sense that there is a delay each time I de-select a calendar?  The colorful pinwheel somes on and spins for a few minutes before letting me de-select the next calendar.
    I am working on a Mac Book Pro, OS 10.9.1.
    Thanks!
    Anne

    That's not from Calendar, it's from Automator.
    Open Automator (in Applications Folder), Select Application (then once saved, you can just click the App to run a 4 month summary)
    In the left pane of Automator, you'll see the Calendar Actions, drag to the right pane, as follows:
    This is the workflow you want:
    1. Get Specified Calendar Items
    2. Filter Calendar Events
    3. Event Summary
    4. New Text File
    The report will look like this (I used my Holidays calendar):
    TOTAL EVENTS: 12
    EVENT 1 OF 12
    Summary:   Daylight Saving Time
    Status:        none
    Date:          03/09/14 to 03/10/14
    Time:          2:00:00 AM to 12:00:00 AM
    EVENT 2 OF 12
    Summary:   Saint Patrick’s Day
    Status:        none
    Date:           03/17/14 to 03/18/14
    Time:          12:00:00 AM to 12:00:00 AM
    EVENT 3 OF 12
    Summary:   Palm Sunday
    Status:        none
    Date:           04/13/14 to 04/14/14
    Time:          12:00:00 AM to 12:00:00 AM
    EVENT 4 OF 12
    Summary:   Passover
    Status:        none
    Date:          04/15/14 to 04/16/14
    Time:          2:00:00 AM to 12:00:00 AM
    etc....

Maybe you are looking for