Help on report based on fiscal year

I have a table like below and data like below
SQL> DESC A
Name Null? Type
ID NOT NULL NUMBER(10)
PAY_DATE DATE
AMOUNT NUMBER(11,2)
SFY VARCHAR2(20)
SQL> SELECT * FROM A;
ID PAYDATE AMOUNT SFY
1 10-DEC-99 2000 1999/00
1 10-MAR-99 3000 1999/00
2 10-SEP-99 2000 1999/00
2 10-MAR-99 3000 1999/00
3 10-DEC-00 2000 2000/01
3 10-MAR-99 3000 1999/00
4 10-JAN-00 2000 2000/01
4 10-MAR-99 3000 1999/00
5 10-DEC-00 2000 2000/01
5 10-MAR-99 3000 1999/00
6 10-JAN-00 2000 2000/01
6 10-MAR-99 3000 1999/00
WHAT I NEED TO GET IS BASED ON FISCAL YEAR(1999-2000) I NEED TO GET THE AMOUNT PAID
FOR JUN,SEP,DEC,MARCH
SO I NEED A QUERY LIKE BELOW
1)SUPPOSE IF USER NEEDS REPORT BASED ON 1999-2000
THEN I NEED IS
ID JUN1999 SEP1999 DEC1999 MARCH1999 TOTAL
1 0 0 2000 3000 5000
2 0 2000 0 3000 5000
3 0 0 0 3000 3000
4 0 0 0 3000 3000
5 0 0 0 3000 3000
6 0 0 0 3000 3000
CAN ANYBODY HELP FOR CODE
like for 2000-2001 and so on

One thing you might want to take a look at are the format masks for dates. There is a to_char format mask for dates of 'Q' which returns a number 1-4 for the quarter the date is a part of ie 1 for Jan-Mar, 2 for Apr-Jun, etc. It's based on the calendar year, but you could doing something with addition and mod to change the order if you like. You can then use the resulting column as a break column in your report.
Hope that helps,
Toby

Similar Messages

  • To get Fiscal period based on Fiscal Year

    Hi Guys,
               Can anybody tell me how to get Fiscal period based on Fiscal Year?
    Thanks,
    Arpan

    Hi Anshu,
    Have a good day.
    I need to convert fiscal year(2011) to fiscal period(2011001).
    Fiscal year(key field in data source) mapped to the fiscal period(key field in infoprovider).
    But in the transformation when I have mapped these fields, data is not coming propperly into the infoprovider because in the transformation its not converting fiscal year to fiscal period.
    This is the scenario. Please help.
    Thanks,
    Arpan

  • Report from 2 fiscal years

    Hi,
    GL Balances : I want to take out the report from 2  fiscal years, 2009 (10 to 12 period) and 2010(1 to 9 period).
    Please let me know the report name.
    Thanks

    Hi...
    Can you use FS10N, FBL3N, S_ALR_87012332 - G/L Account Statements ,S_ALR_87012282 - G/L Line Items, List for Printing , to see the year wise like
    While entering the date range we have to  enter from 01.10.  2009 to 31.12.2009 or from 01.01.2010 to 31.09.2010
    But you can give both date range at a time
    I hope it will helps
    Regards
    vamsi

  • Get Fiscal Period based on Fiscal Year

    Hello Experts,
    I have one query. I wanted to get fiscal period based on fiscal year entered in selection screen.
    I tried to find the FM for it but didn't get it. Can you suggest me any FM which gives in Fiscal period based on fiscal year in FI?
    Regards,
    Neha

    Hi,
    Check the following link:
    How to get fiscal period based on date and Fiscal year?
    http://www.sapdev.co.uk/fmodules/fms_fiscalyr.htm
    Regards,
    Bhaskar

  • Data Load into the Cube based on Fiscal Year

    Hi All,
    I was told to load the data into the cube coming from 3 different datasources, but based on fiscal year. I was told to load the data for 2010, 2009 and so on.
    Any suggestions please...

    Hi Dear,
                Write the following code in start Routine of Update Rule:-
    In BI 3.x
                   Delete DATA_Package where calday lt '20090101' and calday gt '20091231'.
               to load data onlyfor 2009.
              same thing for 2010.
    In BI 7.0
               Start Routine of Transformation:-
              delete source_package where calday lt  '20090101' and calday gt '20091231'.
    Regards
    Obaid

  • Displaying Restricted Key Figure Based on Fiscal Year

    I'll try and explain my problem.
    We have created a query using the CCA cube. We created 3 restricted key figures each with a different budget plan version. They are called 'AB' ,'PB' and 'RB'. When the user runs the query it will show planned values out for 5 years. So for example right now we are in Fiscal year 2006.
    The problem is that 'AB' is only valid for year 2006, 'RB' may only me valid for 2007 and 'RB' may only be valid for 2008 - 2010. They use a different plan version for different years, If I place all three columns on the report I get zeros when the plans are not valid. Here is what I would like: When the fiscal year changes somehow select the correct restricted key figure to show and also adjust the text to reflect the fiscal year.
    Its like my variables are dependent on the fiscal year displayed.
    Any help would be great.
    Rick

    Hi Richard,
    Have you tried out the Suppressing Zeros options in query properties...if the whole column is blank for a particular year, you should be able to suppress it. Click here for more info:
    http://help.sap.com/saphelp_nw04/helpdata/en/1e/99ea3bd7896f58e10000000a11402f/content.htm
    You can use text variables in the RKF description to reflect the year for which the data is being displayed.
    Hope this helps...

  • PS module report .. converting fiscal year representation

    i have a report which prints the actuals for a fiscal year . Its like each country has their own fiscal year representation , i have to convert data of other countries to the fiscal year representation of US(sep-aug) . I dont understand how to give the select statement and how to proceed with this. I appreciate if anyone can help me with this.
    Check for function modules and Check index's.
    Lets load up the yps_costplan table for loading.
    if they didn't specify a project to single load, go get them all.
      if s_objnr is initial.
      if in first fiscal month, "Sept",  then get previous years data to
       fill in the last month, month 12.
          if t_t009b-poper = '001'.
              select * from yps_costplan into table i_yps_costplan
              where yyobjnr gt 'PR00000000' and yygjahr ge yprevyear and
              yygjahr lt yplus1year.
        else.
             select * from yps_costplan into table i_yps_costplan
             where yyobjnr gt 'PR00000000' and yygjahr ge p_fiscal and
              yygjahr lt yplus1year.
        endif.
       When getting all, start with 2003,  when doing month, use current
        fiscal year only.
       yygjahr between t_yearm1 and t_yearp1.
      else.
    They secified 1 project, go get his data.
        if not s_objnr-LOW cs '*'.
           concatenate s_objnr-low '%' into hold_projn.
              loop at s_objnr.
                  if s_objnr-high eq space.
                       concatenate s_objnr-low '*' into s_objnr-low.
                       s_objnr-option = 'CP'.
                       modify s_objnr.
                 endif.
             endloop.
           select posid objnr from prps into table t_prps
            WHERE POSID IN S_OBJNR.                     
       else.
        concatenate s_objnr-low(sy-fdpos) '%' into hold_projn. 
          select posid objnr from prps into table t_prps
          where posid like hold_projn.                         
            WHERE POSID IN S_OBJNR.                              
       endif.
      if sy-subrc eq 0.
          loop at t_prps.
      if in first fiscal month, "Sept",  then get previous years data to
       fill in the last month, month 12.
              if t_t009b-poper = '001'.
                  select * from yps_costplan into table h_yps_costplan where
                  yyobjnr = t_prps-objnr and yygjahr ge yprevyear and
                   yygjahr lt yplus1year.
             else.
                 select * from yps_costplan into table h_yps_costplan where
                  yyobjnr = t_prps-objnr and yygjahr ge p_fiscal and
                   yygjahr lt yplus1year.
             endif.
             if sy-subrc eq 0.
               loop at h_yps_costplan.
                  i_yps_costplan = h_yps_costplan.
                  append i_yps_costplan.
                endloop.
            endif.
          endloop.
        endif.
      endif.

    the table yps_costplan contains posting date fields but i donno why there are so many fields for that(12) and which value do i need to take exactly .
            How can we translate between the different fiscal year variants .There is some function called in initialization . Z4 is sep-aug.
    Form simu_date2.
    get fiscal year?
    calculate how many open months with current date.
      select * from t009b into table t_t009b
        where periv = 'Z4' and bdatj = sy-datum(4).
      read table t_t009b with key
      bdatj = sy-datum(4) bumon = sy-datum+4(2).
      yglobal_year = sy-datum(4)  + t_t009b-reljr.
      ycurrentyear = yglobal_year.
      yprevyear = yglobal_year - 1.
      yplus1year = yglobal_year + 1.
      yplus2year = yglobal_year + 2.
      yplus3year = yglobal_year + 3.
    endform.

  • Cost Center Planing Report Layout KP65 - Fiscal Year Variable Error

    Hi All,
    I am creating a layout for Cost Center Planing in KP65. I selected Fiscal Year Variable GJAHR.
    In Tex Maintenance when I give "1st Qtr $GJAHR" and save I am getting the following error. "Text variable &$GJAHR has an invalid replacement rule"
    The same is available in other existing reports.
    Fiscal year variable is created in KE3E also.
    Please let me know what is the issue.
    Thanks
    Satish

    Hi,
    Thanks for the reply.
    I created new Variable as follows
    For Fiscal Year
    Type of Var = Char Value
    Enter variable name, say, ZGJAHR - and then Variable is shown as &ZGJAHR
    Field Name = GJAHR
    Replacement type = Entry
    Enter Description
    Parameter/selectop = Parameter
    and I used the variable in the layout and when saving I am getting error
    Please maintain variable &$ZGJAHR
    Text variable &$ZGJAHR has an invalid replacement rule.
    In the text maintenance medium text I have given as "1st Qtr $ZGJAHR".
    Please let me know where can be the issue.
    Thanks
    Satish

  • How to display results of a report based on current year

    Hi,
    Please advice me for the following requirement.
    I have a report which is having sales results, which is having year column also. Report has to be displayed based on the current year. Now it is 2013. I should show current year results only i.e 2013.
    In 2014, i should show only 2014 results. How to achieve this at a report level.
    regards
    CK.

    Hi CK,
    You are having Data for 2014 also. If not means, you can use sql query select max(year) from period.
    So it will show the final maximum end of the year(2013) from database.
    You can use dashboard prompts too. in the prompt also you can have specific year or sql query
    http://mkashu.blogspot.com
    Regards,
    VG

  • Return current period based off of current fiscal year and date

    Good Afternoon,
    Is there a way in the webi that I can create a dimension that always reflects the current Fiscal Month based of Fiscal year and date? I have a report that I am trying to show sales for a customer based off the current fiscal month. I would like this report when refreshed to be based off this fiscal month dimension instead of showing each fiscal month or changing it manually. What is the best way to do this?
    I have attached an image that shows current numbers by period (month) and then the YTD Totals. I would like to have my 'Period' column always reflect the current period and the Total column to reflect that months totals based off the period column. So for this period (3), instead of seeing 3 lines for each month I would just see the '3' and the total as $541,310.46, monthly as 412,502.09 and my YTD as 1,080,091.06.
    Any help is always appreciated!
    Thank you,
    Tiffany

    Hi,
    Create a variable
    FlagVar=If([Period]=Max([Period]) In Report;"Show";"Hide")
    And apply block filter of FlagVar=Show
    Are these coming TotalSales  MonthlyGoal YTDSales directly from universe? If they are calculated at report level then you might want to use NoFilter. like =NoFilter([YTDSales])

  • Web Report not printing the fiscal year period variable value

    Hi,
    In web report where in one text element, we enabled the fiscal year period variable value to display
    in the report result.
    If we run the report then this fiscal year period is displaying in the general information.
    We have print button (Java Code),  where user can take a printout of the same report.
    In the printout this Fiscal year period is NOT PRINTING, other variables like rollup time, technical name of report etc are printing perfectly.
    It is required to print the fiscal period also in the print out of the report.
    Any help to come out of this.....
    Thanks
    Srinivas

    Hi
    Any Help.....
    Srini

  • Fiscal Year Change in MM failing with error message

    Hi I am with a company that is using SAP R/3 ECC6 Modules SD MM FI CO with COPA (costing based) for reporting. Our fiscal year runs 1 August to 31 July. I am a FICO support analyst, currently also filling in for SDMM until we complete recruitment of a new person in that post.
    In MM when trying to open the new period/close the old, we are getting the error message 'The specified year 2009 is not the current calendar year.' the detailed log says 'incorrect period in control record of CoCo. The current period (month/year is 112008)
    I have:
    1) Maintained our FYV in the IMG and it is set to year independent (tried making it year dependent but that didn't solve the problem)
    2)Set the apppropriate periods with correct year shift and texts
    3) Assigned the CoCode to the FYV
    4) Checked that the proper variant for posting periods are set.
    5) Set the Global parameters for the CoCode
    Financial postings work fine and there seems to be no problem with the FYV there, and everything worked Ok last year (our first with SAP since Go Live).
    I have searched the relevant sections in my SAP Press config manuals for FI and MM and done a search on Google but there must be something I am missing.
    Can anyone suggest a solution, please.
    Thanks in advance
    David

    Thanks anyway, Vijay, but OB52 is for changing Fiscal periods. That table is set correctly, the financial postings wouldn't be working if it wasn't.
    I hadn't checked OMSY, Syed, thank you for that suggestion. There are no entries in any of the fields for Year or FYr.  I am willing to make entries here to try it if there is a good reason but why would it have worked all through FY2008 without any entry in these fields but fail now in the new FY? The period change worked without problem for the past 12 months, isn't this the same as most SAP fields i.e. if you enter nothing then it is open for everything, in this case all years?
    I am using MMPV to try to open the new period but it is there that I am getting the error messages.
    Edited by: David Crossley on Aug 11, 2008 1:00 PM

  • Using Fiscal/Year Period to get last year all months data

    Hi,
    Had a requirement to get Last Years 1-12 months data based on Fiscal/Year Period. So here i am using Fiscal/Year period as my input. Please let me know with code.
    Regards,
    Vishnu

    Hi ,
    Where you want to write code ?
    Well the basic logic will be like :
    TYPES: BEGIN OF ty_range,
    sign TYPE c LENGTH 1,
    option TYPE c LENGTH 2,
    low TYPE c LENGTH 8,
    high TYPE c LENGTH 8,
    END OF ty_range.
    DATA : t_range TYPE TABLE OF ty_range,
    w_range LIKE LINE OF t_range.
    DATA :v_lastyear type c length 4  .
    v_lastyear = sy-datum(4) - 1 .
    w_range-sign = 'I'.
    w_range-option = 'EQ'.
    concatenate  v_lastyear '001'  t into w_range-low.
    concatenate  v_lastyear '012'  t into w_range-high.
    APPEND w_range TO t_range.
    ****it will select data from source package for last one year .Internally year and period store like YYYYPPP  (2011001)
    select  SOURCE_PACKAGE WHERE 0fiscper  IN t_range.
    you can modify selection statement as per your requirement .
    hope this will be helpful .
    Regards,
    Jaya Tiwari

  • Customized report based on data from 2 different infoproviders.

    Hi Team,
    The scenario is as follows:
    We have an Datasource based on a ECC Table which contains data based on FISCAL YEAR and no period field such as X03, X06 & X09. these values are populated in INFOCUBE A. Also note that the ECC table itself does not contain any field which refers to Period.
    In my another INFOCUBE B, I have the value for the Period (ZZPERIOD) field on a Quaterly basis.
    Now the report requirement is:
    For the input value of ZZPERIOD = 201103, display value X03.
    similarly for X06 and X09.
    PLEASE ADVICE.
    Thanks & Regards
    Sneha

    I'm not sure you've understood my reply. Do you understand the notion of granularity? If not please read about this and understand it. Then you will have the answer you need.
    I'm assuming you have KFs in both cubes right? Now if Cube A is aggregated by Year - you cannot split these figures by anything other than Year.
    Just because you want to add other key figures from another cube (B) whose values sit at Cal Quarter does not mean that any coded rules you apply will result in correct figures when you drill down to Quarter. How do you propose to fix that? Answer: you can't, it's impossible without getting yourself in a lot of trouble with the business/your client.
    Your best bet is to add a characteristic into Cube A called 'Source of Data' and fill that in your transformations. Then you can load both data from A and B into the same cube A. When reporting, just use a restricted KF to pull out the values you want.
    If you drill down by Quarter of course Cube A KFs will be "not assigned" for the simple reasons I explained above.

  • Asset Register with different Fiscal Year Variant

    Ministry Of Commerce requires Power Line Carrier Companies to maintain
    an additional fixed asset register. This register needs to have
    Fiscal Year - April to March
    Revaluation of Assets on 1 April every year based on indice provided
    Ministry.
    Depericiation Rates same as existing
    Staright line depreciation
    No depreciation / revaluation of new assets aqired during the year
    No depreciation on disposal of assets during the year
    This can work OK for Companies with same Fiscal Year Variant (April to
    March).
    What are the options for Companies with different Fiscal Year?
    Some of the companies do not have the new GL activated and hence cannot
    use the additional ledger and use for this purpose.
    Can you please advise.
    Regards,
    Suneel Bhonsule

    If the company codes are using fiscal year variant April - March, then it is possible. If the company codes are using differant fiscal year variant other than April - March and if you want to get the report with the Fiscal year April-March,, it will not work out..
    Even If new GL Activated for all company codes also its not possible.. i had a experience of this and finally came to know that parellel ledger or special ledger concept will not support for Diefferant fiscal year for Asset accounting alone which is differant from Company code fiscal year..
    Thanks
    Fit 4 Nothing

Maybe you are looking for

  • Import shared library(dll)

    Salut. I want to import the GetVolumeInformationW function from the Windows kernel32.dll. Microsoft says: Requirements Client Requires Windows Vista, Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, or Windows 95

  • TIFF superior over PSD

    Hi, I came across this link.  What interested me was one comment, TIF format is a superior format then PSD.  What is the community opinon on this ? I sorta agree ! Wrong...PSD is now a bastardized file format that is NOT a good idea to use. Even the

  • Retail Store problems?

    Can't really find a topic to give feedback on retail stores. The Cambridge MA store has been short staffed for a while, so you can never get help. Today I called to see if the 160GB ipods were there, and was told yes. I made the trip down only to be

  • Download of Dreamweaver not opening

    I've downloaded the CC version of Dreamweaver and it will not open on my machine. I'm running a MacBook Pro, OSX 10.9.5 All my other CC apps work fine. Do I need to restart?

  • IPhone Rebate - Apple, you NEED a consistent policy!

    I have been reading (sometimes skimming) this forum for the last few hours. It is becoming very clear that Apple has been blind sided by this revolt. Did they think the kool-aid would make us turn a blind-eye to this blunder? I digress ... Some peopl