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.

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 variable for InfoObject with texts

    Hello experts,
    In the BW I have an InfoObject of type NUMC 19 that stores tasks master data and does have texts, we assume that the InfoObject is called Z_TASK. The texts represent the multi lingual task names. I need to build up a query that filters on the task names, e.g. all tasks between A* and C*.
    When I use a variable in the query, the variable takes the key field values (NUMC values of the InfoObject Z_TASK).
    My questions are:
    1. Is there a possibility to solve this problem using query variables?
    2. Other solutions?
    Thanks in advance.
    Marco

    Hi Marco,
    one possibility would be to create a ods object and post the master data to that ods. Include the text (description) into the datafields of the ods. Enable BEX reporting for the ods. Create a Query on it with a variable selection on the text. Now go back to your other query and create a variable for your task infoobject. Use the prequery on the ods as replacement path for z_task. That should do the job.
    kind regards
    Siggi

  • 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

  • Name of the query variables for any BI query

    Hi Experts,
    Wanted to know the query variable names for any query.
    is there any table which stores the names against any query?
    any help is much appriciated.
    thanks in advance,
    Subhasis.

    Hi Rahul,
    thanks for your reply.I have tried with these table but I have not got it.
    my requirement is,I have one query with two variables calmonth and Employee subgroup.
    Now I need the table name where I'll provide the query name and table will return the variable names.
    If the tables which you provided can give the desired output,then pls tell me the input(s) that i need to give to the table.
    thanks in advance,
    Subhasis.

  • 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

  • Query variable for characteristic with texts

    Hello experts,
    I need some help on the following issue:
    I want to do master data reporting on a characteristic of type numc that has texts.
    I need to filter on a certain text range of the characteristic by using a variable, e.g. select all records between E* and F*.
    The problem is that I can only access the numeric ranges of the characteristics and not the texts directly.
    Any ideas?
    Thanks in advance.

    hi ,
    create a variable using texts and then try .
    regards .. Kumar Sarvepalli .. /// Honor points

  • Urgent!!Variable for days not displaying properly!!!

    Hi
    When executing the Query,Variable for displaying Aging in days are not displaying between the selection.Pls any one help with regard to it.Pls tell wht r the main thing to be taken to consideration for this issue.
    Thanks

    Hi
    We have 2 formula var.
    <b>Current Cal day</b> which is based on SAP exit ,single val ,mandatory & dimension is date
    Another Formula var--<b>PR Info date</b> based on Replacemtn path ,replace with infoobject ,key,Interval value from,offset 0 to 8,single val ,optional & dimention tab as date.
    So calculating Ageing as   <b>Var Current Cal day</b> Minus <b> VarPR Info date</b>
    Then u have condition for Ageing Selection, with above calculating ageing -
    operator between, another var as AGING Frm & aging TO which is  form var by manual input ,interval is From val & Offset start & length  as 0 & 0, single val & optional..
    These r the selction made for the variables.
    Pls if u can get idea,tell where the problem is??????????URGENT
    ASAP...When I select range, Calculate COlumn for Ageing ..........displays all different days values not as per the selection range.

  • Error while running a query-Input for variable 'Posting Period is invalid

    Hi All,
    NOTE: This error is only cropping up when I input 12 in the posting period variable selection. If I put in any other value from 1-11 I am not getting any errors. Any ideas why this might be happening?
    I am getting the following error when I try and run a query - "Input for variable 'Posting Period (Single entry, mandatory)' is invalid" - On further clicking on this error the message displayed is as follows -
    Diagnosis
    Variable Posting Period (Single Value Entry, Mandatory) is used as a lower limit (X) and an upper limit () in an interval selection. This limit has the value #.
    System Response
    Procedure
    Enter a different value for variable Posting Period (Single Value Entry, Mandatory). If the value of the other limit is determined by another variable, you can change its value also.
    Procedure for System Administration

    OK.
    Well, if the variable is not used in any interval selection, then I would say "something happened to it".
    I would make a copy of the query and run it to check if I get the same problem with period 12.
       -> If not, something is wrong in the original query (you can proceed as below, if changes to original are permitted).
    If so, then try removing the variable completely from the query and hardcode restriction to 12.
       -> If problem still persists, I would have to do some thinking.
    If problem is gone, then add the variable again. Check.
       -> If problem is back, then the variable "is sick". Only quick thing to do, is to build an identical variable and use that one.
    If problem also happens with the new variable, then it's time to share this experience with someone else and consider raising an OSS.
    Good luck!
    Jacob
    P.S: what fisc year variant are you using?
    Edited by: Jacob Jansen on Jan 25, 2010 8:36 PM

  • How to use one Bex Variable for two purposes in one query?

    Hi,
    I want to prompt for a UOM in a query. Then I want to use that one UOM variable to do 2 tasks in the query:
    1. Perform a UOM conversion on one restricted key figure (no filtering)
    2. Filter in a second restricted key figure (no conversion)
    How would I use a variable (or two?) to do this? I do not want to have 2 UOM prompts.
    Thanks!
    Gregg

    Oh, it all seems so easy now!  Hindsight 20-20...
    Solution was to create a new input ready variable for Unit.
    1. Restrict the key figures which need restricting using new variable
    2. For conversions, in BI backend us T-code RSUOM and create new conversion type associated with new variable. Then for each key figure needing conversion, set the conversion parameter to use the new conversion type.
    Between both 1 & 2 above, the same variable is used & thus prompted only once.
    Solution works perfectly.... as it should. Hope this helps someone else!

  • Using a variable for a query? Advice needed

    Hello everyone,
    I am new to JDBC and have a small problem with my application:
    I want the user to enter a word and depending on the word he enters, the program will run a query searching for that word.
    For example the user input is stored in a variable called "input", which is converted to a String.
    How can I modify the following command so that it actually uses the "value" as a variable?
    s.execute("select * from Users WHERE Name=input");
    Thank you very much for your help!

    "value" as a variable?
    s.execute("select * from Users WHERE Name=input");
    Thank you very much for your help!Use PreparedStatement, something like this:
    public User find(String name) throws SQLException
        User user = null;
        // Name might be a very poor choice for a column name.  Make sure it's not a keyword
        String sql = "SELECT * FROM Users Where Name = ?";
        PreparedStatement stmt = null;
        ResultSet rs = null;
        try
            stmt = connection.prepareStatement(sql);
            stmt.setString(1, name);
            rs = stmt.executeQuery();
            while (rs.next())
                // load rs into User
        finally
            close(rs);  // you'll need to write these static methods
            close(stmt);
        return user;
    }%

  • Input Ready Query, Variable read mode setting Only Values for InfoProvider

    Hi,
    I have a problem with Selection Variable for a BEx Query :
    - I'm working with SAP BI 7.0 support package 15
    - My query is an input ready query built for an "aggregation level" based on "real time infocube" (Planning);
    - Characteristic, I want to filter with variable, has query property Advanced->Query Execution for Filter Value Selection = Only Values in InfoProvider
    - Characteristic (info-object) has set the property: Business Explorer tab--> Query Def. Filter Value Selection as Only Values in the info-provider...
    My problem is:
    when I execute a query,
    the Select Values for Variables screen appears
    I push on the Select from List button
    and Select Values For MyCharacteristic appears...
    but it shows me all values in master data table of my characteristic instead of only values in the infoprovider!!!
    If I build a query for the Real Time Cube it works correctly, but if the query is built for the aggregation level it doesn't work!
    Could someone explain me why it doesn't work correctly?
    Thanks in advanced
    Fede

    Thanks to  Mariana Lazar
    30.03.2009 - 12:30:36 CET - Risposta by SAP     
    Dear Fede,
    Regarding the query built on aggregation level please note the following
    the aggregation level is always a Virtual Provider built other
    InfoProvider and hence it does not have the dimension table and hence
    the F4 mode D is not supported.
    Therefore when aggregation level is used in a query, F4 does not supportD-mode: 'Only Values in InfoProvider' and all master data values are
    displayed in the value list.
    Reference from the note
    984229 F4 modes for input help as of SAP NetWeaver 2004s BI
    4. Since other InfoProviders do not have a dimension table, the system
    displays only posted values if you select "Only Posted Values for
    Navigation". Otherwise, it displays the values from the master data
    table.
    Hope this should clarify your doubts. Please let me know if you have
    questions else please confirm the message at your earliest convenience.
    Thank you for your cooperation and kind regards,
    @KR@ Mariana Lazar
    Senior Support Consultant
    SAP Active Global Support
    Netweaver Business Warehouse

  • CF Set form.variable for query and Next/Previous pages error

    I have a CF form with a select that posts to a CF "action" page.
    On the action page I: CFSET ItemNumber=#form.ItemNumber#
    I CFOUTPUT the 'ItemNumber' into the CFQUERY (which is an Inner Join dependant on the '#ItemNumber#')...
    All of the above works just fine and displays the database fields in color alternating rows, per the rest of the code.
    Here's the problem:
    I'm displaying 40 rows on a page per "Next and Previous" code. (CFPARAM name="start" default="1" and CFPARAM name="disp" default="40" along with the rest of the NextN code in the header and body). This does display 40 rows on the page and puts a link at the bottom of the page "Next 40 Rows", etc.
    Note: I'm only querying the database once and using the query (query name="data") to populate the table rows And the NextN code (CFOUTPUT name="data") And (CFIF start + disp GREATER THAN data.RecordCount, etc)...
    The problem happens when you click the "Next 40 Rows" link to display the 2nd page of rows. Since (I'm assuming) this NextN code is 're-reading' the same page from top to bottom, an error is thrown when the code tries to read the CFSET ItemNumber=#form.ItemNumber# at the top of the page.
    With the #form.ItemNumber# on this action page Originally coming from the previous posting of the form to this action page, when the "Next 40 Rows" link is clicked and the NextN code re-reads this action page - the CFSET ItemNumber (#form.ItemNumber) is not getting populated and throws the error...
    I hope I've not made this sound confusing.
    I can get the NextN code to work when I'm just querying the database without "flying in" a form variable. But when I CFSET a variable (#form.ItemNumber#) that is inserted into the query, the second page of the NextN throws an error and doesn't display.
    I would include the page code here but it would be fairly lengthy and, as well, the NextN code is a 'standard' CF code -- I've narrowed the problem down to the above "Element is undefined" (when the page tries to reload from the "Next 40 Rows" link) and am hoping there's a simple fix or another way to display the records in Next and Previous pages.
    Thanks to anyone in advance for shedding light on this.
    - e

    Thank you for the reply, Owain.
    Yes - The Next/Previous at the bottom of the page are hyperlinks.
    <a href="ThisPage.cfm?start=#Evaluate("start + disp")#">
    The following is at the top of the page (and is the variable from the form that I CFOUTPUT in the query):
    <cfparam name="ItemNumberDropdown01" default="">
    <cfset ItemNumber = #form.ItemNumberDropdown01#>
    The error report showed that the "Next Page" hyperlink was reading an undefined variable... although when the "action page" first opens from the form posting to it, it populates the CFSET just fine (per the cfparam and cfset above)... As you mention, the hyperlink clearing the form scope is what causes the error in trying to display the next set of records...
    The form page and the 'action page' are both secure pages with an application page setting the session, etc. Am I at risk in using an URL scope?
    Where would this URL scope be put? (The href is shown above - would the URL scope go in this? - How would this be written?)
    The CFPARAM and CFSET would still exist at the top of the 'action page' and still throw an error wouldn't it or would this be replaced with something else to read the form.variable for this 'first' action page to be displayed?
    Thanks again for the 'education' on this...
    - ed

  • How to define variable for value range in Bex Query?

    Hi
    How to define variable for Keyfig. value range on runtime like characteristic in Bex Query?
    Example: On runtime user select one of the following condition:
    1)User want to those records where amount is greater than $1000
    2)User want to those records where amount is greater than $1000 and less than $5000
    3)User want to those records where amount is greater than and equal to $1000

    Hi ,
    Need to Use exceptions & conditions for this scenario's  & need to create variable for exceptions based on condtions.
    Below document provides steps how to make selections at run time for a kfg.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60b33a28-dca2-2d10-f3b2-d2096b460b1e?QuickLink=index&overridelayout=true&48842368468641
    Regards,
    Seshu.P

Maybe you are looking for

  • How to open .erd extension files in windows system

    Hi, we generated erd diagram with TOAD application from oracle database that generated a file with .erd extension . but could not able to open .erd file in our windows system for review.. please help me out which tool/utility or free software help us

  • Graphic Distortion Since Upgrade to Yosemite

    I finally updated to Yosemite today. Since then, I am having the same issue as I have seen other posts about regarding the graphics. They are quite pixely and on other images (such as on Pinterest), there is a bunch of random different colors on cert

  • How to stop thread in midp

    hi all, how could I destroy the thread in MIDP ? it always shows true while invoking the method isAlive() on the thread. thanx

  • Probléme bar menu action script 3 fichier.as

    I have a bar menu that appears when you open a file main.as. Now I see that on the demo cd that you get with Adobe, there is a box to select the target file that works with. My problem is that I have the flash cs3 pro and I'm not in my target box men

  • Weird subfolders in iPhoto library

    Hello. Ever since I upgraded to iPhoto '11, I have noticed that when I import my photos it creates a million (okay, around 3) crazy titled subfolders, many of which are empty. When I click on "show original file" instead of the picture being in a fol