Variable Report Filter (Current Year)

Dear Gurus,
I need a report which always will work with current year measure. (Without asking to user in selection screen) The system should automatically assign the current year. I created an object in universe. In definition tab, in the select statement I wrote   to_char(sysdate,'yyyy') . But, in report and while the system gives an error message like "Parse failed. Exception: DBD, The supplied XML is not valid. to_char(sysdate, 'yyyy')State: N/A".  I think the formula is wrong but I wrote it by referencing OSS note 1381486. Are there any suggestion? Thank you.

Hi,
This should have been posted in the designer section, but...
I think I know why you are having problems getting a right answer, the parse failed message says:
The supplied XML is not valid.
Which leads me to believe you are using an OLAP universe (on top of BW may be?), all the solutions given here are for SQL access.
Unfortunately, there is no string handling possible in an OLAP universe on top of BW, you would have to resort to solving this in the underlying BEx query for this universe.
You can think along the lines of using a BEx variable that is input ready, takes multiple values, is mandatory and has a default value filled with by a user exit (which makes it default to current year).
You can show the prompt message of the BEx variable for when the user wants to select different year(s).
Not showing the prompt and leaving it empty will trigger the default.
Good luck,
Marianne

Similar Messages

  • Regarding month reports of current year to previous year comparision

    Hi,
      Can you kindly let me know that i have to develop report of Year 2010 of may report for sales, this inturn has to pick
    last year 2009 of may report side-by-side at report., I heard have to write user exit variable to acheive this.,
    Can anybody share the code to me.
                              Thanks in advance.

    Hi,
    Using Customer Exit Code we can do it. Use offset values and do it.
    Ex:
    Create a Input Variable on Month . Then user will give  value 05.2010.
    Create new Selection in Columns and drag & drop Keyfigure and 0CALMONTH and restrict the 0CALMONTH with above Variable.
    Create new Selection in Columns and drag & drop Keyfigure and 0CALMONTH and restrict the 0CALMONTH with above Variable and right click and set OffSet -1 which wil give data for 04.2010 Data.
    Like that you need to use Customer Exit code to get 05.2009 data, see the examples in
    http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    See under
    Customer Exit Variables in BW/BI Reports
    Thanks
    Reddy

  • Lead time values are not appearing in the report for current year.

    Hi friends,
    Iam checking a report in production.  where lead time values are displayed as 0 for 1 key figure lead time3 (w/0 dim) . i found there is a formula for this it shows like NODIM ( 'Lead Time 3' ).and there is a value for cal.lead time
    how can i get values in the report.
    Thanks ,
    VRV.

    Hi,
    Although your question is not clear, I understood that the formula built on that KF is NODIM. Basically it means, units of measurement is not considered when calculating.
    Eg: 5 Minutes + 5 Kilograms = 10
    You please try to analyze your KF by the above logic. Then you would be able to figure out why the data is not appearing in the report..
    Assign if helps...
    Regards,
    Suman

  • Current Year Filter

    Hi Gurus,
    I have one simple report. I have to filter that report for current year.
    Then I created filter as Year(ClosedDate) = YEAR(CURRENT_DATE).
    But it is not working my Question is how can I apply current year filter to report?
    Would be appreciated for your help

    Hi every one thanks for your response.
    In database i have "closed Date" column. in my report i am using YEAR(Closed Date) and i am applying filter to this column as YEAR(CURRENT_DATE). i want display all current year columns only.( Report is working fine if i hardcode like YEAR(Closed Date) = 2010.)
    when ever i apply YEAR(Closed Date)=YEAR(CURRENT_DATE) then i am not getting any values becasue in SQL ( i saw in log file) it is not passing value of 2010 it is passing YEAR(CURRENT_DATE) with in single quote. like YEAR(Closed Date)= 'YEAR(CURRENT_DATE)' .
    i did try with CAST function it did not work how can i pass the current year value in to the filter.
    how can i solve this issue please help me.

  • Current Year as filter

    Hi,
    I have a report with a column YEAR wich has values (2009,2010 and so on). I want filter report by current Year (2010, obviously, but next year it will be 2011 :-)). So I add on column Year following filter:
    YEAR(@{system.currentTime})
    but it doesn't work.
    Have you any idea?
    Thanks
    Giancarlo

    Hi Kishore,
    I am Durgaprasad from Pune-INDIA, working as a OBIEE developer, I have one query which I mentioned below can you please go threw it.
    I have done migration Discoverer Admin EUL Layer into OBIEE repository using below methodology.
    Navigate to the <installdrive>\OracleBI\server\Bin directory. There are two important files in this directory: the migration assistant executable file named MigrateEUL.exe and a properties configuration file named MigrationConfig.properties.
    Could you please help me how to migrate discoverer plus workbooks and worksheets into OBIEE Answers?
    go through below link, It will show navigation steps for migrating of EUL from Discoverer to OBIEE.But i need migration of workbooks and worksheets from Discoverer into OBIEE Answers.
    http://www.oracle.com/technology/obe/obe_bi/discoverer/discoverer_1012/discomigration/migrate_disco_biee.htm
    This is very great full help to me …
    Advance thanks for your suggestions.
    Regards
    Duraga Prasad.

  • Current Year  variable for 0CALDAY

    Hi Gurus,
    Instead of creating customer exit for Calendar day to get current Year do we have any standard variable to get the current Year if user inputs Calendar Day.
    Thanks
    Ganesh Reddy.
    Edited by: Ganesh Reddy on Oct 17, 2010 9:04 PM

    Hello,
      Following link contains some SAP BI Content variables
    http://www.sapks.com/2010/06/business-content-delivered-variables-in.html
    0CYEAR is variable which contains current year
    Regards,
    Sharayu
    Edited by: Sharayu Kumatkar on Oct 18, 2010 12:52 PM

  • 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

  • Filter measure column for current year

    Hi,
    I'm stuck up with issue, we have a report from three tables D1, D2 and F1. In which D1 is time dimension. Now we have report from D2 and F1 with measures, and the report is placed in Dashboard which is having year prompt.
    F1 is joined with D2 and D1 Time dimension as well, the requirement is in the report one of the measure column say X should always show the values for current year, while others will show according to prompt values.. In short I want to display one of the measure column for current year, even though the user selects the prompt value for year earlier to it the values should not change.
    Please let me know, how to achieve this.
    Thanks in advance

    I think you can still solve this.
    Whatever Srini said keep it.
    Now for the date prompt create a presentation variable.
    pass this presentation variable in the expression for measure which you don't want the current year.
    case d1.year=@{presentationvarialbe} then sum(f1.x) else 0 end
    you can also use the filter expression too.
    remove year prompt filter from the report. and then add a new filter for the measure as<>0.

  • Issue in using presentation variable as filter condition in the reports

    Hi,
    I have an issue in using presentation variable as filter condition in my reports the details are as follows:
    Details :
    We want to implement the Max and Min variables through Presentation variables only.we do not want to implement it through session variables in this case.
    We have two variables MIN and MAX to be used as Presentation Variables,for a column of the report (which is a quantity),so that the user wants to see the data for this column within a particular range.i.e the Min and the Max.This part has been implemented well . The issue is when the user wants to see the full data.In that case we will not pass any values to these two Presentation Variable or in other words we are not restricting the report data so we are not passing any value to the variables,this is when the report is throwing the error. we want to leave this variables blank in that case.but this is giving error.
    Please suggest how can I overcome this issue.
    Thanks in Advance.
    Regards,
    Praveen

    i think you have to use guided navigation for this. create two reports first is the one you are having currently and second is the one in which remove the presentation variable from the column formula. i.e. the same report with no aggregation applied.
    Now create a dummy report and make it return value only when the presentation variable value is not equal to max or min. guide the report to navigate between the first and second report based on the result of the dummy report.

  • Current Year and YTD in Report/Query

    Hi to all the experts here,
    I have a report requirements to show the cost in the report for the current fiscal year and last fiscal year filtering by YTD month in the report as below when the user enter the month: 12.2010, the month: 07.2010 is the first posting period of the fiscal year.
                          07.2010    08.2010     09.2010      10.2010     11.2010     12.2010     Last Fiscal Year     Last 2 Fiscal Year
    Current Year           10,000    20,000       20,000       20,000       20,000    20,000       100,000                  90,000
    Last Year              15,000    15,000       15,000       15,000       15,000    15,000       120,000                 100,000
    I know that I need to create customer exit to archieve this, but I not sure what to do to get this, I have problems on getting the figures for the Last Fiscal Year and Last 2 Fiscal Year here.
    Please help. Appreciated alot. Thanks alot!

    Hi
    The Fiscal year/period (0FISCPER) in your BW system must be maintained as starting from 07.2010 onwards then you can try the below:
    In the report Filters you can use the manual entry variable for 0FISCPER where the user can input the month restrictions.
    Then for the Current year and Previous year amount KFs you can create 2 customer exits for Current year and Previous year on 0FISCPER characteristic where you can set the interval using the values input by the user in the selection screen. (eg. If user enters 7.2010 to 12.2010 you can use these values in the exit code to set the interval for the customer exit variable.)
    This way you can have the amounts restricted by the period entered by the user in the report.
    For the structure you have mentioned in your post you can have the 0FISCPER in columns and then the KFs current/previous year in the rows so that once you have the Current/Previous YTD as created above, you will see the individual month period values also in the drilldown.
    Hope this helps.
    Regards,
    Ninad

  • Help needed on balance sheet plan report for the current year

    Hi BW gurus,
    I have a problem with reporting.
    I need to get  Balance-Sheet Plan Reports for the Planned year and for the current year.
    To get the report for the planned year its  straight forward just by restricting 0balance by the version to 1 and the valuetype 20.
    But I have a problem with the current year report.
    I have fiscal year and the company code as the variables.
    The report should be like this.
    If we need the report as of today(July 26 2006),we may input 2006 for the fiscal year variable.
    And the 0balance for the twelve fiscal periods should be as follows
    From jan 2006 to june 2006(fiscal periods) it should have only the actuals
    From july 2006 to dec 2006(fiscal periods) it should have  only  the plan
    I have already built a query by having two restricted keyfigures on 0balance.
    One by restricting version and valuetype 0 and 10 , and the other with 1 and 20.
    But in the report I am getting two columns of data for each fiscal period for 12 periods.0balance with actuals and 0balance with plan.
    But I need to get 0balance with actuals from jan to june(individually for each fiscal period columnwise),and 0balance with plan from july to dec(individually for each fiscal period columnwise).
    Hope you people can visualize my report.
    Please help me ASAP.
    Any kind of help is appreciated.
    My mail id is [email protected]
    Thanks in advance
    Regards
    Sam Mathew

    Hi Sam,
        Did u get this issue solved. I am having the same issue now. Can u please let me know if u have a solution for this.
    Thanks
    Prasad

  • Reporting with Time Variance (previous year vs current year)

    Good day all.
    I would like to ask for advice and help in terms of best way to make this report work:
    Let's say I need to show the % variance between the Total Operating Costs per Gross sqft over different times periods (Previous year to Current Year). The trick is that data must be compared to the same data in the previous year, i.e. if we are in June of current fiscal year, the comparison must be between Oct-June of current fiscal year to Oct-June of previous fiscal year, not the full previous year. The report formula itself would be:
    ([TCO Exp/GSF PY] - [TCO Exp/GSF CY]) / [TCO Exp/GSF PY] * 100
    My guess, I could define a static variable Current Year which developers would have to be changed every year. And then create logical columns: TCO Exp PY (where year=Current Year-1)...while writing this, I realized I'm wrong and there must be a more efficient way to do this. UPD: I've also thought about time-series function AGO, but I'm currently testing it, and I'm not happy with its performance...
    Thank you in advance...
    Message was edited by:
    wildmight

    Hi Wildmight,
    The current value will be the value you will select from the table like you normally would do. These would be values per month if I am correct. Next to the column with the current value, you create an additional column with the AGO function in it.
    Now you will have the current value and next to it the value of the required period ago. You won't need any static variables.
    Let me give you an example for the last three months.
    Period CY PY
    jan-08 50 30
    dec-07 40 20
    nov-07 45 25
    In this case the value 20 corresponds to the period dec-06.
    I hope I made myself clear.
    Good Luck,
    Daan Bakboord

  • Reporting on Previous Month/Current Year - Jan 09 fix

    I currently have about 10 reports that are being filtered to only show data on the repository variables for :
    PreviousMonth and Current Year.
    When Jan 1, 2009 comes around, these reports will be kicked off to show Decemeber of the Current Year, so December of 2009.
    What is the best/easiest way to fix this problem for the future?

    What Shiva meant was to let YEAR be a Presentation Variable that the user can select from, say a drop down list of "years."
    But consider this. Whenever the month of the "system date" is January, you want the year to be one less than the "current year." For all other months, you want the year of the "system date."
    PrevYear = CASE WHEN MONTH(Calendar."System Date")=1 THEN YEAR(TIMESTAMPADD(SQL_TSI_YEAR, -1,Calendar."System Date")) ELSE YEAR(Calendar."System Date") END
    And since you weren't sure about how to do the previous month...
    PrevMonth = MONTH(TIMESTAMPADD(SQL_TSI_MONTH,-1,Calendar."System Date"))

  • Current Year Formula Variable with SAP-Exit

    Hi Experts ,
    Is there any SAP Exit Formula Variable avaliable that we can use in BEX which gives us the Current Calander Year?
    I am able to find the current fiscal period ie "0F_CUFPE" which provides the current posting period/month.
    On similar basis, I need a FV which provides me the Current Calender Year.
    Please note that I do not need Characteristic Variables for Fiscal Year .
    Regards
    Dipali

    Hi,
    If you're refering to the InfoObject 0CALYEAR, there is an exit variable available called: 0CYEAR - Current Calendar year
    Which will filter on the current year.
    br
    Mikael

  • Current year /last year in reports

    I need to report summarised data for range of periods and I need to compare the current year results with last year.
    For example I need to report Jan to June of current year and compare in the same reports the results of last year.
    How to select the last year? I tried with offset (year-1) but it does not work.
    Since I am giving the range of period( 1 to 6) in selection the period , hence the offset does not populate.
    Sure mark for helpful answers.

    Mani,
    as with your other topic in the BCS forum, there are ways to use the offset for this, but it all depends what variables you use for the period/year derivation.  It also depends if you are using BCS and need the YTD values.
    so, here are a couple of options:
    if you are using the fiscal year/period variable, then you will be restricted by what your FY variant is. (thus the value of your offset).  I think even if you use K4, taking -12 from your value will get you to the same period prior year.
    as with other recommendations here in the forum, you can offset just the year variable if your are using two separate ones (one for posting period one for fiscal year).  As BCS doesn't have the cumulative KF's, this is pretty much the only option that you have if you need to get the YTD values (since you need period 00 for the YTD values in the BS)
    You mentioned that the offsets don't work for you - double check that by using the text variables in the column headers, and you should see what data is being pulled in there.  Also, make sure that you are restricting the variables (fiscal year) on each column.  If you put the restriction on the entire query, it will only give you one value, so instead you need to put the fiscal year variable in each column (with appropriate offsets)
    let us know if that worked

Maybe you are looking for