Variable to calculate quarterwise fiscalyear?

Hi experts,
I got a requirement to caluculate the based on fiscal year quarterwise!  In short which is the variable to use based on quarterwise like Q1,Q2,Q3,Q4 it is on 3months wise.
I find out this variable as:Current Quarter (Season) for Fiscal Year (Virtual Hierarchy 0N_RTFPQ
i installed this variable but i cant able to see in my query designer.
help me in this.
Thanks in Advance

Hi,
Craete the Customet Exit Variables on CalMonth and then use the following code, in Columns you can create new selections and then use offsets to the followoing variables, then display Month wise and for Quarter you add 3 month in one formula ....like that you can do it.
* First Month Of Current Fiscal year comment*
    WHEN 'FIRSTMYEAR'.
      CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
             EXPORTING
               i_date               = sy-datum
*         I_MONMIT             = 00
               i_periv              = 'V3'
            IMPORTING
              e_buper              =  zbuper
              e_gjahr              =  zbdatj.
      CLEAR: l_s_range.
      l_s_range-low+4(2) = '04'.
      l_s_range-low+0(4) = zbdatj.
      l_s_range-sign = 'I'.
      l_s_range-opt = 'EQ'.
      APPEND l_s_range TO e_t_range.
* Last Month of Current Fiscal year*
    WHEN 'LASTMYEAR'.
      CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
             EXPORTING
               i_date               = sy-datum
*         I_MONMIT             = 00
               i_periv              = 'V3'
            IMPORTING
              e_buper              =  zbuper
              e_gjahr              =  zbdatj.
      CLEAR: l_s_range.
      l_s_range-low+4(2) = '03'.
      l_s_range-low+0(4) = zbdatj + 1.
      l_s_range-sign = 'I'.
      l_s_range-opt = 'EQ'.
      APPEND l_s_range TO e_t_range.
Thanks
Reddy

Similar Messages

  • Is there any standard variable to calculate previous and current month

    hi,
    Is there any standar variable to calculate previous month and current month which will calcualte from system date (sy-date). I found standard SAP Delivered variable - 0CMONTH to calculate current month. But i want both current month and previous month.  IF it is not avialble can you please provide me the ABAP code..
    thanks in advance.

    Hi,
    Check this thread.
    ABAP routine for loading previous months data in infopackage
    Regards.

  • How to use formula variable to calculate the days for a document.

    Hi expert.
    I have a question, I need to calculate how many days it cost for a document, therefore , it should be like this,
    cost days = clearing date - creation date..
    how can I implement this calculated key figure by formula variable..
    Here cost days should be a key figure, but the clearing date and creation date are the characteristics in the document.
    it seems that formula variable by replacement path can not be used, do I have to use the customer exit for this variable ??
    any other good ways to calculate the cost days (beside during the data loading or by virtual key figure).
    I just want to implement this in the query designer..
    Please give a detailed steps if you could,  thanks a lot.

    Hi,
    These steps below are for the query designer in BI 7.0:
    1. First create a Formula in the Columns.
    2. Edit the formula, in the "Available Operands" see for the "Formula Variable".
    3. Right Click on the "Formula Variable" folder and then create a new variable.
    4. Edi the Formula Variable in the edit screen provide the Description and Technical name; select the processing by as Replacement path.
    5. In the reference characteristic select your characteristic "Creation Date".
    6. Save the variable.
    7. Select the variable into the formula and name the formula as Creation Date.
    Repeat the Same steps for the "Clearing Date".
    Then create another formula for the Cost days in which you mention as Clearing date (Formula) - Creation Date (Formula).
    Hope your issue is solved...
    Regards,
    Ravi Kanth

  • User Exit Formula Variable - to calculate #days of any month

    Hello Team,
    I need a column in my report layout which shows the #days of any month entered by the user. User entry 01.2014 to 03.2014 report should have 31 28 & 31 according to the Calendar month in the rows.
    To achieve this I'm using a user exit formula variable in my local calculation. An Optional Interval User Entry variable on CALMONTH is also put in at the filter section.
    I created a CLASS with 2 methods CONSTRUCTOR( vNam = 'ZC2C_DSONWDAYS') & GET_VALUES. We may also use FM /OSP/GET_DAYS_IN_MONTH but i need the code because I failed terribly.
    GET_VALUES method code:
    if i_step = 2.
       DATA: wa like line of i_t_var_range[].
       DATA: L_V_INDICATOR TYPE SCAL-INDICATOR.
       data: begin of ccrange ,
               iobjnm(30) type c,
                 sign(1),
                  opt(2),
                  low(7) type c,
                 high(7) type c,
             end of ccrange.
      data: l_s_range type rrrangesid,
            no_of_wrkdays type i value 0,
            startdate     type d,
            enddate       type d,
            startmth(2)   type c,
            endmth(2)     type c,
            startyr(4)    type c,
            endyr(4)      type c,
            endday(2)     type c,
            leapyear      type i value 0,
            dayofmth      type syst-datum.
    DATA:  day           type SCAL-INDICATOR.
      loop at i_t_var_range into wa.
        if wa-iobjnm = '0CALMONTH'.
           ccrange-sign = wa-sign.
           ccrange-opt = wa-opt.
           ccrange-low = wa-low.
           ccrange-high = wa-high.
           exit.
        endif.
      endloop.
      startyr  = ccrange-low+0(4).
      startmth = ccrange-low+4(2).
      endyr    = ccrange-high+0(4).
      endmth   = ccrange-high+4(2).
      concatenate startyr startmth '01' into startdate.
    * determine last day of the end month
      if endmth = '02'.
         leapyear = endyr mod 4.
         if leapyear = 0.
            endday = '29'.
         else.
            endday = '28'.
         endif.
      elseif ( endmth = '04' or endmth = '06' or endmth = '09' or endmth = '11' ).
           endday = '30'.
      else.
           endday = '31'.
      endif.
      concatenate endyr endmth endday into enddate.
      dayofmth = startdate.
    IF startmth <= endmth.
       startmth = startmth+1.
    ENDIF.
    * do it for all days in space of time
       WHILE dayofmth <= enddate.     "to date
         CALL FUNCTION '/OSP/GET_DAYS_IN_MONTH'
         EXPORTING
           input = startmth
         IMPORTING
           output = no_of_wrkdays.
           CLEAR l_s_range.
           l_s_range-sign = 'I'.
           l_s_range-opt = 'EQ'.
           l_s_range-low = no_of_wrkdays.
       append l_s_range to e_t_range.
           startmth = startmth + 1.
           CONCATENATE startyr startmth '01' into dayofmth.
        ENDWHILE.
    endif.
    endmethod.

    Hi Vasavi,
    1)  Create a FV to calculate no.of days  like below, with calmonth in ref characteristics :
    2. If you see number of days is an attribute of calmonth. Please enter that as below :
    3. Create a formula with above variable and make sure calmonth is added in the row.
    Its giving output like this :
    I hope this will help you.
    Thanks,

  • Customer exit for query variable to calculate amount since 1998

    Hi Experts,
    I am trying to fetch the expenses since 1998 till last fiscal year in Bex Query.
    I have created a variable ZFYRVAR1, processing type customer exit, Interval, Mandatory. I unchecked 'Variable is ready for input' box. There is no 0CALYEAR in the infocube. We have 0FISCYEAR and 0FISCPER in the InfoCube.
    We wrote following code to populate the variable. It is throwing a warning message.
    Value " is too long for variable ZFYRVAR1.
    The column remains empty and nothing is populated. Can somebody tell me whats wrong with the code. I also defined another variable instead of l_year. like
    zyear like /bi0/pfiscyear-fiscyear.  but same error.
    Any help is appreciated.
    data: l_s_range type rsr_s_rangesid.
    data: l_year(4)     type n.
    case i_vnam.
    l_year = sy-datum+0(4).
      l_s_range-high = l_year - 1.
       l_year = 1998.
      l_s_range-low = l_year.
      clear e_t_range.
      l_s_range-sign = 'I'.
      l_s_range-opt  = 'BT'.
      append l_s_range to e_t_range.
    endcase.

    Hi Sheo,
    Hope the sample code below helps you. You can debug it in RSRT to be sure.
    DATA: L_S_RANGE TYPE rsr_r_rrrangesid.
    DATA: l_yearh(4) type c,
          l_yearl(4) type c.
    IF I_STEP = '2'.
      if i_vnam = 'ZFYRVAR1'.
         *Please check your user profile to make sure l_year is in the format YYYYMMDD.
         l_yearh = sy-datum(4).
         l_yearh = l_yearh - 1.
         l_yearl = '1998'.
         l_s_range-high = l_yearh.
         l_s_range-low = l_yearl.
         l_s_range-sign = 'I'.
         l_s_range-opt = 'BT'.
        APPEND L_S_RANGE TO E_T_RANGE.
        exit.
      endif.
    ENDIF.

  • Dashboard Prompt - Variable - Populate/Calculate column in Pivot Table

    1. I have a need to store the values of three prompts (Year, Quarter and Month) in my dashboard prompt, So a 'column A' (calculated value/measure) can be dynamically populated in my pivot table based on the users chioce.
    These prompts have to be multiselect prompts as the user may opt for 2 or more years/ quarters / months etc.
    I don't think Presentation Variable would work as I have to use multiselect prompt, I have been trying Non-System Session Variables & dynamic repository variables- but could not get it to work. I am thinking only of using one of the three variables (session/dynamic/presentation) so far, is there a better way to tackle this?
    Any help/pointers would be much appreciated, thanks

    I should clarify a little: our sales "process" is very simple (not really a process). We do not use Opportunities. We enter new Leads, and if we win the business, we convert them to a Contact. Thus, our "win %" is simply the number of converted Leads divided by the total Leads for a given period. In my table I would like to display the % of Leads for a given period that are converted to Contacts.
    Thanks again.

  • FM to calculate fiscalyear period from current date

    Experts,
    Is there any FM which outputs fiscal year period in the format mmm/yyyy when current date is given as input. I need this coz i want to automatically calculate current fiscalyear period for a query variable..
    Thanks,
    DV

    Hi Edwin,
    When i expand the Fiscalyear Period infoobject in the query design in globval view, i donty see 0F_FPER. Does that mean it has to activated from Business Content? Or can i create a variable like that one??
    DV

  • Formula variable using Replacement path not working

    Dear All,
    I am using a query to calculate YTD values in the report. I am using a formula variable to calculate the number of months. Formula is
    Month To - Month From+1
    When I am giving the range from 001 to 006 for period in th evariable screen,
    I am gettung Month To as 6 and Month From as 6 with total no . of months as 1.
    I think Month From is not being caculated properly. I created another formul variable using Replacement path, for characteristic Posting period, replace with a Key and dimension ID as number with out any offset.
    Still not working.
    Any suggestions.
    Thanks and Regards,
    Srini
    Edited by: Srinivas on Apr 24, 2008 11:13 AM

    Hello,
    I have seen this document already. It is slightly different from what I am trying to do here than what the post shows. How ever,  I did everything right, atleast seems to be and don´t know why I am not getting the From value from the posting period selected. To value variable is coming right.
    Any more sugegstions.?
    Thanks and Regards,
    Srini

  • How to create a customer-exit to calculate a week from a date

    Hi my Guru's,
    I actually try to implement an Exit variable to calculate a week number from a characteristic date (0FINISHDATE) in my BEX report. Does anyone has an example of customer-exit which calculate a week number after giving a date in the popup.
    What I really need is how to initialize the OFINISHDATE value in my Exit.
    Any help will be appreciate,
    Cheers,
    MK2

    Hi,
    I  donot know this following workaround works properly are not. we have to wait for Our BW gurus' suggestions.
    1) Create a formula variable with 'Replacement path' as processing type on Characterstic 0FINISHDATE.
    2) Create one more Formula variable with 'customer exit' as processing type .
    3) In Cmod
    DATA: l_s_range type rsr_s_rangesid.
    DATA: datein like sy-datum. "la caractéristique date
    DATA: date2 like SCAL-WEEK. " déclaration de Résultat
    DATA : NUMB1(2) TYPE N.
    CASE i_vnam.
    when 'FORMULA_VARIABLE2'.
    IF I_STEP = 2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'FORMULA_VARIABLE1'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW(8) = LOC_VAR_RANGE-LOW(8)
    datein(8)  = L_S_RANGE-LOW(8).
    here we are finding the Week no user entered date.
    CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
    DATE = datein
    IMPORTING
    WEEK = date2.
    numb1 = date2+4(2)
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW  = numb1.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT  = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDCASE.
    With rgds,
    Anil Kumar Sharma .P
    Message was edited by: Anil Kumar Sharma

  • User Variable used in my virtual KF

    Hello,
    I would like that a BEx user enter a value a variable (into a popup windows) then I will use the result of this variable to calculate a Virtual Key Figures.
    Is it Possible ?
    Thanks in advance for your help.
    Stephane

    Hi Stephane,
    please check the HowTo paper underneath for a detailed description how to pass the variable values:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how to use variable time references in currency conversion
      Cheers
         Andreas

  • Variable works in Dev but not in Test in Webi report

    Hi All,
    I have written a variable to calculate Average. It works fine for all entries in Dev. But when I transport it to Test Environment, it works fine for some entries and does not work for some entries.
    Any suggestions?
    This is happening in WEBI Report.
    Regards
    Edited by: No.One on Sep 21, 2011 2:45 PM

    Hi,
    Compare the formula of the variable in Dev and in QA. Might be some operands might bwe missing in QA environment.
    Cheers,
    Suresh Aluri.

  • How can i do a variable User exit that present the values before execute

    Hi Gurus,
    How can i do a variable User exit that present the values before execute, i need this:
    a variable that calculate SYS-DATUM until 30 days before (I got the code) but this  variable run automatic because is user exit, i want this variable but first present the values, not execute automatic, this is because the users want the report that automatic present the values , help

    Hi,
    Refer the below links,
    http://documentation.softwareag.com/natural/nat424mf/pdf/ops_mf/conf_usrex.pdf
    http://www.erpgenie.com/component/content/article/1097
    http://www.apentia-online.at/UP/Apentia/files/Article/SAP_BW_User_Exits_and_BAdIs.pdf
    Hope it helps you,
    Regards,
    Ravindra.

  • Use of variables in cross tab

    Hi experts,
    Can anyone tell me how to use a variable in cross-tab?
    I am populating the crosstab from the columns of a table.
    I want to use a variable (say percentage of averages) which calculates for each month for any number of months the data has been generated.
    Ex: Demo is my table and contains two average fields - average1 and average2 generated once for each month.
    Now I want a variable which calcaulates for each month, their variance based on some formula like (average1-average2)/average1.
    I have created a variable which calculates according to the above formula but its value is getting repeated for each month (the value of the first month) . It is not giving me the value corresponding to each month.
    Request you to help me.
    Thanks,
    Roshan

    Hi,
    Thanks for the reply.
    I have the following data from the cross tab.
         Jan     Feb     March
    Average 1     25     35     50
    Average 2     20     20     35
    Average 3     15     10     25
    And i want to generate the following structure dynammically based on the number of months/quarters.
         Jan     Var %     Feb     Var %     March     Var %
    Average 1     25          35          50     
    Average 2     20     20     20     42.85     35     30
    Average 3     15     40     10     71.42     25     50
    The new columns in the crosstab display should be dynamically generated.
    Request you to help me generate the new columns and the values.
    I have created this table in MS-Excel for reference.
    Thanks,
    Roshan

  • HUman Task and process variable

    Hi Experts,
    Can you tell me
    1)how to aceess the value of process variable
    2) calculate total number of human task assocciated with a process using API's in worklist.
    I am using BPM 11g,JDeveloper 11g
    Thanx in advance

    Hi Experts,
    Can you tell me
    1)how to aceess the value of process variable
    2) calculate total number of human task assocciated with a process using API's in worklist.
    I am using BPM 11g,JDeveloper 11g
    Thanx in advance

  • Formula Variables and their use

    I have a scenario where I have a date selection using a variable.
    I get from and to date defaulted to 1st day of the month and current date
    Next, I created a formula variable to calculate the difference between these 2 dates.
    I can't uses replacement path variable to calculate the difference becaue the dates are not part of the transaction data.
    When ever I bring formual variable into a formual it gives an error
    Terminate: Variable D1QDQC684JU76RD3FQ10GECZ9 (D1QDQC684JU76RD3FQ10GECZ9) does not exist or is incorrectly used D1QUMP50BGW24SQ9PQMZDSMD1 [A418(BRAIN)]
    This error is not in the customer exit. This error happens in the query designer design phase during syntax checks.
    Thanks for your help
    Kartik

    there was a problem in defining the variables, while u r opening your query, and if its getting terminated means, definition of the variable and its usage is wrong somewhere else.
    Here is the step by step procedure for Formula variables:
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html

Maybe you are looking for

  • Displaying a theme-based FOI layer as a whole image with javascript API v2

    Hi, I have looked the Oracle maps V2 tutorial developed in mvdemo.war application provided with Oracle Mapviewer v11.1.1.7. I have looked how to use theme-based FOI layers and I have not found how to set the "whole image" property for these layers. T

  • FV60 - validate duplicate invoices by reference and vendor number

    Hi, How to configure the system to validate duplicated invoice by REFERENCE AND VENDOR NUMBER irrespective of dates? This validation need in FV60.

  • DW CS3 with ADDT crashes.

    Hi all, A strange thing has just started on my DWCS3/ADDT installation. Whenever I open a page that has anything to do with ADDT on it, DWCS3 hangs immediately and a XP Pro error message appears on screen informing me "Adobe Dreamweaver CS3 has encou

  • Itunes 10.7 stops working

    I have been trying to install itunes 10.7 and when the installation is completed and the application tries to load, I keep getting a pop up stating "iTunes has stopped working" I then can either chose "Check online for a solution and close the progra

  • How did I get duplicate (as in 2) System Preferences windows?

    Greetings ACS Fellows, As a loyal and faithful Mac user who has used Macs for many a year, how can it be possible that I have right now - upon the iMac desktop of yours truly - running Snow Leopard 10.6.8 albeit in 64-bit mode; two, count em', two Sy