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

Similar Messages

  • Create a new "actual day variable" for 0CALDAY

    Hello,
    i want to create a new "actual day variable" for InfoObject 0Calday. The variable should have the same functions like 0DAT.
    How can I create this? Coding for CMOD?
    Thanks and regards,
    Heiko

    Hi,
    As I understand your question properly, You need a dynamic variable which will give the actual date i.e current date.
    create a variable for 0calday with single value processing type customer exit. reay for input deselect.
    in cmod
    When 'vARIABLE FOR CALDAY'.
    CLEAR L_S_RANGE.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    L_S_RANGE-LOW = SY-DATUM.
    APPEND L_S_RANGE TO E_T_RANGE.
    Regards,
    Ranganath.

  • Dynamic variable for 0CALDAY

    Hi all, this is my scenario:
    I've created a query with input variable for characteristic Year/Month (0CALMONTH), in columns i added a key figure and in rows i added the characteristic 0CALDAY. The result looks someting like this:
    Varibale entry: 09.2006
    Result table:
    <b>
    0CALDAY      | KYF</b>
    01.09.2006 | 1,000
    02.09.2006 | 2,000
    03.09.2006 | 1,500
    30.09.2006 | 2,100
    31.09.2006 | 2,350
    Now, what i need is to add a column that shows the value of the previous day, so the result should be:
    Varibale entry: 09.2006
    Result table:
    <b>
    0CALDAY      | KYF      | Previous Day KYF</b>
    01.09.2006 | 1,000  | -
    02.09.2006 | 2,000  | 1,000
    03.09.2006 | 1,500  | 2,000
    30.09.2006 | 2,100  | (value for 29.09.2006)
    31.09.2006 | 2,350  | 2,350
    I guess offsets will be the solution, but i need a variable (dynamic variable) to read the current day (0CALDAY) in the report... anyone knows how to do this? a customer exit can solve it (which code)? Please advice.
    Thank you.

    Thank you KJ for your answer, but unfortunatelly my knowledge in ABAP is very limited, ¿Do you happen to have an example so i can see how to customize it in order to read values from characteristic 0CALDAY?

  • Query variables for 0CALDAY

    Hello gurus,
       I´m trying to create a query variable that shows the last calendar day(infoobject 0CALDAY) in the previous year, current year, next year. I´m not finding these variables in Business Content. Does anybody know any variable for this? If I gonna need to create a user exit for this, where should I put the result of the ABAP program?
    Thanks,
    David.

    Hello David!
    Yes, you must create user-exit variable for this.
    Go to transaction CMOD and find or create project with RSR00001 enhancement ("BI: Enhancements for Global Variables in Reporting"). After that edit ZXRSRU01 include in function EXIT_SAPLRRS0_001.
    Add to ZXRSRU01 code for you user-exit variable. For example:
        WHEN 'ZB_DATE_LASTMINUS1'.
          LOOP AT i_t_var_range INTO wa_range WHERE vnam = 'ZB_FISCYEAR_M1S'.
          ENDLOOP.
          n4 = wa_range-low.
          n4 = n4 - 1.
          CONCATENATE n4 '1231' into l_s_range-low.
          APPEND l_s_range TO e_t_range.
    in example ZB_FISCYEAR_M1S - variable for manual input on 0fiscyear characteristic.
    ZB_DATE_LASTMINUS1 - user-exit variable. calculate last day for input year - 1.
    Anton.

  • Current Month, Current Year Variable on Posting Date

    Hi,
    I need to construct a BEx variable that will return the Current Month of the Current Year based on Posting Date. I want to be able to compare Current Month of the Current Year with Current Month of the Prior Year. I know SAP delivers variables for this based on 0CALMONTH. Is there any way to create the variable off Posting Date without having to write a customer exit?
    Thanks,
    C

    I guess you could use replacement path variables for the same. No need to write customer exits.
    Create 2 variables, one on calmonth and the other on calyear.
    Variable on Calmonth -
    type - replacement path.
    Replacement path tab - repace with variable, give variable name into which user enters the posting date, replace with key, offset start 2 and offset length 2.
    Variable on calyear -
    type - replacement path.
    Replacement path tab - repace with variable, give variable name into which user enters the posting date, replace with key, offset start 4 and offset length 4.
    to get key figures for current month and previous year, restrict the key figure with calmonth variable created above and use offset on the calyear variable created above, like zcalyear - 1.

  • Variables for 0calday

    Hi Gurus,
    I restricted 0CALDAY  by two variables.
    One variable is user entry. User will enter a date.
    Other one will be restricted customer exit variable(variable represents interval) and the interval will be calculated based on user entry
    in customer exit, using I_STEP = 2.
    Do you think the above process will work or not ? Please advice.
    Thanks
    Liza

    Hi Liza,
      To solve your problem you can follow 2 ways;
    1.) Do the mapping of 0CALDAY to 0CALMONTH, so u will get months in your ODS. Now you can use
         0CALMONTH as manual entry variable and apply offset to get the values for 12 months.
    2.) If you dont want to follow the above process write the code.Take 0CALDAY as manual entry variable and
         restrict the required object with customer exit type variable use 0CALDAY in the exit as input derive
         month from the user entered calday.
    Hope it is helpful to you.
    Regards
    Prasad

  • Use FI Posting date as a filter value, can I get YTD for current year?

    Dear Expert,
    I work on a BI report which calculate the YTD key figure (restricted by 0CYEAR and =< 0CMONTH).
    One of the requirement for the report is to allow user to enter a value for a date using FI Posting date (although this is optional).
    Without entering the value for FI Posting date, my report works fine.
    But once FI Posting date is entered, no data found.
    I expect that when the value for the FI Posting date is entered, the YTD value will be calcuated starting from the Jan 1 of that FI Posting year to the FI Posting date entered.
    But this seems not happen.
    Could you help me to resolve this problem?
    If there is a better solution, please let me know.
    Very appreciated.
    Arthur

    Hi Dipika,
    Thanks for your reply.
    In my report, FI Posting date is a free characteristic, which user can optionally select it and fiter it for a specific FI Posting Date. Do you consider it as a global filter?
    my query structure is as below:
    rows: profit center, department, manager
    columns: YTD for current year, YTD for Previous year, the difference betwwen the two
    The requirement is when user enter a FI Posting date, use it  to restrict the KF shown above.
    For example, if the FI posting date is March 15, 2008, then YTD for current year should be restricted by the period between Jan 1, 2008 and March 15, 2008 and YTD for previous year should be restricted by Jan 1, 2007 and March 15, 2007.
    Do you have any idea how to implement this requirement in term of FI Posting date?
    Thanks and appreciated.
    Arthur

  • How do I create an automator variable for a path that includes a date?

    I like to use Image Capture to scan documents into a hierarchy of folders under my ~/Documents directory that are organized by year and document type.  For example, I have
    ~/Documents/archives/2011
         /Misc
         /Utilities
    and
    ~/Documents/archives/2012
         /Misc
         /Utilities
    for archiving miscellaneous docs and utilities bills. Now, switching folders in Image Capture is annoying so I want to use the Automator support built into that app to direct the scanned images to ~/Documents/archives/<Current Year>/Misc or ~/Documents/archives/<Current Year>/Utilities.  I was able to do this with separate Automator workflows, each with a hard-coded path to the destination folder.  For example,
    What I would like to do is use an Automator variable to dynamically determine ~/Documents/archives/<Current Year>/Misc.  I see variables for Home, Documents, and Current Year.   However, when I try to create a new path variable it only lets me choose a full path to a Finder folder.  How do I combine Documents and Current Year variables with the "archives" and "Misc" folder names to create a new path variable?

    Well now, you went and made me learn something today.  In the Variables Library, under Utilities, is a variable named AppleScript.  You can put a small script into this that evaluates to your path, for example:
    ((((path to documents folder) as text) & "archives:" & (year of (current date)) as text) & ":Utilities") as alias
    If the script evaluates to a proper path, it can be used wherever any other path can - you can experiment by looking at the results of a Get Value of Variable action.

  • 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

  • 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"))

  • First date and last date of current year

    Hi
    how can i get first and last date of current year, thanks for your help

    hi,
    use FM......... FIRST_AND_LAST_DAY_IN_YEAR_GET
    DATA: first LIKE sy-datum,
          last LIKE sy-datum.
    CALL FUNCTION 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
      EXPORTING
        i_gjahr     = '2007'
        i_periv     = '24'
      IMPORTING
        e_first_day = first
        e_last_day  = last.
    WRITE: / 'First Date', first, '    Last Date', last.
    Regards
    CNU

  • BI Content Variable on 0Calday for first day of the fiscal year and first day of the current month

    Hi Friends,
    In one of my BEx queries, I need to restrict a key figure for 0Calday based on the first day of the current fiscal year. And another key figure for the first day of the current month. Instead of using Customer exit, I hope there is some SAP delivered standard variable for these filters.
    Please let me know if there is anything available for this. Your answers will be highly appreciated.
    Thanks & Regards,
    Ranjan

    Hi Ranjan,
    Please find below standard variables.
    Pls check below link for more.
    Standard Variables in BEX related to Time Charcteristics
    Characteristic
    Variable
    Description
    0CALDAY
    0CWD
    Current Workday (SAP Exit)
    0CALDAY
    0CYTCD
    Cumulated to Current Day (SAP Exit)
    0CALDAY
    0DAT
    Current Calendar Day (SAP Exit)
    0CALDAY
    0DAY_***
    Cumulation of all Values to Key Date (SAP-Exit)
    0CALDAY
    0LYTCLD
    Cumulated to Current Day of Previous Year
    0CALDAY
    0LYTCLD
    Previous Year Cumulated to Current Day (SAP Exit)
    0CALDAY
    0L_DATE
    Last Calendar Date
    0CALDAY
    0P_LY_R
    Comparative Period for Last Year
    0CALDAY
    0P_TY_R
    Period for Current Year up to Yesterday
    0CALDAY
    0S_KDATE
    Key Date Interval for Previous Year (SAP Exit)
    0CALDAY
    0S_KDAY
    Key Date Interval Current Year (SAP Exit)
    Best,
    SATYA.

  • Text Variable for Current Cal Year

    Hi Experts,
    I am performing some Calculactions in the Columns (Key Figures) as Fourmula...
    How can i name the Column with the Current Cal Year...
    My requirment is to name the column as Column2009 (Current Year)....and in the next  year it should be
    Column2010
    Please advise me on Text Variable

    Hi Raghu,
    I followed the procedure you outlined
    1. click on the key figure selection, where your are restricting the key figure with the customer exit variable.
    2. Now you have "change selection" popup window.
    3. In the description you have your key figure name. remove the description and write YTD &text_var_name&
    4.keep you cursor on &text_var_name& and select &text_var_name& and then,
    Beside "description" you will be able to see a variable ikon. click on that, from the contex menu of the variable ikon, choose the "change variable" option.
    5.you will now see a 'change variable'' popup window.
    6. give technical name text_var_name. description any thing.
    7.in global settings, give type of variable "text"
    8. processing type is "replacement path "
    9.Reference char is "calmonth"
    10. in the replacement path tab, in replacement rule, replace variable with "infoobject"
    replace with - "external charecteristic value key"
    11. use interval - select "from value" radio button.
    12. give 4 for offset length.
    13. save & ok.
    But the end result i am expecting 2009 but the result i am getting 2009.05
    But my requirment is to get 2009
    Please advise me on how to proceed
    Thanks

  • How to create a 0FISCPER variable for [last period of current year]

    Hello,
    Can anybody tell me how to create a (exit) variable for the last period of the current year, based on 0FISCPER ?
    Based on a single value, user entry variable based on 0FISCPER.
    I did not find any standard (business content) variables for this.
    Can anybody tell me whether the following alternative works:
    variable 0P_BA102 (last period pervious year) with offset of +12 
    Kind regards.

    Hi,
    It should work.
    You can refer to the following link:
    http://help.sap.com/saphelp_sm32/helpdata/en/3f/89533e5ff4d064e10000000a114084/content.htm
    Regards,
    Amit

  • How to get the current month value for a customer exit variable?

    How to get the current month value for a customer exit variable? 
    And also if we have an InfoObject with date value (including date, month, year), then how to derive the month value from this date type of Char.?
    Thanks!

    Hi Kevin,
    Check here........
    Re: Customer Exist for "From Current Date To Month End"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Cal month
    Regards,
    Vijay.

Maybe you are looking for