Calculate week no based on financial year

Hi
Financial year starts with 01-Apr . I need to calculate week no based on 01-APR(financial year) not 01-Jan
for each date. Is there a way to calculate based on this

It works for all year long :-)
SQL> ed
Wrote file afiedt.buf
  1  with testdata as (
  2     select date '2011-04-01' + 7 * (level-1) dt from dual
  3     connect by level <= 60
  4  )
  5  --
  6  -- End of test data
  7  --
  8  select
  9  to_char(dt,'YYYY-MM-DD') the_date,
10  to_char(add_months(dt,-3),'WW') fiscal_week,
11  to_char(add_months(dt,-3),'IW') iso_fiscal_week
12  from testdata
13* order by dt
SQL> /
THE_DATE   FI IS
2011-04-01 01 52
2011-04-08 02 01
2011-04-15 03 02
2011-04-22 04 03
2011-04-29 05 04
2011-05-06 06 05
2011-05-13 07 06
2011-05-20 08 07
2011-05-27 09 08
2011-06-03 09 09
2011-06-10 10 10
2011-06-17 11 11
2011-06-24 12 12
2011-07-01 13 13
2011-07-08 14 14
2011-07-15 15 15
2011-07-22 16 16
2011-07-29 17 17
2011-08-05 18 18
2011-08-12 19 19
2011-08-19 20 20
2011-08-26 21 21
2011-09-02 22 22
2011-09-09 23 23
2011-09-16 24 24
2011-09-23 25 25
2011-09-30 26 26
2011-10-07 27 27
2011-10-14 28 28
2011-10-21 29 29
2011-10-28 30 30
2011-11-04 31 31
2011-11-11 32 32
2011-11-18 33 33
2011-11-25 34 34
2011-12-02 35 35
2011-12-09 36 36
2011-12-16 37 37
2011-12-23 38 38
2011-12-30 39 39
2012-01-06 40 40
2012-01-13 41 41
2012-01-20 42 42
2012-01-27 43 43
2012-02-03 44 44
2012-02-10 45 45
2012-02-17 46 46
2012-02-24 47 47
2012-03-02 48 48
2012-03-09 49 49
2012-03-16 50 50
2012-03-23 51 51
2012-03-30 52 52
2012-04-06 01 01
2012-04-13 02 02
2012-04-20 03 03
2012-04-27 04 04
2012-05-04 05 05
2012-05-11 06 06
2012-05-18 07 07
60 rows selected.ISO Week (IW) works with a different way of defining week 01. Using IW April 1st will become week 52. You will have to decide if that is correct according to your finance department :-)

Similar Messages

  • Time type Initialization based on financial year instead of calendar year.

    Hi All,
    I'm facing this problem. By using time type i'm capturing the no of worked days for a calendar year. This Time Type is used for calculating Privilege Leave which will be divided by 20 in the year end for Quota calculation. But when I run PT60 for the period 31.03.2014 to 01.04.2014. The Time types are automatically getting Initialized.
    Here Time Evaluation is running based on financial year not as calendar year ? How to change the same to calendar year.
    Already I have searched few solution here. As per the below link
    PT60 generating for financial year but not for calendar year . But i'm facing the same issue.
    Please suggest me the solution for this.
    Regards
    Jagan

    Hi Vivek and sikandar,
    Thanks for the immediate response.
    The Time evaluation is running for Financial year (Apr - mar). But I need it to be run for Calendar Year. I gave PL Quota Time Type as an Example. But its happening to all the Time types.
    Pls suggest me how to run Time evaluation for calendar year.
    Please see the screenshot below (Time Type 9t01, 9t78, 9t80)
    All the above three time types are getting initialized on April, but i want this to happen on 1st Jan.
    I'll share my PCR if needed.
    On 31.03.2015
    On 01.04.2015
    Thanks and Regards
    Jagan

  • Is the CURRENT_YEAR variable based on our systems Financial Year?

    Hi,
    I have a report that uses the CURRENT_YEAR variable to filter data. The value of that variable is currently 2010, but our financial year starts on 1 October, so we are still in the 2009 finacial year?
    My question is: Is the CURRENT_YEAR variable based on the Financial Year start date configured in our CRM instance? or is it a "global" variable which is the same for everyone regardless of their financial year start date.
    Thanks.

    In my customer, CURRENT_YEAR and CURRENT_MONTH returns the fiscal year and month...
    Antonio

  • Error while saving FYV : Gaps in financial year variant periods

    Hello Experts,
    We are getting an error while saving  a new FYV as:
    Gaps in financial year variant periods XY
    Message no. FGV556
    Diagnosis
    The period specification has gaps. The periods must be sequentially numbered without any gaps.
    System Response
    Only a correctly defined period assignment can be saved.
    Procedure
    Define the periods with consecutive numbers.
    Details: The new FYV has 52/53 weeks as posting periods depending on calendar year.
    For example, we are trying to define Fisc 2009 as follows. (Fiscal year 2009 = Nov 01 2008 to Oct 31 2009).
    Month-Day-Period-Yearshift
    11     ---     7     ---     1     ---     +1
    11     ---     14     ---     2     ---     +1
    11     ---     21     ---     3     ---     +1
    11     ---     28     ---     4     ---     +1
    12     ---     5     ---     5     ---     +1
    12     ---     12     ---     6     ---     +1
    12     ---     19     ---     7     ---     +1
    12     ---     26     ---     8     ---     +1
    12     ---     31     ---     9     ---     +1
    1     ---     3     ---     9     ---     0
    1     ---     10     ---     10     ---     0
    1     ---     17     ---     11     ---     0
    1     ---     24     ---     12     ---     0
    1     ---     31     ---     13     ---     0
    2     ---     7     ---     14     ---     0
    2     ---     14     ---     15     ---     0
    2     ---     21     ---     16     ---     0
    2     ---     28     ---     17     ---     0
    3     ---     7     ---     18     ---     0
    3     ---     14     ---     19     ---     0
    3     ---     21     ---     20     ---     0
    3     ---     28     ---     21     ---     0
    4     ---     4     ---     22     ---     0
    4     ---     11     ---     23     ---     0
    4     ---     18     ---     24     ---     0
    4     ---     25     ---     25     ---     0
    4     ---     2     ---     26     ---     0
    5     ---     9     ---     27     ---     0
    5     ---     16     ---     28     ---     0
    5     ---     23     ---     29     ---     0
    5     ---     30     ---     30     ---     0
    6     ---     6     ---     31     ---     0
    6     ---     13     ---     32     ---     0
    6     ---     20     ---     33     ---     0
    6     ---     27     ---     34     ---     0
    7     ---     4     ---     35     ---     0
    7     ---     11     ---     36     ---     0
    7     ---     18     ---     37     ---     0
    7     ---     25     ---     38     ---     0
    8     ---     1     ---     39     ---     0
    8     ---     8     ---     40     ---     0
    8     ---     15     ---     41     ---     0
    8     ---     22     ---     42     ---     0
    8     ---     29     ---     43     ---     0
    9     ---     5     ---     44     ---     0
    9     ---     12     ---     45     ---     0
    9     ---     19     ---     46     ---     0
    9     ---     26     ---     47     ---     0
    10     ---     3     ---     48     ---     0
    10     ---     10     ---     49     ---     0
    10     ---     17     ---     50     ---     0
    10     ---     24     ---     51     ---     0
    10     ---     31     ---     52     ---     0
    The above entries cover all the dates in calendar year 2009, that is, Jan 2009 to Oct 2009  is covered by periods 10 to 52 and Nov 01 2009 to Dec 31 2009 is covered by period 1 to 9 of the following fiscal year 2010.
    Inspite of making sure that all the days of 2009 are covered by periods 1 to 52. We are still unable to save the FYV.
    Please help!
    Susan

    Hello, I am getting this error while saving the FSV. My FSV is based on Weeks. Below is what I am inputting for this. Other details are Calender Year -  2017, No. of posting periods - 53, checked year dependent. Also, I have FSV for previous years also where weeks are 52 but configured as 53. So, hope that this is not creating this issue. Solicit your early response.
    Month
    Day
    Period
    Year Shift
    1
    7
    1
    0
    1
    14
    2
    0
    1
    21
    3
    0
    1
    28
    4
    0
    2
    4
    5
    0
    2
    11
    6
    0
    2
    18
    7
    0
    2
    25
    8
    0
    3
    4
    9
    0
    3
    11
    10
    0
    3
    18
    11
    0
    3
    25
    12
    0
    4
    1
    13
    0
    4
    8
    14
    0
    4
    15
    15
    0
    4
    22
    16
    0
    4
    29
    17
    0
    5
    6
    18
    0
    5
    13
    19
    0
    5
    20
    20
    0
    5
    27
    21
    0
    6
    3
    22
    0
    6
    10
    23
    0
    6
    17
    24
    0
    6
    24
    25
    0
    7
    1
    26
    0
    7
    8
    27
    0
    7
    15
    28
    0
    7
    22
    29
    0
    7
    29
    30
    0
    8
    5
    31
    0
    8
    12
    32
    0
    8
    19
    33
    0
    8
    26
    34
    0
    9
    2
    35
    0
    9
    9
    36
    0
    9
    16
    37
    0
    9
    23
    38
    0
    9
    30
    39
    0
    10
    7
    40
    0
    10
    14
    41
    0
    10
    21
    42
    0
    10
    28
    43
    0
    11
    4
    44
    0
    11
    11
    45
    0
    11
    18
    46
    0
    11
    25
    47
    0
    12
    2
    48
    0
    12
    9
    49
    0
    12
    16
    50
    0
    12
    23
    51
    0
    12
    30
    52
    0
    12
    31
    1
    +1
    Thanks
    Deepankar

  • Customer Exit Variable Period 000 is not valid in financial year variant Z2

    Hi all,
    I am trying to get the week number from a particular posting period. But I get this error when I execute the Query:
    Error Group
    RFC_ERROR_SYSTEM_FAILURE
    Message
    SYST: Period 000 is not valid in financial year variant Z2
    I checked in "FIRST_DAY_IN_PERIOD_GET" FM and it is not accpting period 000 for PERIV Z2. It works fine for all other periods.
    Does anyone have an idea on this?
    Thanks.

    Simon,
    So do you think that there is a problem in my Query restrictions? You ask me to restrict from 0 - 12, but this period is calculated based on the SY_DATUM in a cust. exit variable. And this period is being used to pull week number. So, do I need to change the code?
    But I already have another query which is similar to this, only ready for input options are missing in the new one. The older one is working fine but the I have problem with this.
    Any more ideas?
    Thanks!!

  • Gaps in financial year periods ZZ

    Hi,
    I am getting the below error whie maintaining financial year variants.
    When maintaining the fiscal year variants in Transaction OB29 for
    variant ZZ, the following error message appears:
    "Gaps in financial year periods ZZ" (FGV 556), even though there are no gaps.
    this is a 53 period (1 per week in a year), year dependent variant.
    Error Message Number Screen Number Transaction Program Table
    FGV 556 1110 OB29 SAPLGVAR T009B
    Thank you
    Amit Mistry

    Hello, I am getting this error while saving the FSV. My FSV is based on Weeks. Below is what I am inputting for this. Other details are Calender Year -  2017, No. of posting periods - 53, checked year dependent. Also, I have FSV for previous years also where weeks are 52 but configured as 53. So, hope that this is not creating this issue. Solicit your early response.
    Month
    Day
    Period
    Year Shift
    1
    7
    1
    0
    1
    14
    2
    0
    1
    21
    3
    0
    1
    28
    4
    0
    2
    4
    5
    0
    2
    11
    6
    0
    2
    18
    7
    0
    2
    25
    8
    0
    3
    4
    9
    0
    3
    11
    10
    0
    3
    18
    11
    0
    3
    25
    12
    0
    4
    1
    13
    0
    4
    8
    14
    0
    4
    15
    15
    0
    4
    22
    16
    0
    4
    29
    17
    0
    5
    6
    18
    0
    5
    13
    19
    0
    5
    20
    20
    0
    5
    27
    21
    0
    6
    3
    22
    0
    6
    10
    23
    0
    6
    17
    24
    0
    6
    24
    25
    0
    7
    1
    26
    0
    7
    8
    27
    0
    7
    15
    28
    0
    7
    22
    29
    0
    7
    29
    30
    0
    8
    5
    31
    0
    8
    12
    32
    0
    8
    19
    33
    0
    8
    26
    34
    0
    9
    2
    35
    0
    9
    9
    36
    0
    9
    16
    37
    0
    9
    23
    38
    0
    9
    30
    39
    0
    10
    7
    40
    0
    10
    14
    41
    0
    10
    21
    42
    0
    10
    28
    43
    0
    11
    4
    44
    0
    11
    11
    45
    0
    11
    18
    46
    0
    11
    25
    47
    0
    12
    2
    48
    0
    12
    9
    49
    0
    12
    16
    50
    0
    12
    23
    51
    0
    12
    30
    52
    0
    12
    31
    1
    +1
    Thanks
    Deepankar

  • Gaps in financial year variant periods IW

    Hi All,
    how to fill the Gaps in financial year variant periods IW. i am not able to finish these!!!
    we have 52 weeks, when i am posted i am facing the above error.
    thanks and regards
    Prathap

    Hi..
    When you go to in T.code OB29, you will find 'number of posting period' based on your posting period you change the number of posting period and maintain the numbers.
    And  your problem could be solved by going into OB29, select the Fiscal Year Variant, then click on Shortened Fiscal Year and enter the year where you get the error message. Then click on New Entries and enter 52, if for the year in question you only have 52 periods, which can absoluteley be fine, depending how the weekdays fall in a calendar year. Save and record on transport. Check if the error message you were getting still appears in your period definition screen.
    And also Please check the SAP Note 849016 - OB29: FGV556 (period gaps) incorrect.
    Hpoe it will helps
    Thanks.

  • Alternate Financial year(AFY) in Indian Payroll

    Hi All,
    I am facing a strange problem in my payroll configuration. I activated business function for AFY and now Income tax should get calculated from March to Feb. I have necessary config for AFY including payroll period & control record. Now in my system period 1 of 2013 is equal to 01.03.2013 to 31.03.2013 & period 12 is 01.02.2014 to 28.02.2014.
    I hired an employee on 01.03.2013 & trying to run payroll for whole financial year i.e. march 2013 to Feb 2014.
    I noticed a discrepancy while calculating gross salary & professional tax while it calculates IT.
    In March 2013 (012013) payslip monthly gross & Ptax are getting multiplied by 12
    In April 2013 (022013) payslip monthly gross & Ptax are getting multiplied by 12. In March & April there is no issue.
    But after that from May 2013 (032013) onward monthly gross & Ptax are getting multiplied by 11 for calculating IT which is very strange & I am not able to find the issue.
    I also checked projection factor and /401 is giving accurate value only.
    Pls help me with this as this highly important for my project.
    Thanks & regards,
    Arka

    Hi Arka,
    I think you are saying wrong.
    In the March/2013---/401 will be hold the value 11
    in the April/2013----/401 will be hold the value 10
    in the May/2013----/401 will be hold the value 9.
    Check and tell me.
    Regards,
    Sankarsan

  • Is there a way of adjusting WEEKNUMs to match a financial year?

    Hi
    I am wondering if there is a way to have Numbers 09 adjust the WEEKNUMs so that they match the financial year, starting in the first week of April (UK). Given that I will have to do tax returns which match the financial year, it makes sense to match my accounts/Numbers files with the financial year.
    Thanks
    Nick

    nick_harambee wrote:
    I am wondering if there is a way to have Numbers 09 adjust the WEEKNUMs so that they match the financial year, starting in the first week of April (UK). Given that I will have to do tax returns which match the financial year, it makes sense to match my accounts/Numbers files with the financial year.
    I guess the place to start here is 'Which numbering system do you want to modify for this?'
    1) ISO Week: The International Organization for Standardization (ISO) ISO8601:2000 Standard
    All weeks begin on a Monday. Week one starts on Monday of the first week of the calendar year with a Thursday.
    2) (Not included as week starts on Sunday. Otherwise same as #3)
    3) Excel(and Numbers) WEEKNUM function with an optional second argument of 2.
    Week one begins on January 1st; week two begins on the following Monday.
    4) Simple week numbering.
    Week one begins on January 1st, week two begins on January 8th, and week 53 has only one or two days(for leap years).
    For modified system 1 (ISO), replace "calendar year" with "financial year". For modified WEEKNUM and Simple Week Numbering systems, replace "January" with "April"
    The nice thing about #4 is that it is "simple", and that simplicity extends to the ease of starting with any specific date. No correction factor is needed for the transition from one calendar year to the next.
    The shifting start dates of Week 1 of #1 and of Week 2 of #3 add a complication, but if these can be determined, the rest of the year can easily be numbered using the same formula as #4.
    Here are the three choices, with formulas below.
    SWN
    Start Date: April 1, constructed from A1.
    Table 1::B2: =INT(DATEDIF(DATE($A$1,4,1),A, "D")/7)+1
    (Results modeled on) WEEKNUM
    Start Date: Monday preceeding April 2
    Table 2::B2: =(DATE(Table 1 :: $A$1,4,1)-WEEKDAY(DATE(Table 1 :: $A$1,4,1),3))
    Table 1::C2: =INT(DATEDIF(Table 2 :: $B$2,A, "D")/7)+1
    (Modeled on) ISO
    Start Date: Monday preceeding first Thursday in April
    Table 2::B2: =IF(WEEKDAY(DATE(Table 1 :: $A$1,4,1),3)<4,(DATE(Table 1 :: $A$1,4,1)-WEEKDAY(DATE(Table 1 :: $A$1,4,1),3)),(DATE(Table 1 :: $A$1,4,1)+7-WEEKDAY(DATE(Table 1 :: $A$1,4,1),3)))
    Table 1::D2: =IFERROR(INT(DATEDIF(Table 2 :: $C$2,A, "D")/7)+1,53)
    Note: IFERROR traps the error that occurs when April 1 falls on a Friday, Saturday or Sunday, and assigns the days before the first Monday to Week 53. You may prefer to consider (and label) this Week 0. To do so, replace the 53 at the end of the formula with 0 (zero).
    None of the formulas will give 'correct' results beyond one year after the starting date.
    Regards,
    Barry
    EDIT: Noting your newest post, I think you may want to consider the Simple Week Numbering system, using a starting date of April 6.
    Barry
    Message was edited by: Barry

  • SYST Period 012 is not valid in financial year variant R2 Msg no;FGV003

    Hi SAP Gurus,
    I have encountered with an error as following :
    SYST: Period 012 is not valid in financial year variant R2
    Message no. FGV003
    Our client following calendar year till December 2009.  They want to change to April to March , from April 2010 . So we need to define a shortened fiscal year for January to March 2010 for 3 months.
    One important thing is Depreciation should be calculated only for 3 months ie., from January 2010 to March 2010 for year 2010. For year 2011 u2013 April 2010 to March 2011 be calculated.
    I have done the following settings :
    Current fiscal year variant = K4, i.e. the standard variant with 12 periods (calendar year)
    -the current fiscal year must be closed on 31.12.2009
    -this change have to be done in the next month, i.e. on 01.01.2010
    -on 1.1..2010 starts the new fiscal year 2010
    -the fiscal year 2010 ends on 31.03.2010 and have 3 posting periods
    1) Create a new Fiscal Year Variant for the shortened fiscal year u2013 e.g. "R2" (OB29).
    2) R2 to be made Year Dependent. Current Period Configuration
    Month Days Period Year Shift
    1 31 1 0      
    2 28 2 0
    3 31 3 0
    4 30 4 0
    5 31 5 0
    6 30 6 0
    7 31 7 0
    8 31 8 0
    9 30 9 0
    10 31 1 +1
    11 30 2 +1
    12 31 3 +1
    3) Company Code assignment (OB37): K4 to be replaced with R2 .
    4) Controlling Area (OKKP): K4 to be replaced with R2.
    5) Fiscal Year to be shortened for Depreciation Areas in Asset Accounting customization (OAYP).
    6) Table T093C to be viewed to check whether the field XRUMPF (Shortened Fiscal Year) has been activated with u201CXu201D..(SE 11 Check Table) Done manually
    Other Problem : 1. The system calculates deprecation for period 3 ( Full year deprecation) as seen from AW01n for one asset.
    2. When I run AFAB for 2010 period 1 the error is displayed
    SYST: Period 012 is not valid in financial year variant R2
    Message no. FGV003
    Please anybody help me in this issue .
    Subbu

    Have you maintained the Year Shift Properly in OB29
    For e.g if Financial Year is from July to June, year shift will be as follows:
    Month      Days        Period       Year Shift
    1     31     7     0
    2     29     8     0
    3     31     9     0
    4     30     10     0
    5     31     11     0
    6     30     12     0
    7     31     1     +1
    8     31     2     +1
    9     30     3     +1
    10     31     4     +1
    11     30     5     +1
    12     31     6     +1
    Check also FI period and aseet periods are open through OB52 and AJAB

  • BEX Error: SYST: Period 053 is not valid in financial year variant M2

    Hi All,
    We have a merchandising report which bring the data for current year and previous year. While I execute the data for Fiscal Year/Period - 011.2011, I get the output. But when I execute the report for Fiscal Year/Period - 012.2011, I receive the below error.
    SYST: Period 053 is not valid in financial year variant M2
    We have variants M4 and M2.
    M4 is month wise where are M2 is weekly.
    In table T009B, we have a record for week 053 for year 2011 whereas we don't have a record for week 053 in year 2010. This is obvious as there are only 52 weeks in 2010 but 53 in 2011.
    I'm not able to track the exact reason for this error.

    Hi All,
    Thanks for the reply.
    I have tried maintaining entry for week 053 against year 2010 in T009B but this didn't work. I checked the 'Check Table' button for any dependencies and I saw T009 table.
    I maintained the entry as below in T009 table and it worked. Can someone explain how this work?
    Earlier entry for which I received the error:
    Fi.Year Variant    Year-dependent     Posting period    Special        Periods Description
    M2                            X                      052                     00              Retail Calendar Weekly
    Changed entry for which the error stopped appearing
    Fi.Year Variant    Year-dependent     Posting period    Special        Periods Description
    M2                            X                      053                     00              Retail Calendar Weekly
    Please help me understand so that if I transport the entry to Production, I don't face any serious issues.
    Regards,
    Murthy

  • GAPs in financial year periods

    i have encountered an error whie maintaining financial year variants.
    When maintaining the fiscal year variants in Transaction OB29 for
    variant WK, the following error message appears: "Gaps in financial
    year periods XY" (FGV 556), even though there are no gaps.
    this is a 53 period (1 per week in a year), year dependent variant.
    Error Message Number    Screen Number   Transaction Program             Table
       FGV 556                        1110                     OB29           SAPLGVAR     T009B
    Thank you

    hi,
    could you please let me know how this issue got resolved.
    I am also facig a similarr issue.
    Regards,
    haranadh

  • SSRS Line graphs, change the axis maximum and minimum by month, and change data series from calendar year to financial year

    I am using SSRS and I cannot access SQL server to answer my problem, so the solution needs to be done via SSRS only.
    I am currently trying to graph some data. The problem is, the months on the X axis are aligned by calendar year. I need the first month to commence with July, with the last month on the axis to be June. This also means that the year series need to be changed
    from calendar year to Australian financial year.
    Screenshots are provided in the comments.

    Hi Northern,
    Per my understanding that you want to show the month in the x axis as the order of the financial year(7,8,9,10...4,5,6) and also display the year in the series group as the financial year, right?
    I have tested on my local environment and we can modify the query in the sql to get the financial year value based on the fields of Calendar year, details information below for your reference:
    1. Modify the query as below:
    SELECT
    Calendar_Date,CASE WHEN MONTH(Calendar_Date)>=7 THEN
    YEAR(Calendar_Date)+1
    ELSE YEAR(Calendar_Date) END AS Financial_Year,
    MONTH(Calendar_Date)as Financial_Month,
    Billing_Amount
    FROM TableName
    order BY
    Calendar_Date
    2. Add the "Billing_Aomount" in the Value area, "Financial_Month" in the Category group area and "Financial_Year" in the Series group area.
    3. Right click the  "Financial_Month" under the Category group to select the "Category group properties",click the sorting and add below expression in the Sort by to specify the order for the month in the x-axis:
    =switch(Fields!Financial_Month.Value="7",1,Fields!Financial_Month.Value="8",2,
    Fields!Financial_Month.Value="9",3,Fields!Financial_Month.Value="10",4,
    Fields!Financial_Month.Value="11",5,Fields!Financial_Month.Value="12",6,
    Fields!Financial_Month.Value="1",7,Fields!Financial_Month.Value="2",8,
    Fields!Financial_Month.Value="3",9,Fields!Financial_Month.Value="4",10,
    Fields!Financial_Month.Value="5",11,Fields!Financial_Month.Value="6",12)
    4. Preview you will get the sample chart display as below according to my sample data:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • How to get consolidated last financial year(1-July-2011 onwards) Tablesize

    Hi All,
    My database contain 120 tables.
    Could you please suggest me the consolidated last financial year (1-July-2011 onwards) data size for 120 tables shared before?
    How to get this/Is this possible Please advice.
    I used below query, but date wise..how to do. pls suggest.
    SELECT sum(BYTES)/1024/1024/1024 "SIZE IN GB" FROM DBA_SEGMENTS WHERE SEGMENT_NAME IN(Table1,table2…)
    Regrads,
    Venkat

    If the data is not partitioned, it is not easy to get the exact size, and it might be impossible.
    I can see two approaches.
    - use the vsize function to calculate the size of a row, and/or individual columns (I don't recall whether vsize supports the *)
    set up an appropriate where clause
    - get the avg_row_size from user_tables. Count the number of rows by year. Multiply.
    Sybrand Bakker
    Senior Oracle DBA

  • Display result based on Financial Quarter

    Hi all,
    I need to display my report based on financial quarter wise(apr-mar) rather calendar year quarter(jan-dec).
    The available dates are calmonth, calquarter(jan-dec).
    Can any one guide me how to derive or define the financial quarter.
    thanks in adv...
    Kiran

    Have a look at previous post:
    Can fiscal month replace quarter?
    See How-To-Guide
    https://service.sap.com/~sapdownload/011000358700002762582003E/HowToDeriveVariableValue.pdf
    for a good example of how to implement Customer-Extis.
    (It's a 2.x Guide but still valid for 3.x)
    Hope this helps.
    Regards

Maybe you are looking for