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?

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.

  • 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.

  • 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

  • Dynamic Variable for YTD08

    Hi All,
       I am having a requirement for the generating a report for the selection field 0calmonth.if execute the report,the field name should get change for the previous years and i should get the data for the same.
    For Example:
    Input : 200906
                                                                YTD' 200906(Dynamic)      YTD 08 (Dynamic)
    ARCHWAY SALES - CINCINNATI         1234                                       1234
    ARCHWAY SALES - CINCINNATI        13,725                                     13,725.
    Eg.. If i give the input as 200906 and execute the report then at YTD 08 place i have to get previous year ( 200906 has to be converted as 200806) so it has to generate dynamically .
    Let me know if you have any queries
    Thanks!!!

    Hi
    Create 2 Restricted Key Figures YTD(FiscalPeriod) and YTD(FiscalPeriod-12)
    In 1st RKF
    Bring the KF of YTD and restrict by Fiscalperiod Variable
    In 2nd RKF
    Bring the KF of YTD and restrict by Fiscalperiod Variable and offset the variable by -12.
    Use these 2 in your report.
    Regards,
    Bilapati

  • Dynamic Variable for last day of month

    Hi all,
    I have created one report where in YTD is calculated based on stsyem date. NOw in this report the cal month is in row thus displaying data month wise. But i need one key figure which giving the last day vaue of every month that are displayed in YTD i.e this is based on cal day. Thus the report layout is as follows:
    if report is run in mar 2007 then it should display:
    calmonth            key figure due amount
    Jan 07                this should show due value on last day of jan 07 (i.e 31st jan 07)
    Feb 07               this should show due value on last day of feb 07 (i.e 28th feb 07)
    Mar 07               this should show due value on last day of mar 07(i.e 31st mar 07)
    customer exit variable can give me only one value at a time. How can I make it dynamic to take last day value of every month as per cal month. Could anybody explain me if worked on any such issue.
    If there is some how to paper kindly mail me at my email Id : [email protected]
    thanks in advance
    Regards,
    Wrushali

    Hi,
    We can assign multiple single values to the customer exit.
    So in the Query take CALMONTH in rows.
    And take your KF in column with Customer exit variable restriction on CALDAY.
    So in the code of this Cusotmer exit varible, from the Current date find out the year of the current date and then assign those 12 required days to this variable.
    With rgds,
    Anil Kumar Sharma .P

  • 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

  • How to use the dynamical or static variable for ESSBASE cube name?

    Hi Experts,
    When I import ESSBASE Cube into physical layer, the cube name from ESSBASE is created automatically, such as H_Sales.
    I want to use the the static or dynamical variable for replacing the external name. So I try to create the static variable in RPD,such as cubeName, and use the following code
    'VALUEOF(cubeName)' into the textbox of external name.
    However, when I view the report in answer, it will generate the error message: Database VALUEOF(cubeName) does not exist.
    Is it possible to implement this functionality?
    Thanks..

    Hi,
    use <%=odiRef.getSchemaName("D")%>
    D as parameter if it is the Data Schema or W if you need the schema from Work Schema
    Your command will be like:
    select <%=odiRef.getSchemaName("D")%>.GER_LOT_EXEC_ODI('Fluxo', 1, 'C') FROM DUAL
    Works?
    Cezar Santos
    http://odiexperts.com

  • Dynamic variable and/or XML LazyLoader HELP

    I am loading images via xml lazyloader into my air app
    I need var b to be "img" +  item.id dynamically
    any ideas???
    for each (var item : LoadingItem in lazy.items)
                        var b : Bitmap = lazy.getBitmap(item.id);
                        addChild(b);
    If you dont know the lazyloader code then can you please explain how to create a dynamic variable for a bitmap???

    so i should set type here
    var img:bitmap = {}
    then create the variable like this in my for statement?
    img[this[item.id]] = lazy.getBitmap(item.id);
    lets say item was 1,2,3
    Then
    img[1]
    img[2]
    img[3]
    would be able to hold a different bitmap
    thanks in advanced

  • Dynamic variant for select option High value

    Hi ,
    Please help me in creating dynamic variable for a select option date field high value.
    II tried the following method:
    1. Enter the values in the selection screen
    2. Save the variant using the SAVE button
    3. In the next screen for the date variable select the 'Selection variable' checkbox (L) and click on the button 'Selection variable' in the toolbar.
    4. Now you will see this variable in the next screen with 3 types of buttons. Click on the middle button (i.e. D - Dynamic date calculation).
    5. Click on the down arrow button and select the option 'Current Date'.
    5. Save the variant.
    But it is saving the date value in Field LOW of select option( From value).
    I need it in TO field( High value).
    Please help.
    regards,
    Sheeba

    Hi Sheeba
        we can do it other way .. Select the same steps as you have done but after the assigning the value current date to low ..click on the selection option push button at the application bar and choose the 'less than or equal to' option to your select option value and try the same ....
    I guess this would throw you same results as that of the value in the high value button
    Cheers,
    Jacks.

  • Add dynamic parameters for Year, From Week and To Week.

    hi all,
    my requirement is Add dynamic parameters for Year, From Week and To Week.
    can any one help how to do this one plz....
    in Answers..
    advanced Thanks..

    hi kansal,
    These requirement for the BI Publisher reports,
    1)Add dynamic parameter for year, From week and To week.
    2) Year to default to Current Year.
    that's what i have dude..
    may be we need to assign the dynamic variables for year ..
    Edited by: 932326 on Sep 4, 2012 7:16 AM

  • Dynamic variable Time for Select

    Hi,
    I try to develop some scripts but always I have the same problem , when I try to put in a Select instruction the variable Time, it doesn´t work correctly (for example):
    *SELECT(%example%,"ID","TIME","[ID]='%TIME_SET%' ")
    It doesn´t read correctly the variable Time_Set.
    Have you got any idea to try to do selects using dynamic variable?
    Thanks for all.

    Hi,
    Dynamic variables like %TIME_SET% do not interact very well with the compiled default logic (LGX files) when it is run after a data send. If you look at the Default.LGX file, you will notice that your *SELECT statement does not appear there because that *SELECT statement has already been compiled. That is why the logic works when it is run via the debugger (because the LGF file is getting executed at run time) and it does not work when it is run via a data send (because the LGX is being executed).
    What you will need to do is:
    1. Create a another logic file (for example: Calculation1.LGF) and copy the text from the Default.LGF to this new logic file.
    2.  Place the following text in the Default.LGF file:
    *RUNLOGIC
    *LOGIC=Calculation1.LGF
    *ENDRUNLOGIC
    3. Validate and save the Default.LGF file
    Now try running the logic after a data send and see if that works.
    Good luck,
    John

  • Selection variable for dynamic selection in QE51n

    Hi All,
    I have a scenario were we have a repetitive Manufacturing and we create one insp. lot of origin 13 and keep creating insp. points for days, so my user wants the insp. points to be displayed only for the past 3 days based of the Date Insp. point identifier which is one of dynamic selection criteria under insp. points, I see with other transaction I can do selection variable on dates for dynamic selection fields but I cannot do that in QE51n, I can do the same in QE51 but not in QE51n, can some tell me if there is a OSS or other way to get this working.
    I appreciate your help.
    Thanks,

    Hi Srikant,
    I think you can meet the requirement in QE51N also.
    In the screen for QE51N :Result Recording Work list", Follow this Path,,,,,,,,,
    Edit--->Dynamic Selection.
    The system will pop-up new small window for "Dynamic selection for insp. lot and operation" here I there is one folder is available named "Inspection point " which is having the selection criteria "Inspection point",  double click on it and enter the desired values.
    Regards,
    Shyamal

  • Are there a dynamic way for evaluting variables in as3?

    Hi..!
    eval() is a usefull method or function in javascript.. Because we may define our variables via dynamic way..! There are following code is for understanding that how can define dynamic defining variables in javascript.. And Are there a dynamic way for evaluting variables in as3 like following javascript code?
    <script language="javascript1.2" type="text/javascript">
    var trainOfUfo = "...hi earthling...";
    var handleBlade = eval("train"+"Of" + "Ufo");
    alert(handleBlade);  //-- it appears in dialog box text field area "...hi earthling..."---
    </script>
    Gürkan Şahin
    Code Developer
    Turkey

    In AS3 you can use the bracket notation...
    var trainOfUfo = "...hi earthling...";
    var handleBlade = this["train"+"Of" + "Ufo"];
    AS2 supports the eval() function, but it was done away with in AS3

  • 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.

Maybe you are looking for