How to get previous fiscal period(Fiscal Period-1)

Hi ,
According to my business scenario for reporting-(BI-7) , I want to move FISCPER by 1 . The formula for this is ,
Formula: (Restricited key figure)Sales Order $ (Prior)=Char = Fiscal Period - 1
                                                                              KF =  Sales Order $
I also need a variable for fiscal period for user entry -Single value and mandatory.
I specifically have the task of not including FISCVAR newhere into my query design.
Please suggest how to go about implementing the above scenario ?
Thanks

hi
you should create RKFs. The variable can be a exit type which givs the current period. Use offset -1
http://help.sap.com/saphelp_nw04s/helpdata/en/f1/0a563fe09411d2acb90000e829fbfe/content.htm
http://help.sap.com/bp_epv260/EP_EN/documentation/EP/N05_BB_ConfigGuide_EN_US.doc
regards
abiram

Similar Messages

  • How to get the split period wage type amount in payslip?

    How to get the split period wage type amount in payslip?
    Payroll period for 01.01.09 to 31.01.09.
    1.     Employee is active from 1.1.09 to 10.01.09
    2.     Employee is inactive from 11.01.09 to 20.01.09
    3.     Employee is again active from 21.01.09 to 31.01.09
    In Result Table three split periods are created.
    From 01.01.09 to 10.01.09 u2018Basic Salaryu2019 Wtype  1101 amt is 20.00
    From 11.01.09 to 20.01.09 u2018Basic Salaryu2019 Wtype 1101 amt is 00.00
    From 21.01.09 to 31.01.09 u2018Basic Salaryu2019 Wtype 1101 amt is 10.00
    My requirement is to print only the last split period in payslip from 21.01.09 to 31.01.09. May you please help me in this regard.
    Thanks in advance
    Regards,
    Rajesh.

    Hi
    Try to read the below:
    WPBPC : Distribute Lump Sum Wage Elements to WPBP Periods
      Object
        Operation
      Use
        Operation WPBPC distributes the amount of the current wage type to the
        active WPBP periods in the payroll period.
      Input
        The current wage type in the header entry of table OT is used as input
        for this operation.
      Procedure
        Within payroll, wage types are assigned to a fixed WPBP period by
        infotype 0014 Recurring Payments/Deductions, for example. However, you
        may want to distribute this payment to all active WPBP periods, which is
        what would happen if the wage type were entered in basic pay. Therefore,
        various specifications exist for parameter S:
        o   If the specification is 'A', and if several active WPBP periods
            exist, the amount is simultaneously reduced on a calendar-day basis.
        o   If the specification is 'D', the wage type is distributed to all
            existing WPBP periods without the amount being reduced.
        o   If the specification is 'S', and if the validity period starts or
            ends during the period, the entry in table WPBP is split using this
            date. The wage type is stored in table OT for the corresponding WPBP
            period.
            This parameter is only allowed if processing was accessed using
           function P0014.
           In this case, infotype 0014 must be processed before absence
           valuation and function PARTT. Otherwise, rejections occur during
           payroll processing.
       o   Specification 'X' is the combination of 'A' and 'S'.
           This parameter is only allowed if processing was accessed using
           function P0014.
       o   If the specification is 'W', and if the validity period starts or
           ends during the period, the entry in table WPBP is split using this
           date (as with option 'S'). Unlike 'S', the wage type is not stored
           in table OT.
           This parameter is only allowed if processing was accessed using
           function P0014.
       o   If the specification is ' ', the wage type is stored in table OT for
           each WPBP period in which the validity interval fits.
           This parameter is only allowed if processing was accessed using
           functions P0014 or P0015.
       If the WPBP split is set for a wage type, the wage type is stored
       without changes in table OT. If you specify a different wage type name
       in the second parameter, the wage type is stored with this name in table
       OT. Before you execute operation WPBPC, you may therefore need to delete
       the split using operation ELIMI.
       If a country-specific split (C1, C2, or C3 split) is set, the operation
       interprets it as an error. The employee in question is rejected by
       payroll. All other splits are transferred as they are.
      Output
        The processed wage type, or the wage type specified in the operation
        call, is written to table OT (output table) with the appropriate split
        indicator and reduced amount as operation output for each WPBP period.
        Parameter specification 'W' is the only exception.
      Syntax
        OOOOOSVVVV
        OOOOO       WPBPC       Operation name
        S
                    blank       distribute to all WPBP periods
                    S           split and distribute WPBP
                    W           split but do not distribute WPBP
                    A           distribute to active WPBP periods
                                with calendar-day reductions
                    D           distribute to all existing
                                WPBP periods
                    X           combination of 'S' and 'A'
        VVVV                    Results wage type
                    blank       input wage type = results wage type
                    wage        wage type name of input wage type is replaced
                     type       by wage type name of results wage
                     name       type
        Wage type before operation:
      Example
        M100        02          3000
        WPBP split
        01  June 01 - June 20 active
        02  June 21 - June 30 active
        VVVV                    Results wage type
                    blank       input wage type = results wage type
                    wage        wage type name of input wage type is replaced
                     type       by wage type name of results wage
                     name       type
        Wage type before operation:
      Example
        M100        02          3000
        WPBP split
        01  June 01 - June 20 active
        02  June 21 - June 30 active
        Wage type before operation:
        WType       WPBP        Amount
        M100        00          3000.-
        M200        02          2000.-
        Operation:   WPBPCA
        Wage type after operation:
        WType       WPBP        Amount
        M100        01          2000.-
        M100        02          1000.-
        M200        02          2000.-
        Operation:   WPBPC
        Wage type after operation:
        WType       WPBP        Amount
        M100        01          3000.-
        M100        02          3000.-
        M200        02          2000.-
    Regards
    Team Member.

  • HT201441 I don't have owner's phone number, how to get  previous owner's Apple ID(email address) and send him a email let him remove the device from the account.

    I don't have owner's phone number, how to get  previous owner's Apple ID(email address) and send him a email let him remove the device from the account

    There is no way for anyone on this forum to assist you.  Apple will also not assist you.  If you purchased the device thru ebay, file a claim.  If you purchased it some other way, I'm sorry.  there is nothing anyone can do to help you.

  • How to calulate previous fiscal year from current year and periods as input

    hi all,
    i have a report where i have 2 select options as year and period.
    my period can be a range  like( Ex: 1 to 6).
    i like to know previous fiscal year from the following inputs.
    Tel me a suitable conversion routine to calculate
    depending on periods and fiscal year.
    regards
    sivaram.

    Hi
    U need to check the lower period, if it's 1 the previous fyscal year will be the year before:
    IF PERIOD = '1'.
      PREV_YEAR = YEAR - 1.
    ENDIF.
    U can also use the fm FI_PERIOD_DETERMINE, in this case you need a date, u can get it from lower current period:
    Get the first day of the period
    BUDAT(4)   = YEAR.
    BUDAT+4(2) = PERIDO_LOW.
    BUDAT+6(2) = '01'.
    Now get the last day of the previous month:
    BUDAT = BUDAT - 1.
    Use this date to get its period by fm FI_PERIOD_DETERMINE
    Max

  • How to get current fiscal year.

    Hi Experts,
    I am working on Asset Management.I need to get current fiscal year.
    I have to enter fiscal year on selections screen which i have to validate that it should not be greater than current fiscal year.
    For above i have used following code snippet but i have hard coded variant as 'MK'.
    To get variant i was using function '/IBS/RB_FI_GET_FISCAL_YEAR_VAR'  but in my selection screen we have to enter multiple company codes. if i will keep this function inside loop then it may give multiple variants.
    How to resolve this ?
    DATA : l_year(4) type c,
           l_date TYPE sy-datum.
    CALL FUNCTION '/IBS/RB_FI_GET_FISCAL_YEAR_VAR'
      EXPORTING
        i_company_code               =
      IMPORTING
        E_FISCAL_YEAR_VARIANT        =
      EXCEPTIONS
        COMPANY_CODE_NOT_FOUND       = 1
        OTHERS                       = 2.
      l_date = sy-datum - 700.
      l_date = l_date + 1.
      IF sy-subrc EQ 0.
        CALL FUNCTION 'GM_GET_FISCAL_YEAR'
         EXPORTING
           I_DATE                           = l_date
           i_fyv                            = 'MK'
         IMPORTING
           E_FY                             = l_year
         EXCEPTIONS
           FISCAL_YEAR_DOES_NOT_EXIST       = 1
           NOT_DEFINED_FOR_DATE             = 2
           OTHERS                           = 3.
        IF sy-subrc EQ 0.
          IF s_gjahr-low GT l_year.
            PRINT Error Message "Entered fiscal year should not be greater than current fiscal year".
          ENDIF.
        ENDIF.

    make it simpler by using - DATE_TO_PERIOD_CONVERT
    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
      EXPORTING
        I_DATE               = SY-DATUM
        I_PERIV              = L_VARI    "Fiscal year Variant - refer to tab T009B
    IMPORTING
       E_BUPER              = L_BUPER " Fiscal Period
       E_GJAHR              = L_GJAHR  " Fiscal year
    EXCEPTIONS
       INPUT_FALSE          = 1
       T009_NOTFOUND        = 2
       T009B_NOTFOUND       = 3
       OTHERS               = 4
    Hope this will solve ur problem.

  • How to get the fiscal yr

    Hi Experts,
    My below query is getting the quarter start, end and previous quarter start and end dates according to the calendar yr..Now I've to get the values accordingly fiscal year..
    Thanks in advance for the support...
    SELECT   MIN (t)"CURNT_QTR_ST_DT", MAX (LAST_DAY (t))"CURNT_QTR_END_DT", ADD_MONTHS(MIN (t),-3)"PREV_QTR_ST_DT", ADD_MONTHS(MAX (LAST_DAY (t)),-3) "PREV_QTR_END_DT" INTO V_CURRQTD_STRT ,V_CURRQTD_END,V_PRVQTD_STRT, V_PRVQTD_END
    FROM (SELECT ADD_MONTHS (TRUNC(TO_DATE(TO_DATE(V_RPRT_DATE)), 'YYYY'), LEVEL - 1)  t,
          TO_CHAR (ADD_MONTHS (TRUNC(TO_DATE(TO_DATE(V_RPRT_DATE)), 'YYYY'), LEVEL - 1), 'Q')QTD
          FROM DUAL
           CONNECT BY LEVEL <= 12) A
           WHERE A.QTD  = V_QUARTER_NUMBER;

    Hi.
    977490 wrote:
    SELECT   MIN (t)"CURNT_QTR_ST_DT", MAX (LAST_DAY (t))"CURNT_QTR_END_DT", ADD_MONTHS(MIN (t),-3)
    FROM (SELECT ADD_MONTHS (TRUNC(TO_DATE(TO_DATE('20-jul-2012')), 'YYYY'), LEVEL - 1)  t,
    TO_CHAR (ADD_MONTHS (TRUNC(TO_DATE(TO_DATE('20-jul-2012')), 'YYYY'), LEVEL - 1), 'Q')QTD
    FROM DUAL
    CONNECT BY LEVEL <= 12) A
    WHERE A.QTD  = 3If I fire this query the output is below:
    CURNT_QTR_ST_DT CURNT_QTR_END_DT   PREV_QTR_ST_DT  PREV_QTR_END_DTE
    01-JUL-12               30-SEP-12                   01-APR-12              30-JUN-12But the values are coming as calendar year, instead of this i need the output like fiscal yr..
    1st qtr--01-apr-yyyy to 30-jun-yyyy
    2nd qtr---01-jul-yyyy to 30-sep-yyyy
    3rd qtr---01-oct-yyyy to 31-dec-yyyy
    4th qtr---01-jan-yyyy to 31-mar-yyyy
    Sorry, it's still unclear what you want. You still haven't posted any sample data (CREATE TABLE and INSERT statements). Seriously, see the forum FAQ {message:id=9360002}; it can help you a lot.
    Your quarters begin and end in exaclty the same places that the regular quarters do, so
    TRUNC (dt, 'Q')     is still the beginning of the quarter that contains DATE dt, and
    ADD_MONTHS (TRUNC (dt, 'Q'), 3)     is still the beginning of the next quarter.
    What you call the quarters is different, however. To get your fiscal quarter "number" (actually a string), you can use
    TO_CHAR ( ADD_MONTHS (dt, -3)
         , 'Q'
         )This will return '4' when TO_CHAR alone would return '1'.
    Furthermore the instead of getting the calender yr start date and end date from the below qry, i need fiscal yr start and end date: ie--01-apr-yyyy to 31-mar-yyyy
    SELECT TRUNC(TO_DATE(V_RPRT_DATE),'YEAR')INTO V_CURRYTD_STRT FROM DUAL;
    SELECT LAST_DAY (ADD_MONTHS (TO_DATE (V_CURRYTD_STRT), 11)) INTO V_CURRYTD_END FROM DUAL;
    output of the above qry
    01/01/2012
    12/31/2012
    Since your fiscal year begins 3 months after the calendar year, you can find the beginng of the fiscal year that includes dt like this
    v_currytd_strt := ADD_MONTHS ( TRUNC ( ADD_MONTHS (dt, -3)
                                            , 'YYYY'
                        , 3              
    v_currytd_end := ADD_MONTHS (v_currytd, strt, 12)
                - 1;where dt is any DATE. (You don't have to use the dual table much in PL/SQL.)

  • FM to get previous fiscal month/year and calendar month/year for a date.

    Hi All,
    I am having a requirement to extract some data based on either the previous fiscal month/year or the previous calendar month/year. There is no company code input to find the fiscal/calendar month/year.
    At selection screen, user can select either fiscal or calendar selection.
    Based on the selection, the data will be extracted.
    For the system date, we need to calculate previous fiscal month/year or previous calendar month/year and populate the calculated data back to the selection-screen.
    Can you one of you please suggest an FM to find previous fiscal month/year and previous calendar month/year.
    Thanks in Advance,
    Regards
    Gowthami

    Hi Gowthami,
    You can use following function module to calculate previous / next day or month or year.
       call function '/SAPHT/DRM_CALC_DATE'
          exporting
            date      = sy-datum
            days      =
            months    =
            sign      = '-'
            years     =
          importing
            calc_date = .
    Here, you can give '-' to sign, if you want previous day / month / year.
    Here, you can give '+' to sign, if you want next day / month / year.
    And depending upon your requirement, you can pass suitable value to days / month / year.
    e.g. To calcualte last month,
       call function '/SAPHT/DRM_CALC_DATE'
          exporting
            date      = sy-datum
            days      =
            months    = 1
            sign      = '-'
            years     =
          importing
            calc_date = wv_prev_month.
    so it will give '23-01-2008' . Then convert it in the required format as per your requirement using string function concatenate.
    Hope this help you.
    Regards,
    Anil

  • How to get previous day of the date

    Hi,
    for a given date I need one day minus as a result date
    my input would be any date
    for example :
    Input Date : 2006-03-22 ( yyyy-mm-dd)
    Output should be : 2006-03-21
    If my input is 1st of April 2006, output i would expect is 31st March 2006
    Please suggest how to achieve this
    Thanks in advance
    Nilesh

    Find below the code to get previous day of the current date
    import java.util.Date;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    public class PreviosDay
    public static void main(String[] args)
    DateFormat dateFormat = new SimpleDateFormat( "MM/dd/yyyy");
    Calendar cl = Calendar.getInstance();
    // you can use a Date object's getTime() method , which is initialiazed
    // to desired date here directly ex: Date dt = new Date("10/10/2004");
    // cl.setTimeInMillis(dt.getTime());
    cl .setTimeInMillis(System.currentTimeMillis());
    cl.add(Calendar.DAY_OF_MONTH, -1);
    System.out.println("Previous date : "+dateFormat.format(
    new Date(cl.getTimeInMillis() ) ) );
    }

  • How to get previous values based on date filters

    Hi
    i have two fields gldate and startdate
    gldate values are like 1/31/2011,2/28/2011,3/31/2011,4/30/2011,5/31/2011 ...
    startdate values 1/1/2011,2/1/2011,3/1/2011,4/1/2011,5/1/2011 ...
    i need a condition like gldate<startdate
    if startdate is 11/1/2011 then i get all the values before 11/1/2011 values
    im using filter for date filed
    let us filter values is startdate--11/1/2011 and gldate is 11/30/2011 but that cond falls
    how to get this condition
    plz its urgent to me

    Hi
    i have two fields gldate and startdate
    gldate values are like 1/31/2011,2/28/2011,3/31/2011,4/30/2011,5/31/2011 ...
    startdate values 1/1/2011,2/1/2011,3/1/2011,4/1/2011,5/1/2011 ...
    i need a condition like gldate<startdate
    if startdate is 11/1/2011 then i get all the values before 11/1/2011 values
    im using filter for date filed
    let us filter values is startdate--11/1/2011 and gldate is 11/30/2011 but that cond falls
    how to get this condition
    plz its urgent to me

  • How to get previous day data if i dont have current day data.

    Hello Gurus,
    I have a stock levels data in ODS. when there is no movements, we are not getting any stocks into ODS. So we have to get previous day data as it is for current day data into another ODS.
    Could you please help me in this regard.
    Thanks in advance,
    Rama

    Rama -    
            0CALDAY can't help us in this scenario .
    Step 1 :
        To do this - You have to add one ZDATE (InfoObject ) to 1st ODS. ZDATE is updated by itself from current date of system  when ever you are loading data to 1st ODS.
    Step 2:
       You have to do full update to 2nd ods.At the selection screen of InfoPackage  (from 1st ODS to 2nd ODS ) you have to write following code for ZDATE.
    pseudo Code:
    1) Select fields "Rec_INSERT","Time stamp","Request Status" and "Request ID"  where ICUBE = ODS1 from table "RSMONICDP"
    2) Populate above selected fields data in INTERNAL TABLE
    3) Sort INTERNAL TABLE by Time stamp .
    4)
         If (Record Count = ' 0 ' for current date in internal table )
         update records from  ODS1 to ODS2 where ZDATE = "yesterday date"
         else
         update records from ODS1 to ODS2 where ZDATE= "today date"
         endif.
    Make sure this is full update not delta update from ODS1 to ODS2
    I am sorry, I m not good in Coding but I am sure if  u use this logic,You can meet your requirement.
    I hope you can understand my logic. Let me know if you have any questions,
    Anesh B .

  • How to get previous days execution time?

    Hello All,
    I have below 3 tables in my Oracle Database --
    1) Table jobs
    Job ID  Job Name
    1      ABC
    2      PQR
    3      XYZ
    2) Table Job_Tasks
    Task_ID   TASK_NAME  Job_ID 
      T1              T_ABC            1
      T2              T_ABE            1
      T3             T_ABD            1
      T4             T_PQS            2
      T5             T_PQT            2
      T6             T_PQU            2
      T7             T_XYA            3
      T8             T_XYZZ           3
      T9             T_XYYA           3
    3) Job_LOG_Table
    JOB_SEQ  JOB_ID  JOB_NAME   START_TIME  END_TIME           STATUS
    1111              1        ABC    06/09/2013 11:00     06/09/2013 13:00   COMPL
    1234              1        ABC    07/09/2013 11:30     07/09/2013 13:30   COMPL
    1235              1        ABC    08/09/2013 11:30     08/09/2013 13:30   COMPL
    1244              1        ABC    09/09/2013 11:00     09/09/2013 13:00   COMPL
    1354              1        ABC    10/09/2013 11:30      10/09/2013 13:30   RUNNING
    Question Is --
       I would like to display the job status from yesterday and from time 20:00 onwards.. ie. it should display the job_SEQ 1354. ( start_time >= (sysdate-1)||'20:00:00') and  also want to disaply previous days execution time for same job (ie. for 9th Sep).
    The result should be --   Job_name PREV_START_TIME, PREV_END_TIME, TODAYS_START_TIME, TODAYS_END_TIME, STATUS
      As I am displaying the jobs from yesterday 20:00 hour onwards.. I am unable to get previous execution time for the same job.
    I tried with Analylitical function LAG  but it's showing PREV_START_TIME.and PREV_END_TIME as BLANK.
    Could you please help me to resolve the issue?
    Thank you in advance.

    As suggessted by Mike,  below is the modification I have done in my sql and I think it's working now....
    I will check for more volume of data and confirm.  --
    select original_sql as
    select w.job_id,
    w.job_name,
    r.start_time,
    r.end_time,
    r.status
    from
      jobs w,
      job_log_table r
    where
      r.job_id=w.job_id
    select job_id,job_name,
    (select start_time from job_log_table j where j.job_id=os.job_id and j.start_time>=sysdate-2 and rownum <2) prev_start_time,
    start_time,
    end_time,
    status
    from Original_sql os
    where
    os.start_time>=to_date(to_char(sysdate-1,'DD/MM/YYYY') || ' 20:00:00','Dd/MM/YYYYHH24:MI:Ss')
    as of now, I am getting the below result --
    job_id,  job_name  prev_start_time,      prev_end_time,            curr_start_time,           curr_end_time,           status 
           1           ABC  09/09/2013 11:30   09/09/2013 13:00      10/09/2013 11:30          10/09/2013 13:30          RUNNING
    Thank you !

  • How to get the same period last year value using Fiscal Calendar?

    Hi there,
    I am using DAX in a Tabular Model project but I am getting stuck trying to get the following:
    We are using a Fiscal Calendar (from 01 April to 31 March). 
    Previous Period Value
           Value
    2012
    April
    15
    May
    10
    Jun
    20
    2013
    April
    15
    30
    May
    10
    20
    Jun
    20
    25
    I have tried to use sameperiodlastyear but there is an error saying that this function cannot be used for non contiguous dates. DATEADD is given the same error...
    Could anyone help me getting the right measure expressions for [Previous Period Value]?
    Thanks and best regards,
    Joss

    Hi Joss,
    In SQL Server Analysis Services, we can can compare revenue with the hierarchy periods (year, month, day) by using the PARALLELPERIOD function, and now you want to compare with custom periods. (NOTE: We cannot compare it with the PARALLELPERIOD function
    since
    PARALLELPERIOD function returns a member from a prior period in the same relative position as a specified member. So if the first time span not equal to the second one (such as the first period is 3 days, and the second period is 2 month)).  Here
    is a sample query about PARALLELPERIOD function for your reference.
    with
    set Hotels as
    [Hotels].[Hotel ID].&[1015],
    [Hotels].[Hotel ID].&[5640],
    [Hotels].[Hotel ID].&[8800]
    set Period as [Arrival Date].[Date].[Month].&[2012]&[1]:[Arrival Date].[Date].[Month].&[2012]&[12]
    member [Arrival Date].[Date].[0] as sum({ Period })
    member [Total Amount N-1] as (PARALLELPERIOD([Arrival Date].[Date].[Year], 1, [Arrival Date].[Date].[Year].&[2012]), [Measures].[Total Amount])
    select
    [Measures].[Total Amount],
    [Measures].[Total Amount N-1]
    } on 0,
    nonemptycrossjoin
    Hotels,
    Hotels.[Hotel].children,
    *{[Arrival Date].[Date].[0]}
    } on 1
    from [Booking_Cube]
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to get CAN message periodicity programmatically?

    When I have messages with different periodicity in CAN data base file(.dbc), how do I programmatically know what is the periodicity of a given message? In the X-Net data base editor I can see the periodicity, but is there any way to get it in labview code?
    Also, some of the messages are to-be-transmitted and some are to-be-received. How can I separate these channels/messages  programmatically?
    Solved!
    Go to Solution.

    First the Automotive subforum maybe of more help if you don't find the answers you need here.
    Next I'd like to say I despise that conversion library and wish NI would take it off of this site.  It hasn't been updated in 5 years and it won't be updated again.  XNet has the same frame signal conversion functionality, and you don't need a XNet hardware to use it.  It also has bugs that I've reported to NI and their suggestion was to just use XNet so that is my suggestion to you.
    Now back to the original question.  No the older cheap NI-CAN devices do not have a hardware retransmit functionality.  You must call the write function every time you want to perform a write.  This usually means a while loop which just runs, and resends out all the frames you want ever N milliseconds.  You can do this easily with the elapsed timer VI or make your own timer.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • How to get current fiscal year/quarter/month/week

    Post Author: [email protected]
    CA Forum: Semantic Layer and Data Connectivity
    Hi friends,
    I have to calculate
    1. current year/quarter/month/week.
    2.Previous year/quarter/month/week.
    please tell the process to achieve the above scenerio's.
    the structure of the fiscal_cal is as  follows.
    Name                                      Null?    Type
    TODAY                                     NOT NULL DATE
    FISCAL_DAY                                         NUMBER(8)
    FISCAL_WEEK                                        NUMBER(6)
    FISCAL_MONTH                                       NUMBER(6)
    FISCAL_QTR                                         CHAR(18)
    FISCAL_YEAR                                        NUMBER(4)
    FISCAL_MONTH_WORK_DAYS                             NUMBER(2)
    sample week data is as follows
    FISCAL_WEEK
         200752
         200753
         209901
    Thanks.

    based on ur target database DBMS you can find a built-in functions be used in the universe designer to get the requirment you talked about, like in oracle
    to_char(mydate,'yyyy') it will return the year in the yyyy format.
    and the same way for the other things you want
    to_char(mydate,'q') return the quarter.
    w return the week of the month
    ww return the week of the year
    mm return the month
    ,, to get the last year
    you can use also a builtin functions
    like add_months(mydate,-12) that return the same date for the last year, and you can do the same operations as before.
    its all related to the DBMS.
    good luck

  • How to get previous month data from current month values

    Hi Experts,
    I have made one universe from BW Query in which Fiscal year period is entered in interval.
    I have made a universe from that and want to develop webI reports on top of that.
    In my webI reports, i have used one cross tab. In Rows section i have added Company Code and in Column section i have used Fiscal Year/Period and in Value section i have added Sales Value. I want this value of previous month.
    Requirement:
    Ex.
                            Feb'09          Mar'09     and so on...
    Comp_code1   Sales of Jan'09         Sales of Feb'0f         and so on....
    I am getting this.
    Ex.
                            Feb'09          Mar'09     and so on...
    Comp_code1   Sales of Feb'09         Sales of Mar'09         and so on....
    I hope i have clear my requirements.
    Please help as soon as possible.
    Thanks in Advance,
    Rishit

    Hi Rishit,
    Follow the below steps to get the desired result.
    Step1: Convert your fiscal year period from char to a date in your database or in your designer however its feasible.
    to_date('substr('009.2009',2)','mm.yyyy')
    you will get the result 01 sep 2009
    Step2: Convert this format to 01/09/2009 by using date functions.
    Step3: Create a Detail associated to the 'date' field (typically your fiscal period).
    Step4: Create a cross tab Like : Rows section should have Company Code and in Column section should have 'date'(created detail) and in Value section should be Sales Value.
    you should get the following result.
    01/02/2009 01/03/2009 and so on...
    Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
    Step5: Use the following formula in your Column (date) formula bar.
    =(<date>-1)-DayNumberOfMonth(<date>-1)+1
    You will get the following result:
    01/01/2009 01/02/2009 and so on...
    Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
    Format the cell according to your reruirement.
    Let me know if you will get any break in the above steps.
    Regards,
    Swati.

Maybe you are looking for