Macro issue: Current Year and Current Year +2

Hi Macro experts
I have a view in monthly buckets. I like to copy values for one KF to another from current year to only Current year + 2. I have made following macro but it dosen't work:
AT: Initiate Input Row 
Copy Sales FC to Al FC Input Y+2 : ( 24 Iterations :  M 03.2009 ;  M 02.2011 )
IF
Check year
YEAR( DATE(
Row: Customer Forecast ( Frm  M 03.2009 )
=
(YEAR( DATE( TODAY ) )
+
2
Row: Annual Target Input ( Frm  M 03.2009 ) =
Row: Sales Forecast ( Frm  M 03.2009 )
ENDIF
I get following message when I do the check:
Fehlerhafter logischer Ausdruck "(YEAR(  4D4HPL3ENNRMKCXE1NULTI4LX  )  +  2  )":
Please help (If there is an easier way to make the macro please let me know)
Thanks
Sun

Hi
Thanks for the answer. It is a rolling period dataview.  I understand you suggest the macro as:
AT: Initiate Input Row 
Copy Sales FC to Annual FC Input Y+2 : ( 24 Iterations :  M 03.2009 ;  M 02.2015 )
Row: Annual Target Input ( Frm  M 03.2011 ) =
Row: Sales Forecast ( Frm  M 03.2009 )
But the problem is that when it is rolling period it will then also copy values in current year+3 and that is not acceptable. That is why I canu2019t use this macro. Values in current year (jan. month to dec. 2009) to (jan. month to dec. 2011)
Br
Sun

Similar Messages

  • BEx - Display current year and previous year by day on the same row

    Hello experts, need some help/suggestions on how I can accomplish the following please. 
    We have a requirement to show MTD revenue by day for the current year and previous year.  The desired result will have the following columns
    Calendar Day   |     Current MTD Revenue     |     Prev MTD Revenue
    11/01/2009       |      15,131,005                    |        15,138,668
    11/02/2009         |    15,055,345    |                        15,523,762
    However, the result is showing up as follows:
    Calendar Day   |     Current MTD Revenue     |     Prev MTD Revenue
    11/01/2008       | |                                                   15,138,668
    11/02/2008       | |                                                   15,523,762
    11/01/2009       |      15,131,005 |
    11/02/2009       |      15,055,345 |
    The number of rows for Calendar Day varies depending on the date the user selects.  We only want to display the days for the current year with the Previous Year Column on the same row. 
    Can someone please let me know how I can get the results to display on one line for each day? 
    Thanks,
    David

    I have the same issue on my end, and am interested in responses. I searched the forum and found this suggestion in another post; not sure if this solution will help, but it looks like it might. This was a response from poster RadhaN:
    RadhaN  
    Posts: 390
    Registered: 8/27/09
    Forum Points: 876 
       Re: a simple query to show sales versus last year on daily basis/   
    Posted: Sep 21, 2009 9:53 AM    in response to: Shlomi Weiss           Reply 
    HI Shlomi
    Create a virtual characteristic in your infoprovider that can calculate the day from calendar Day. In ZXRSRZZZ while adding code for this virtual characteristic use the function module DATE_COMPUTE_DAY to compute the day for every calendar day.
    For calculating Sales Current year, create a restricted ky figure with Sales as the key figure. Add 0CalDay to this RKF and create a variable for this infoobject(Eg: ZCURYEAR) that will receive input from the user for the range of dates eg: 08/16/2009 - 08/22/2009.
    For Sales Prior year, create another restricted key figure with Sales. Add 0CalDay to this RKF and add a customer exit variable. In the Customer exit code use the ZCURYEAR variable and offset it to prior year in both the upper and lower limits. This should work.
    I hope this helps.
    Thanks.

  • Parameter for current year and previous year

    Hi all,
    I currently have 2 reports where the query is the same except in the where clause I have it filtered to current year and previous year based on the List_Date. I would like to make this one report with a parameter of Current or Previous year.
    Would I create 2 more datasets one for current and another for previous? I would think there is a easier way. Any help or direction would be great.  

    If you define a parameter in SSRS, you can use it's value in your query. Just make sure the parameter name, and CASE (SSRS is case sensitive when it comes to parameters) are the same in SSRS and your query. There's a parameter tab on the dataset properties.
    It SHOULD auto fill, but it never hurts to check, just in case.
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.
    Yes it did auto fill the parameter tab in the dataset and I get a parameter to enter the year when I preview the report. Still a little confused on how I do current or previous year. Are the next steps what I need to do?
    @yearParam parameter:
    1) Create  Available or Default values 
    2) Current and Previous year as label
    3) For Value do I need to use a expression for current year =Year(now()) and previous Year?
    4) Add a filter on the tablix for list_date?

  • Current Year and Previou year Data comparision - Urgent

    Hi Experts,
    In our report we need to compare the sales value for current year and prevous year.
    The Fiscal year is the input selection field.
    Output report displayed as below
    Product|Current year sales|Previous year sales|
    404    |120.00          |20.00
    400    |122.00          |22.00
    Total  |242.00          |42.00
    Could any body help how do i use the fiscal year/period or fiscal year for the current sales and previous sales values.
    Thanks in advance.
    Mahantesh

    You have to restricit current year column with the variable Fiscal year and previous year colum with same variable with offset -1.
    For year period use a range with from valie '001.1990' and to value a variable for current and the same variable with offset -12 for previous.
    Hope it helps.
    Regards

  • Last ten years and 5 years afterwards from Current year

    How can i get last ten years and 5 years afterwards from Current year in a single query which is picking data from dual.

    SQL> select add_months(sysdate, -1 * 10 * 12), add_months(sysdate, 5 * 12) from dual ;
    ADD_MONTHS( ADD_MONTHS(
    14-FEB-1996 14-FEB-2011
    1 row selected.
    SQL>
    [rep]                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Displaying current year and previous year's data.

    hi all,
    we have fields like doc.no, company code, costcenter, posting date, year etc... in a query.
    we are using this query to display data in VC,
    how can i display the current year and previous year's data in two different tables using the available fields.
    any help will be highly appreciated.
    thanks,
    Rk

    Hi Rk,
    You can achieve your requirement using 'Filter' operator. Drag one 'Filter' operator into visual composer story board and drag the output into filter and add condition(Check year=2008) and drag one table from filter. For another table use another filter and change the condition.
    Hope it helps...
    Regards
    Basheer

  • Current year and previous year

    Hi All Grus,
    i have a one requirement user will give input 30.04.2009 . the output should show last ten days including user entered date like 21.04.2009 to 30.04.2009 for current year and previous year
    this current year and previous should show column wise in row wise i need year like  given below
    user input:  30.04.2009
    row            column                                                                               
    21.04.09  22..04.09. 23..04.09 ..............................................................  30.04.2009
    2009       100          200            300         ...............................................................     500                            
    2008        200          300          600          .................................................................    1000               
    Edited by: kek.uthayakumar on Aug 4, 2009 7:57 AM
    Edited by: kek.uthayakumar on Aug 4, 2009 7:58 AM

    Hi
    You need to have customer exit variable on this calday and write code to obtain your logic. Search in SDN for sample codes:
    enter information required in search forum SAP Business Explorer (SAP BEx)
    Regards
    Ravi

  • KE30 with currnt year and previous year columns

    I continually get memory low when I run a KE30 report. I have made some changes to see if I can determine the possible cause. What I noticed was the following: If the report is just for the current year and I look at KEDT the number of actual record read is approx 1,500,000. If the report is just for the prior year the actual records read is approx 1,800,00. If the report is for current year and prior year the actual records read is approx 9,000,000. 9,000,000 seem to be aprox the total number of PA records, i.e. the actual records is the total number of PA records.
    This is a complex report with aprox 120 rows and 9 columns, reading record types F,D and B.
    Has any one had a similar problem and that may be able to help.
    Regards
    Rob Viljoen

    I assume the other 6M records is years prior to the current year?
    You have two options, investigate the selection criteria that results from the report, and try and stop it selecting the other 6M records as well. Something is happening in the report that contains both years, which opens up the net effect of the selection criteria.
    I am certain that you will find something in the aforementioned. If not, try and split the report into pieces, where a summary report is called first, and then the user drilldown into the detail report.

  • Getting the exact date of current week and current month

    I would like to know is there any methods to know the exact date of the current week and current month?

    //use this function like this
    //String date = getNow();
    public static String getNow()
         Calendar cal = new GregorianCalendar();
         // Get the components of the time
         int hour24 = cal.get(Calendar.HOUR_OF_DAY); // 0..23
         int min = cal.get(Calendar.MINUTE); // 0..59
         int sec = cal.get(Calendar.SECOND); // 0..59
         // Get the components of the date
         int year = cal.get(Calendar.YEAR); // 2002
         int month = 1 + cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ...
         int day = cal.get(Calendar.DAY_OF_MONTH); // 1...
         String timeStamp = String.valueOf(year) + "-" + addZero(month)+ "-" + addZero(day)
              + " " + addZero(hour24)+ ":" + addZero(min) + ":"+ addZero(sec) + ".0";
         return timeStamp;
    public static String addZero(int num)//this function works with the getNow() function
    //all it does is adds a zero to an int if its less then ten
         String val = "";
         if(num < 10)
         val +="0"+num;
         }else{
         val = String.valueOf(num);
         return val;
    }

  • Report for current day and current month

    Hi gurus,
    i 've a report, where i 've to display the values for qty and cost of the material for the current day and current month
    HOw can i do this in BEx Query designer..If any document plz share
    thanks
    rakesh

    hi Kolli
    here i want to filter the data on system date,
    i wnt the report to pick the date dynamically based on the system date.
    but i think restricting on calmonth and calday is not going to solve my scenario..
    rakesh

  • Get the Current Quarter  and Current Week from date

    Hi,
    I want to get the Current quarter and Current week from a given date, which function modules should i use?
    I tried using function module - 'HR_99S_GET_QUARTER' for getting the quarter but it is throwing an error while loading data. Moreover it doesnt exist in BI7.
    Similarly for current week.
    Please help. Sample code snippets would be appreciated.
    Thanks
    Jaya

    You can use FORM time_conversion wich is the one used by standard in Update Rules:
    You can select whether convert 0CALDAY to 0CALWEEK or whatever infobject formats you prefer...
      perform time_conversion
                using  '0CALDAY'
                       '0CALMONTH'
                        p_input_date
                        l_fscvtval
                changing RESULT
                         c_t_idocstate
                         c_subrc
                         c_abort.
      if c_subrc <> 0 or c_abort <> 0.
        exit.
      endif.
    form time_conversion
                   using i_timnm_from type rsiobjnm
                         i_timnm_to   type rsiobjnm
                         i_timvl
                         i_fiscvarnt  type t009b-periv
                   changing e_timvl
                            c_t_idocstate  type rsarr_t_idocstate
                            c_subrc   like sy-subrc
                            c_abort   like sy-subrc. "#EC *
    data: l_timvl  type rsd_chavl,
          l_result type rsd_chavl.
      IF i_timvl CO ' 0'.
        CLEAR e_timvl.
        EXIT.
      ENDIF.
      l_timvl = i_timvl.
      CALL FUNCTION 'RST_TOBJ_TO_DERIVED_TOBJ'
        EXPORTING
          i_timnm_from             = i_timnm_from
          i_timnm_to               = i_timnm_to
          i_timvl                  = l_timvl
          I_FISCVARNT              = i_fiscvarnt
          I_BUFFER                 = rs_c_true
        IMPORTING
          E_TIMVL                  = l_result
        EXCEPTIONS
          INCOMPATIBLE_TOBJS       = 1
          NO_INPUT_VALUE           = 2
          FISCVARNT_MISSING        = 3
          INPUT_NOT_NUMERIC        = 4
          WRONG_DATE               = 5
          WRONG_FISCPER            = 6
          X_MESSAGE                = 7
          OTHERS                   = 8
      e_timvl = l_result.
    ENDFORM.                  "TIME_CONVERSION

  • Help with report that shows Year and Last Year

    Hello!
    I want to view in a report some KPIs (Rows) and Years(Columns) but I want a specific report with a prompt, I mind, at top of my dashboard there is a Year prompt that it contains (2001, 2002, 2003….,2010) and I want to see in a report when I chose in prompt 2008 for example that my report shows me 2008 Year and Last Year (2007) and another column that indicate Diference between these years. Is that possible? Can u explain me the process to get it?
    Thank you very much!

    If you get access, create a duplicate of the Measure you wish to use in the Business Model.
    Once you have a duplicate rename to say $ Revenue Year Ago and then from the properties of the Measure, General click on Use existing logical columns as the source.
    Then select function>Time Series> Ago
    Ago has 3 inputs, select the column you want to base the measure on, the TIME SERIES Dimensions for year, and then 1 for 1 year ago.
    So your formula will look something like:
    Ago("Human Resources"."Fact - Absence"."# Days" , "Human Resources"."Time"."Year" , 1)
    Save this and copy into your Presentation layer available for use.
    Hope this helps

  • Difference between calender year and fiscal year

    Hi Experts,
    Can you please let me know What is the difference between calender year and fiscal year?

    Hi Suresh,
    Calender year  begins on January 1 and ends on December 31.
    A fiscal year (or financial year or accounting reference date) is a 12-month period used for calculating annual ("yearly") financial statements in businesses and other organizations.It can be any 12-month period that a company uses for accounting purposes.
    hope its clear
    Cheers
    Sunil

  • Current Year and current month?simple question

    How can i get four Digit current Year and two digit current month. So if is march it should get me as 03 and the Year as 2002. Please do help me, is a simple question isn't it ?. Thanks for your earliest response.
    Thank you.

    i have a directory structre of the format
    REPTS2000209/E200209-98000001
    in which 2002 is current YEAR
    09 is current month
    and 9800001 is the code i would submit(list box) from a form
    so what i need is a program that can generate the above path and open that particular PDF file
    so basically E200209-98000001.pdf is the PDF file.
    i am submitting it from JSP page. PLEASE HELP ME how can i program.

  • How to show current year and last year sales in a WEBI Report

    Hi Guys
    How can show current YEar Sales in one column and Last YEar Sales in the other column based on a user prompt for the Current YEar Column.
    For Example is user enter 2010 for Year how can i show a Column for Sales-2010 and Sales 2009.
    Thanks

    If you can modify your Universe add an object named New Object Last Year whose SQL is:( yourTableName.Year + 1)
    Then in WebI create two distinct queries in your query Pane. In the first one you could do this:
    Query 1:
    objects: Year, Sales ... etc.
    filters:   Year Equal to '1. Prompt Year'
    Query 2:
    objects: Year, Sales ... etc.
    filters:    New Object Last Year Equal to '1.Prompt Year'
    Then in your report you can drag each object on their respective columns.
    If you don't want to use two distinct queries, use one like this:
    Query 1:
    objects: Year, Sales ... etc.
    filters:        Year Equal to '1. Prompt Year'
                 Or
                      New Object Last Year Equal to '1.Prompt Year'
    Edited by: PadawanGirl on Jun 23, 2011 6:28 PM

  • Key figure comparision between current year and previous year

    Hello collegues,
    I have created a WEB Intelligence report with key figure ROI (return on investment which is calculated out of three other key figures (capital, revenue and costs). I would now like to calculate the percentage period (year) differences between key figure ROI - between current year (month) and previous year (month).
    Do I have to add coding within a key figure formula within WEBI Rich Tech client or within universe builder.
    The key figures were extracted from SAP BW and added to a universe which is basis for WEBI rich tech client report.
    thanks and regards,
    Christian

    Hi Stratos,
    so I see - i have to use the variable Editor and then define a measure and add coding in the formula field. Do you have an e-mail address ín order to send you the report and explain in more detail what I would like to see - here it is not possible to upload a report...
    thanks and regards,
    Christian

Maybe you are looking for

  • Where do I complain about a Verizon Wireless Store?

    I recently purchased a new ipad mini with retina display, 16g,  for my family for Christmas.  I purchased the ipad at the full retail price, instead of adding a line and getting the priced reduced by $100 since I had a line to put it on.  He charged

  • MenuBar Issue

    Click here to see this issue.  If you click on Portfolio menu you'll get the error "Undefined State Name, 'Portfolio.'  My question is how to I disable the Portfolio menu?  I found a thread earlier about writing an if statement if the menu has submen

  • Why is my microphone not working only when making calls ?

    Hello all, I have a problem with my Lenovo S930 Smartphone to fix urgently. (MTK6582 Quad Core 1.3GHz Android 4.2) The microphone is not working when making calls (so people don't hear me talking.) But strangely the microphone is working perfectly wh

  • Help with finding my site in google?

    hi all i have my site up and running and think i have it indexed? im after a bit of help regarding how people search for it? for example the website is for my turfing company based in essex called Unique Lawns. i need to know how i go about keywords

  • Jdbc2.0 Weblogic5.1

    How is this implementation performing on weblogic? On Websphere you can guarantee optimized performance when using PreparedStatements, no matter if they were created on the connection you hold a reference to, or on another connection. How is the perf