In formula column - I am getting current year - but get numeric value error

Hello
I defined a formula column as folllows:
function CF_1Formula return char is
thisyear char;
begin
     select to_char(sysdate,'YYYY')
     into thisyear
     from dual;
     return thisyear;
end;
I get - Fatal Pl/Sql error. numeric or value error. What am I doing wrong here?

Or replace the whole thing with
RETURN to_char(sysdate,'YYYY');
saving a pointless round trip to the database.

Similar Messages

  • Get Current year in Query Designer

    Dear all
    I don't know how to determine current year in Query Designer.
    I have a report, i want to see some indexs in bance sheet and income statement in current year and previous year. but, I can only assign with the fixed year (ex, 2010), this is not flexible. I want to get current year on system and calculate previous year.
    Please help me solve this problem
    Thanks

    Hi,
    You can use the SAP Exit variable 0CALYEAR for current year. For Previous year you can offset this by -1.
    You can refer this link for more Information,
    http://help.sap.com/saphelp_bw33/helpdata/en/3f/89533e5ff4d064e10000000a114084/content.htm
    Regards,
    Hari.
    Edited by: Hari Krishnan K on Jul 20, 2010 10:36 AM

  • How to set current year,month as default value in combo box

    hi,  im newbie of xcelsius user
    i realize  that hv a issue that display combo box base on year & month
    let said
    <b><u>step 1</u></b>
    I create excel data like this
    <b><u>year___ </u>  </b>    |     <u><b>month_   </b></u> |     <u><b>Product</b></u> |     <u><b>revenue</b></u>
    02-04-09 |     02-04-09 |       a |     $4,154
    03-04-09 |     03-04-09 |       b |     $6,813
    04-05-09 |     04-05-09 |       a |     $9,875
    05-06-09 |     05-06-09 |       b |     $6,813
    06-04-10 |     06-04-10 |       a |     $6,813
    07-04-10 |     07-04-10 |       b |     $9,875
    08-06-10 |     08-06-10 |       a |     $9,875
    22-06-10 |     22-06-10 |       b |     $6,813
    <u><b>Step2</b></u>
    Then i go format cell to format/custom date to year & month
    Eg1: Year u2013>  02-04-09  convert to u2018YYYYu2019 (2009)
    Eg2: Month u2013>  02-04-09  convert to u2018mmmmu2019 (April)
    So output like this
    <u><b>year</b></u> |     <u><b>month</b></u> |     <u><b>Product</b></u> |     <u><b>revenue </b></u>
    2009 |     April |     a |     $4,154
    2009 |     April |     b |     $6,813
    2009 |     May |     a |     $9,875
    2009 |     June |     b |     $6,813
    2010 |     April |     a |     $6,813
    2010 |     April |     b |      $9,875
    2010 |     June |     a |     $9,875
    2010 |     June |     b |     $6,813
    But the problem is when i insert to combo box,use u201Cfilter Row u201D, i excpectation will display only 2009,2010
    But Actual display the Year  in combo box is duplicated :'(
    so any solution ? and then only how to set current year & month as default value  :'(
    thanks,
    regards
    s1
    Edited by: Leong Pui Kee on Feb 25, 2011 5:25 AM
    Edited by: Leong Pui Kee on Feb 25, 2011 5:36 AM

    hi,
    your created  data
    step 1
    I create excel data like this
    year___ | month_ | Product | revenue
    02-04-09 | 02-04-09 | a | $4,154
    03-04-09 | 03-04-09 | b | $6,813
    04-05-09 | 04-05-09 | a | $9,875
    05-06-09 | 05-06-09 | b | $6,813
    06-04-10 | 06-04-10 | a | $6,813
    07-04-10 | 07-04-10 | b | $9,875
    08-06-10 | 08-06-10 | a | $9,875
    22-06-10 | 22-06-10 | b | $6,813
    In this, year and month both are same data, make the diffent data like year  2009, 2010  And month Jan, Feb, March, ...Etc 
    and also one more check you formulas on month and year, select correct source data, destination data  for compoonent..
    OR
    from above, to create a date column and convert  date-->year, date--> month and Explore it.
    All the best,
    Praveen

  • No budget in the current year but the system is letting receipts go against

    We have a re-accuring issue where there is no budget in the current year but the system is letting receipts go against the budget. We need to know how this happens and a resolution as to how we can get it to stop.  We can't have purchases against projects that do not have a current year budget.
    PO created and delivery date has been in the month of Dec’07 and goods received / Invoicing in Feb’08 we don’t have budget for 2008 but when we check in 2007 we have current budget.
    How can I stop Posting in the current year even if PO has been created in Previous year?

    Hai,
    I also opinion same as Ashish.
    Budget availability will come alive when you create a PO. If Budget is available in year 2007, it will allow you to raise a PO. When you do GR, No cost postings happen. If you use Valuated Project stock, Qnty and value will sit in Project stock. To my knowledge, Budget availability will not check , cost in stock.
    Try and do the GI to project. See if it is throwing an error. Becoz when you do GI, actual costs gets posted. ( if you r using valuated project stock).
    Please let us know your findings.
    Thanks
    Saikishore Ganga.

  • Motherboard went in my g5 desktop so i go my hard drive extracted with all my data..I now have an ibook g4 laptop and am trying to get gb working but get this message: he Instrument Library is invalid. GarageBand expects a valid Instrument Library folder?

    Motherboard went in my g5 desktop so i go my hard drive extracted with all my data..I now have an ibook g4 laptop running off OSX 10.4.11 and am trying to get Garageband working but get this message: The Instrument Library is invalid. GarageBand expects a valid Instrument Library folder?

    Contact Apple Support:
    http://www.apple.com/support/contact/
    Apple - How to Contact Us:
    http://www.apple.com/contact/
    Be sure to refer to the repair ticket number.
    Sounds like a terrible mixup.
    Good luck & happy computing!

  • How to get Current Year

    Dear Friends
    I am writing a fast formula for medical reimbursement.
    My fiscal year start will be 01-mar every year and end date will be 30apr every year.
    Every year I need the current start date and end date like Accruals.
    Can anyone please suggest me how to get this input.
    Expecting your reply.
    Thanks
    Syed

    You will need something like this to achieve the objective
    Copying from pay_in_tax_utils.get_financial_year_start
    <div>
    if to_number(to_char(p_date,'MM')) >=4 then
    l_year := to_char(p_date,'YYYY');
    pay_in_utils.set_location(g_debug,l_procedure,20);
    else
    l_year := to_number(to_char(p_date,'YYYY')) -1 ;
    pay_in_utils.set_location(g_debug,l_procedure,30);
    end if ;
    pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,40);
    return (to_date('01-04-'||l_year,'DD-MM-YYYY'));
    </div>

  • When I get current user I get this info i:0#.w|(user name) that input the information into a list

     how would I removed the i:0#.w|  as I need to get this information in a  workflow email to send out to people, but  I dont want them to enter the
    i:0#.w|
    all I want them to enter is
    <domain>\<user name>
    but I can not seem to capture just the domain \username  using the Sharepoint Designer Workflow items.
    IS there a way to strip or remove that garbage in from of the user name? some how in a SPD workflow

    Hi,
    According to your description, my understanding is that you want to remove the i:0#.w| from the user name using workflow.
    As the prefix is fixed value, then I recommend to use the Extract Substring from Index of String action to remove the i:0#.w| from the user name.
    After that, use the variable which is used to store the rest string to update a column value(use another column in Single line of text type).
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Deleted some games, something happened and can't get firefox anymore, can get IE. Keep getting crash reporter but get no email or anything in response. Please help. I want FF, not IE

    I can open FF but all I get is a blank screen with FF logo on top left, and the minimixe-maximize, exit buttons on top left. Nothing else and it won't open. I done the crash reporter about 10 times and get no response at all, I don't think that it is getting to you. FF 4.0 Beta 12 is what I was using however, I can't get anything FF. I've tried doing it through the administrator, can't do it. I've uninstalled and re-installed and nothing happens. This has gone on for about 6 weeks and I've tried everything and nothing happens. The problem is so bad that I thought if I was stuck with IE, I would update to their current program and won't even do that. Help.

    Google ATI Firefox crash. You'll see ATI video cards have multiple problems with Firefox and also internet videos. Also, note the dates these problems occurred - many are 2011...

  • How can I get HyperTrend to display the numeric value output of a CHOOSE statement?

    I have non-linear values I need to display on a HyperTrend graph.  I'm currently converting the input raw signal to a Units (Engineering) value and then looking up the actual value (from a calibration chart) using a CHOOSE statement in order to display the actual value on a panel, but I need to display the values output by the CHOOSE statement on a HyperTrend graph, along with other similar values.
    How can I do this?

    I have non-linear values I need to display on a HyperTrend graph.  I'm currently converting the input raw signal to a Units (Engineering) value and then looking up the actual value (from a calibration chart) using a CHOOSE statement in order to display the actual value on a panel, but I need to display the values output by the CHOOSE statement on a HyperTrend graph, along with other similar values.
    How can I do this?

  • 5c not getting Yahoo mail (but getting Gmail fine). Tried adding/deleting acct and restarting but it didn't help

    Tried adding/deleting acct and restarting but it didn't help.
    Any assistance appreciated.

    Try hee:
    iOS: Device not recognized in iTunes for Windows
    The shuffle and iOS Devices like iPod touch use different drivers than other iPods.

  • Line Chart - Current Year Sales, Current year Returns, Last year Sales, Last Year Returns

    We have a report that summarises monthly sales & credits for 2 years in a group footer.   The footer is a sum of a formula in the detail section that calculates the monthly sales at the Item code level
    Item 1
    Group Footer 1     July     Aug     Sept     Oct          
    Sales Last Yr     @July_LY_Sales @Aug_LY_Sales     @Sep_LY_Sales  @Oct_LY_Sales          
    Credits Last Yr @July_LY_Credits @Aug_LY_Cred     @Sep_LY_Cred   @Oct_LY_Cred          
    Sales This Yr @July_CY_Sales @Aug_CY_Sales     @Sept_CY_Sales @Oct_CY_Sales          
    Credits This Yr @July_CY_Cred @Aug_CY_Cred     @Sep_CY_Cred @Oct_CY_Cred          
    <Curr Yr Graph1>
    <Last Year Graph2>
    Item 2
    Group Footer 1     July         Aug           Sept                               Oct          
    Sales Last Yr  @July_LY_Sales   @Aug_LY_Sales @Sep_LY_Sales @Oct_LY_Sales          
    Credits Last Yr @July_LY_Cred  @Aug_LY_Cred     @Sep_LY_Cred @Oct_LY_Cred          
    Sales This Yr   @July_CY_Sales  @Aug_CY_Sales     @Sept_CY_Sales @Oct_CY_Sales          
    Credits This Yr    @July_CY_Cred   @Aug_CY_Cred     @Sep_CY_Cred @Oct_CY_Cred          
    <Curr Yr Graph1>
    <Last Year Graph2>
    In the footer under the data, we want a 4 line graph (or 2 x 2 line graphs for this year & last year).  One line for sales for the current 12 months, and with it, a line plotting the credits, so as to see the trend over that year.  And then we want a line graphing the previous years sales and a line graphing the previous year credits for the 12 months. 
    On the data tab in chart expert, we selected the Place chart for each SHDOC.ITEM (Item number) in the footer and this is positioning correctly.  We have tried selecting "On change of shdoc.item and we have also tried For each record.  We selected on change of shdoc.item to generate the graph for each item.  We then added the 12 formula for the current year in the Show Value panel  
    In the show value panel we tried using the detail formula, the Report Area: Sum of <formula> and the Group 1: Sum Formula.  They all display as @July or @Aug which is a dependent formula used to identify the month
    We have added the above formula for each month and each value, but we can't work out how to group the monthly data into the 4 series of 4 lines (1 colour each) - Current Year Sales, Current Year Returns, Last Year Sales, Last Year Returns for the charting.  We have tried to create a graph with only 1 set of monthly data (viz, just 12 months current year sales) But no matter what options we take, we seem to get 12 line chart representing each month rather than 1 line representing 12 months.
    Can someone point us in the right direction?

    Please re-post if this is still an issue but search forums first, lots of chart questions have been answered.

  • Current Year in Prompt

    Hi,
    How to show current year in week prompt in sql request as dufault value
    thanks
    Edited by: 896398 on May 7, 2012 7:59 PM

    Hi,
    when you creating prompt under show label select 'SQL Results' and write the below code to choose year from week columns
    SELECT YEAR(week_column) FROM SubjectArea
    after that come to Default to label-> SQL Results and write the below code to show current year as a default value.
    SELECT MAX(YEAR(week_column)) FROM SubjectArea
    Note: Replace week_column and subjectArea with your column name and subject area name respectively.
    Hope it helps!
    Regards,
    Pandian

  • How can i get current time of a given timezone

    how can i get current time of a given timezone
    for example: Asia/Hong_Kong
    my code is like this, but the result is not correct.
    what's wrong?
    import java.util.*;
    public class test {
    public static void main(String[] args){
              String s = "Asia/Hong_Kong";
              String tempS = "";
              TimeZone myTime = new SimpleTimeZone(s);
              //TimeZone myTime = TimeZone.getTimeZone(s);
              Calendar myCal = new GregorianCalendar(myTime);
              tempS = myCal.get(Calendar.YEAR)+"-"+
                        (myCal.get(Calendar.MONTH)+"-"+
                        myCal.get(Calendar.DATE)+" "+
                        (myCal.get(Calendar.HOUR)+":"+
                        myCal.get(Calendar.MINUTE)+":"+
                        myCal.get(Calendar.SECOND);
              System.out.println(tempS);
    output is : 2001-7-15 11:16:48
    but the correct time should be: 2001-8-16 7:17:48
    the correct time should be 2001-8-16

    Certain indexes in the Calendar API start at 0 rather then 1, so, when you get the value, you may want to increment.
    I'm not sure why the time is incorrect. You may want to call getAvailableIDs() and make sure that the desired TimeZone ID is supported by your version. I doubt that Sun would have incorrect support for the time zone, but it may not be included, or perhaps it is included with a diffrent ID. You can always create your own time zone as well, by passing the String offset to getTimeZone(), the offset being how many hours beyond or before GMT. Hopefully this helps.

  • NVision prior year totals are overwriting with current year

    Hi All,
    I have created an nVision report with two columns, one is for Current year(timespan-YTD) expense totals and other one is for Prev Year(timespan-Prev_Year) totals and row level i have all Expenditure accounts from Account Tree.
    When I run the report, Current Year and Prev Year coulumns are displaing same totals, when I ran the SQL trace, i found that Prev Year, column sql was running two times, one is for prev year and otherone is current year and second sql was overwriting with current year totals.
    When I looked into timespans for PREV_YEAR, I saw that "End Period Type" was set to "Relative to Current Period", when I swich to"Absoluate Period" then Prev Year column was showing Prev Year results.
    But switching Period type to : Absolute is wrong,when comparing the current year with Prev year with As of Date.
    Any thoughts on above issue.
    Thanks,
    Venky

    Dear Rachana
    The long text of error AA669 is very clear about the root cause of the
    error.
    The idea behind the message: it is not allowed to close first general
    ledger before subleger. This leads to inconsistencies. It is common
    accounting principle to always close the subledgers first and only
    then close the general ledger (FI-GL).
    The solution is: re-open fiscal year in FI-GL (txn OB52) and follow the
    steps from note 619969.
    o  RAAFAR00
    o  RAPOST2000
    o  RAPERB2000
    o  RAJABS00
    If it is not possible to open the fiscal year because audit has already
    been completed: workaround (which is not quite correct from the legal
    point of view) is the report RACORR20_A from note 29694.
    Best Regards,
    Blaz

  • Pay_us_wages_w2_v is not picking current year data?

    Hi,
    pay_us_wages_w2_v tabe is not getting current year data, only is getting previous year data.
    Like
    SELECT sum(w2_wages_tips_compensation)
    FROM   pay_us_wages_w2_v puw
    WHERE  puw.assignment_id = 40291--:assignment_id1
    AND
    puw.year     
    = '2013'--TO_CHAR(:P_PAY_DATE_END,'RRRR');
    Please let me know , if any body idea?. We have to run any Program?
    Thanks,
    Ramu

    At first I was not happy. I didnt understand how it worked. I wanted to keep my unlimited. It may not work out for everyone but it does for me.  I have two accounts. one has 5 lines and the other has two. I pay 150 for two lines on one account. I have the 30 dllr 2 gig package. Then I have a dumb phone for the second line. My other account I have 5 smartphones. I pay around 350 for that account.
    Now with the new plans I can combine BOTH accounts into one and make one BIG family plan. All the users in my account do not go over 2 gigs except one but he never goes over 5. Ill get a big data package and save some money. On top of that its UNLIMITED minutes and text which is what we use it for.  Ill be paying around 350ish with a big data package..
    That is 150 dllrs in savings!! Now since I can add usage controls I can control how much data that one person uses.
    Not sure about you guys but to me this is #winning status!

Maybe you are looking for

  • IPod Touch Strangeness: Battery life and iPhoto

    I have a first generation iPod Touch (8 GB), running v.2.1. I recently went on a long trip, and the iPod Touch worked as expected, with pretty long battery life, etc. However, on my return, I've noticed two oddities. First, now whenever I attach my i

  • MB switches to external display upon closing the lid - instead of going to sleep... what to do?!

    Since I updated to Mountain Lion (from Snow Leopard 10.6.8) my MacBook doesn't go to standby mode anymore, when i close the lid with an external display attached. Instead it switches the external display to be the primary display and keeps on running

  • Need to fetch only the select statement

    Hi , I am able to fetch all the select statements from my program if program name as my input. I want only the select statement where we fetch the field entries like select single from mara select * from mara select count(*) select matnr from mara li

  • Colorchecker Passport correction

    I know this has been discussed before, and probably should be a FAQ, but I've looked at previous discussions and have yet to find a definitive answer. Appreciate any tips. I think the problem is simple: I need to color-correct a RAW image that has a

  • Leopard Sidebar vs Vista

    Ok... i have been searching for months about a problem with my home network. I'm using a Black MacBook connected via Wi-Fi on a AirPort Express and a Dell laptop with Vista inside... The vista laptop is not constantly showing on the finder sidebar. T