Calculate Month Range from Single Month input

Hi Gurus,
In a particular query, the mandatory input is 0calmonth. Variable used is 0PCALMON.
When user inputs 12.2007, then during runtime one of the keyfigure i need to calculate is quarter quantity for the month range 10.2007 to 12.2007 as 12.2007 falls in this quarter.
Similarly if user inputs 03.2008, quarter quantity will be for these months 01.2008 to 03.2008.
Plz tell me the steps from variable creation and writing code in cmod.
Thanks in advance.
Vaishnavi.

Hi Jaya,
I have written this code in cmod and activated.
when 'ZMQ_RNG'.
Data : ZYear(4) .
Data : ZMon(2) type N .
loop at i_t_var_range into loc_var_range
where vnam = '0PCALMON'.
clear l_s_range.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'.
ZYear = loc_var_range-low(4) .
ZMon = loc_var_range-low+4(2) .
If ( ZMon = '04' or ZMon = '05' or ZMon = '06' ) .
l_s_range-high+4(3) = '06' .
l_s_range-high(4) = ZYear .
l_s_range-low+4(3) = '04' .
l_s_range-low(4) = ZYear .
Endif .
If ( ZMon = '07' or ZMon = '08' or ZMon = '09' ) .
l_s_range-high+4(3) = '09' .
l_s_range-high(4) = ZYear .
l_s_range-low+4(3) = '07' .
l_s_range-low(4) = ZYear .
Endif .
If ( ZMon = '10' or ZMon = '11' or ZMon = '12' ) .
l_s_range-high+4(3) = '012' .
l_s_range-high(4) = ZYear .
l_s_range-low+4(3) = '010' .
l_s_range-low(4) = ZYear .
Endif .
If ( ZMon = '01' or ZMon = '02' or ZMon = '03' ) .
l_s_range-high+4(3) = '03' .
l_s_range-high(4) = ZYear .
l_s_range-low+4(3) = '01' .
l_s_range-low(4) = ZYear .
Endif .
append l_s_range to e_t_range.
exit.
endloop.
ZMQ_RNG variable is customer exit, not ready for input, and mandatory field whereas oPcalmon variable is user entry, ready for input, mandatory.
I have a RKF with 0CALMONTH restricted with ZMQ_RNG on quantity. free characteristics i have ocalmonth with variable 0pcalmon.
Still my RKF doesnot calculate quantities for the 3 month range..
Plz help.
Rgrds,
Vaishnavi

Similar Messages

  • Month Range from Single Month Entry

    Hi Gurus,
    In a particular query, the mandatory input is 0calmonth. Variable used is 0PCALMON.
    When user inputs 12.2007, then during runtime one of the keyfigure i need to calculate is quarter quantity for the month range 10.2007 to 12.2007 as 12.2007 falls in this quarter.
    Similarly if user inputs 03.2008, quarter quantity will be for these months 01.2008 to 03.2008.
    have written this code in cmod and activated.
    when 'ZMQ_RNG'.
    Data : ZYear(4) .
    Data : ZMon(2) type N .
    loop at i_t_var_range into loc_var_range
    where vnam = '0PCALMON'.
    clear l_s_range.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    ZYear = loc_var_range-low(4) .
    ZMon = loc_var_range-low+4(2) .
    If ( ZMon = '04' or ZMon = '05' or ZMon = '06' ) .
    l_s_range-high+4(3) = '06' .
    l_s_range-high(4) = ZYear .
    l_s_range-low+4(3) = '04' .
    l_s_range-low(4) = ZYear .
    Endif .
    If ( ZMon = '07' or ZMon = '08' or ZMon = '09' ) .
    l_s_range-high+4(3) = '09' .
    l_s_range-high(4) = ZYear .
    l_s_range-low+4(3) = '07' .
    l_s_range-low(4) = ZYear .
    Endif .
    If ( ZMon = '10' or ZMon = '11' or ZMon = '12' ) .
    l_s_range-high+4(3) = '012' .
    l_s_range-high(4) = ZYear .
    l_s_range-low+4(3) = '010' .
    l_s_range-low(4) = ZYear .
    Endif .
    If ( ZMon = '01' or ZMon = '02' or ZMon = '03' ) .
    l_s_range-high+4(3) = '03' .
    l_s_range-high(4) = ZYear .
    l_s_range-low+4(3) = '01' .
    l_s_range-low(4) = ZYear .
    Endif .
    append l_s_range to e_t_range.
    exit.
    endloop.
    ZMQ_RNG variable is customer exit, not ready for input, and mandatory field whereas oPcalmon variable is user entry, ready for input, mandatory.
    I have a RKF with 0CALMONTH restricted with ZMQ_RNG on quantity. free characteristics i have ocalmonth with variable 0pcalmon.
    Still my RKF doesnot calculate quantities for the 3 month range..
    Plz help.
    Rgrds,
    Thanks in advance.
    Vaishnavi.

    Hi USERPV,
    Thanks a ton!
    I created one more RKF (hidden) as well as replaced 3 by 2.
    The problem is solved. n my query is executed.
    Assigned points.
    Rgrds,
    vaishnavi

  • Calculate a result from a variable input

    Hello,
    I want to get a particular value for a characteristic when I run the query. I have a query that will return actual results for the month/year (MTD) that the user enters at the beginning. It will also show actual results for two months prior to the current month, budgeted values for current month, actual values for the year, budgeted values for the current year.
    I want to calculate the number of patients from an invoice for the current month (MTD), and for all the other fields mentioned above. I want to restrict them to a particular code and their recipient ID. Do I have to write a customer exit and then include it in a formula variable? I’ve don’t have much experience in doing this. Any help would be greatly appreciated.
              Jul 2006     Aug 2006  Sept 2006  Sept 2006 Bud  YTD 2006 Act  YTD 2006 Bud
    of patients
        Code A
        Code B
        Code C
    I’m using a multiprovider and one of the cubes included is the Invoice cube.
    Thanks
    Sam

    You could do this sort of thing:
    REPORT znrw_calculator               MESSAGE-ID z1.
    PARAMETERS: p_code1(20) LOWER CASE.
    DATA t_source_tab(72) OCCURS 0 WITH HEADER LINE.
    DATA g_program_name LIKE sy-repid.
    DATA g_syntax_message(128).
    DATA g_line_no TYPE i.
    DATA var TYPE p.
    AT SELECTION-SCREEN.
      PERFORM check_dynamic_abap.
    START-OF-SELECTION.
      PERFORM do_the_business IN PROGRAM (g_program_name) CHANGING var .
      WRITE:/ p_code1 NO-GAP,'=' NO-GAP,var.
    *&      Form  CHECK_DYNAMIC_ABAP
    FORM check_dynamic_abap.
      DATA  t_abap(80) OCCURS 0 WITH HEADER LINE.
    *set up a dynamic program
      REFRESH t_source_tab.
      APPEND 'REPORT'                            TO t_source_tab.
      APPEND sy-repid                            TO t_source_tab.
      APPEND '.'                                 TO t_source_tab.
      APPEND 'FORM do_the_business changing var type p.'   TO t_source_tab.
      APPEND 'var =' TO t_source_tab.
      append p_code1 to t_source_tab.
      APPEND '.' TO t_source_tab.
      APPEND 'ENDFORM.'                          TO t_source_tab.
    *Generate the dynamic program so that the form can be used subsequently.
      GENERATE SUBROUTINE POOL t_source_tab NAME g_program_name
               MESSAGE g_syntax_message LINE g_line_no.
      IF sy-subrc <> 0.
        MESSAGE e999 WITH g_syntax_message.
      ENDIF.
    ENDFORM.                         . "CHECK_DYNAMIC_ABAP

  • How to calculate Month on Month growth rates in an OBIEE query?

    Dear all,
    I would like to ask your help on how to calculate Month on Month growth rates [(last month - previous month)/previous month*100%] in an OBIEE query. This ratio should be always calculated for the last 2 available months.
    I have the following query:
    Month0 | Month1 | Month2
    Product A 500 | 100 | 200
    Product B 600 | 300 | 150
    would like to add Month on Month column as following:
    Month0 | Month1 | Month2 | Month on Month(%)
    Product A 500 | 100 | 200 | +100.00%
    Product B 600 | 300 | 150 | -50.00%
    I tried to add a calculated item but it was not successful because I could not find out how to show only the calculated column as % with 2 decimals. Moreover, I would ideally prefer to have an automatic update but as far as I understood it can't be done in the calculated item automatically
    I also tried to add a new column in the column area and to filter the results for the last month, then for the previous month and then based on it to calculate the needed ratio but unfortunately it also does not work out.
    Thank you your hints in advance

    Hi,
    The best way to solve this is using the Ago function. With this you can create a logical column for the previous month. Then you will have 2 columns available with which you can do your calculations.
    If you want to do this with a calculated item (don't know if the formatting will work for you), but you can make the calculation more general by using $1 for column 1 and $2 for column 2 in your calculation. So the relative columns ($x) will change with the columns in your report.
    Regards

  • Reports / intranet/ In some detail,  the user will input a date range from and 2 and will out put the records in the int

    Hello there,
    I am totally green in web development.
    my goal is to, for the user will input a date range from and
    to and will out put the records in the intranet when they press a
    button.
    However, the good news is: I have experience in programming.
    I have written applications for desktop in VB>NET and I
    understand RDBMS /sql concepts .
    But CF and WEB development is new to me.
    My current projects involves in connecting to DB and testing
    it. (it works fine)
    And outputting reports by to a intranet page. (records)
    i need help on how to start this asap. I will even do some
    practice at home.
    Tools I have at work
    • Development server(test)
    • Home site.
    • Toad for db connection.
    • Html reference guide
    • Cf dummies book.
    How can start my projects.
    (ex. Create cf, outputpage?)
    seriously, I am new to this.
    Thanks.

    Well, I had a really nice response with some concepts and
    ideas for you to practise on etc, but these dumb forums timed out
    and I lost it all
    If you want to pop me an email we could probably do a few
    exercises together that way - or even by MSN Messenger if you want.

  • What is the most sensible way to extend a wifi signal. I am in a cinderblock house and I have to buy something that will give me a single network but added range from my airport extreme base station.

    What is the most sensible way to extend a wifi signal. I am in a cinderblock house and I have to buy something that will give me a single network but added range from my airport extreme base station.

    Use an Airport Express. Configure the AEBS to allow it's wireless network to be extended. This is a dropdown menu option under the Wireless tab. Configure the Airport Express to Extend an Existing Network also under it's Wireless tab. You will need to provide the name of your network used in the AEBS as well as the network's access password.

  • In EPM10, how do you call/reference a dynamic range from a macro.

    Hi Gurus
    In EPM10, [we are using SP16,P1], how do you call/reference a dynamic range from a macro.
    EG, in the BPC input sheet below, we have BPC reports ‘000’,’001’,’002’. For report ‘001’,users are able to select from diffent versions which each have different number of months. In the forecast version below, there are 7 months. We require a macro to select & delete f'cast data content of report ‘002’, there after we will manipulate it via the macro and return it. However, standard excel named ranges don’t work per BPC7.x and don’t dynamically expand.
    The macro code in 7.x was:
    Range(“REPORT1_RANGE”).Select >> Does any oneknow the replacement in EPM10 please?

    The following macro which accesses API's looks like it would help to define the report range:
    Sub TopLeftCell()
    Range("c26").Select
    Application.Run "EPMExecuteAPI", "GetDataTopLeftCell", "", "Sales Planning", "001"
    End Sub
    Anybody able to assist with the syntax of this macro..it currently runs without error, however does not return any result?? Note:
    * the parameter ''" relates to the text which i believe can be left if using macros
    *the parameter "Sales Planning" is my worksheet name
    *the parameter "001" is my report definition.
    I was hoping to return the result back to cell C26. Thanks All

  • HFR Range from and to - Not working correctly for hierarchies?

    Hi All,
    Can anyone help me with my below issue relating to ranges in Oracle’s Hyperion Financial Reporting Studio tool.
    The issue I’m experiencing is that when I create a report and use the ‘Add Relationship’ -> ‘Range’ option for my month dimension, the correct months are returned as long as the start month and end month are not the same.
    In our setup we have 2 month hierarchies, one for the fiscal year (July to June) and another for the calendar year (January to December). The problem that I’m noticing in the report, is that when I enter a range from July to July, that instead of returning July, it returns July, August, September, October, November, December, January, February, March, April, May, June, July. My though it that it is looping through both the fiscal and the calendar hierarchies to return the range, instead of only the fiscal hierarchy. Both these hierarchies have the same members, however ordered differently.
    Does anyone know of a way to resolve this within HFR?
    I noticed that when creating the range, there is an option to ‘select a hierarchy’. At the moment there is only 1 choice ‘ Period’, however I’m curious if I could create and link a hierarchy to the fiscal hierarchy, that this might resolve the problem?
    Any ideas?
    Thanks,
    Lance

    Hi Lance,
    IIRC Range uses the first (main) hierarchy - so you'll need to move the Fiscal year one to be first in the outline.
    Cheers, Iain

  • Multiple Hierarchies from Single Dimension Table in OBIEE-11g?

    Is it possible to have Multiple Hierarchies from Single Dimension Table in OBIEE-11g?
    Like 1)Year-Qtr-Month-Weeks 2)Year-Month-Days

    Hi,
    or if your lowest level is the same like
    Day->month->year->Total
    Day->businessMonth->businessyear->Total
    Then yes, it is.
    Create the first, then you start to create the second by adding your top(business year) level on the same level as the one you have (year) both under your total.
    Then when you would add your second base level, there is a special option for it, something like use other hierarchy level/shared level (sorry can't recall and does not have a connection right now) then you select your existing day level under your businessmonth level.
    Hope this helps,
    Regards,
    D

  • Placing Named Ranges from Excel into InDesign

    InDesign CS3 5.0.4, Excel 2003, Windows XP.
    I have placed named ranges from Excel into InDesign and linked them. The Excel file consists of multiple worksheets. I go back now a few months later to update the files. I go to place a couple of new ranges from new worksheets and they don't show up under the correct sheet. ALL my named ranges now show up under the first worksheet only.
    Anybody ever had this happen?
    JAG

    I've upgraded to CS5.5. Ninety-nine times out of a hundred placing named ranges into InDesign from Excel works fine. One time out of a hundred I still see all my named ranges on the first worksheet and none on the rest of the worksheets where I originally named them.
    I save the Excel files as XLS.
    Am I the only one in the universe having this problem?
    Can I get an answer?
    JAG

  • Switching plan from Single app Plan to Photography Plan

    I just switched my plan from single app Photoshop $19.99/month plan to the Photoshop & Lightroom $9.99/month plan because I don't use everything on the larger plan. My original renewal date was in either June or July. Will I be charged fees for changing my plan today?

    HI Sarah,
    I checked your account information. No, you will not be charged fees for changing the plan. You are continuing to use the same product but at a cheaper rate. Enjoy using the software.
    Thanks
    Scott

  • Provide LabVIEW programmin​g service (ranging from school to SME)

    We are LabVIEW team in Spore to assist you in any LabVIEW project, ranging from School to SME. 
    Quick FAQ:
    How Much?  
    We charge on project-basis, at a reasonable price.
    How to Request ?
    Send an email to [email protected] and tell the detail. We will responds to you asap. 
    How if I want to clarify (and verify) by face-to-face ?
    No problem. Send us an email, we can have our team member to talk to you.
    How if I found a bug ?
    We provide 3 months software guarantee (bug-fix). We will debug and reply to you within 24 hours during first month of guarantee period and 48 hours for the next 2 months(weekday).
    Please don't feel hesitate to email [email protected] for any enquiry.

    Where the heck is Spore?
    And what kind of company has gmail as an address?
    Plus as Dennis mentionned, this is the wrong forum.  Can you post some of your sample code for people to review your skills?

  • I am trying to log data from 4 voltage input signal using labview, but when i use DAQ assistant i am able to log data from one signal at a time only.

    I am trying to log data from 4 voltage input signal using labview, but when i use DAQ assiatant i am able to log data from one signal at a time only.I am trying to get all 4 input data to logged in a single file againt time. I am new to Labview, I need to sample this data within a couple of days can someone help please.

    Naveen
    Check out the info in the Analog Input section of the document linked below.  (Ignore the part about Global Channels.)  In Figure 5, notice that you can select multiple channels while holding <Ctrl> or <Shift>.
    Developer Zone Tutorial: NI-DAQmx Express VI Tutorial
    Kyle B  |  Product Support Engineer  |  ni.com/support

  • Need help with EXS24 "read velocity range from file name"

    I am trying to import 127 drum samples to a single key using the option shown here. The option says "Map to key dropped on and read velocity range from file name". I can find no documentation in the manuals on how to do this. What is the syntax required in the file name to make this work? I need to do several of these imports. The capability is cleary there, but I need help on how the file name should be formatted. My thanks to anyone who can help.

    Hi
    Not a direct answer to your question, but if you are doing a lot of sample mapping etc, you may want to check out Redmatica's KeyMap Pro or the simpler Keymap 1:
    http://www.redmatica.com
    CCT

  • In Report output, Missing Plan data with the Seletion option - Single Value input (more than 10 values)

    Hi ,
    I am running the Query (Actual Vs Plan) in the BEx Analyzer, with the input for the characteristic like Fiscal Year, Posting Period and Cost Center(20 Single value) it not comming up with the plan data - Actual data is coming up fine.
    If i gave 10 or less than 10 inputs ( single values input in the selection - option ) for the characteristic COST CENTER it coming up with all the data (Both plan and Actual).  if the COST CENTER input values more than 10, it not coming up plan data (Actual data is coming)
    Cost Center Variable is designed with an Authorization Variable.
    Can any one please help me to know why plan data is getting miss when the input limit more than 10 (single values input in the selection - option) in the Cost Center Variable? 
    An also could you please share that, What is the Max limit for the Single values and Range Value for an Selection - option in the BEx Variable.

    A)    Hi ,
                 In Report, I am having 2 variant.
    1.   For one variant, i have saved the input values for both the Select Single values & Select range for the cost center.
    8 Values in single & 4 Values in Ranges         
    It coming up with data successfully.
    2.    Another variant having input only for select single values for the COST CENTER, it contains 20 records (This variant also have restricted with the same values as above variant for COSTCENTER variable)
    Fiscal year                         : 2012
    Posting period                   : 8
    Cost Center                        : 20 values in Single                                             (Here I have separated the range values into single)
    It’s not coming up with plan data. 
    B)   If I gave only first 10 values in the Single value, Output for both actual and Plan are coming up…………. If I gave the Second 10 value in the Single value and got the Output for both actual and Plan.
    C)    I have also checked the following details of this query, 
    Executed the query in RSECADMIN and checked the Authorization log as below,
    Relevant Characteristics for Detailed Authorization Check  (Characteristics with Full Authorization Are Not Listed!)
      List of Effective Authorization-Relevant Characteristics for InfoProvider ZPCA_M36: 
    List Is Empty:
      There Are No Characteristics That Have to Be Checked in Detail 
              2.  Checked the Single value input by iteration, 1 to 10, it retrieves data.  More than 10 like 11, 12 … is getting failed to pull plan data.
              3. checked the selection Value range by iteration and I gave the range value count up to 25        inputs, its works fine.
    Thanks.
    Regards,
    Subashini.

Maybe you are looking for

  • HP Deskjet 1510 Tri-color Ink Cartridge Error

    I just bought a HP Deskjet 1510 back in August and I loaded the HP original ink cartridges that come with the purchase. For the first 5 print jobs it was working well, but somehow after a while my laptop and the printer itself just kept warning that

  • I don't have my iPhone but how can i get my contacts on my mac?

    i don't have my iPhone but how can i get my contacts on my mac?

  • What config is required to set up Transportaion planning for the delivery?

    Hi experts, I am trying create shipment for delivery.It not picking the delivery for shipment.I checked the status in delivery and Transportaion planning is not showing as 'A'.What config is required to set up TP for the delivery? Please advise

  • How to add calender component

    hi maxideon. i done upto the diagram which is shown to you. now i have small problem anybody please go through this link then you will get idea [http://www.mediafire.com/?sharekey=c2ec1a687d8279f091b20cc0d07ba4d2ddbbdb9f07ee802d] in the paint diagram

  • Layouts for Pages

    Where can I find layouts for Pages? Some models for us to use, like we can see in Appleworks and Word ( to do list, shopping list... and this kind of stuff) CV