C mod Coding to display last five years data ( fiscal year )

Hi All,
Requirement is end uesr will enter fiscal year ie Interval example From 2001 To 2003 or end uesr will enter enter only From 2001 and To will be left  balnk.In Report my structure will be fixed ie I need to display data for last  Five years.If end user will enter only one year then data should appear for One year and all other columns should be blank.
Please let me know what type of  variables to be created and cmod coding.
Regards
Albaik

Hi alba,
Pls find here with the code
case I_VNAM.
when 'ZPRYRPER'.
if I_STEP = '2'.
loop at i_t_var_range into temp.
append temp.
endloop.
read table temp with key vnam = '0S_FPER'.
if sy-subrc eq 0.
move temp-low to l1_period.
move temp-high to l_period.
endif.
if l_period-gjahr = 0000.
l_period-gjahr = 2020.
endif.
if l1_period-gjahr = 0001.
l1_period-gjahr = 1990.
endif.
CLEAR E_T_RANGE_WA.
l1_period-buper = '001'.
l_period-gjahr = l_period-gjahr - 1.
l1_period-gjahr = l_period-gjahr.
E_T_RANGE_WA-SIGN = 'I'.
E_T_RANGE_WA-OPT = 'BT'.
E_T_RANGE_WA-HIGH = L_PERIOD.
E_T_RANGE_WA-LOW = L1_PERIOD.
APPEND E_T_RANGE_WA TO E_T_RANGE.
endif.
Hope it helps
Regards,
Marasa.

Similar Messages

  • How Get last five quarters data using ssrs expression

    Hi All,
    i have an ssrs report where i have to get last five quarters data  and also last five months data when i select quarterly/monthly parameter.....
    is there any possibilty that we can get this using ssrs expression
    any help please.........

    Hi Mr.SMK,
    According to your description, there is an SSRS report, you want to create a parameter, when you select quarterly, data of last five quarters will be displayed. If you select monthly, data of last five months will be displayed. If that is the case, please
    refer to the following steps:
      1. In design surface, in Report Data pane, right-click Parameters and click Add Parameter.
      2. Type parameter name and prompt, set Data Type to Date/Time.
      3. Click Available Values in left pane, select Specify values.
      4. Click Add button, in Label text box, type Quarterly, then click (fx) button and type the expression like below:
    =DateAdd("q",-5,Today())
      5. Click Add button, in Label text box, type Monthly, then click (fx) button and type the expression like below:
    =DateAdd("m",-5,Today())
      6. Right-click the dataset used to retrieve data for the report and open Dataset Properties dialog box.
      7. Click Filters in left pane, click Add button, select Data from Expression drop down list, set Operator to >=, in Value text box, type [@ParameterName].
    The following screenshots are for your reference:
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Calendar assignment in OAVH for '03' period control for calendar year dependent fiscal year.

    Hi
    We have a year dependent Fiscal Year in our client's system. It is a 5-4-4 Fiscal Year variant starting from March till Feb.
    While trying to create a new asset we faced an error "You cannot save this asset(Correct depreciation error)." I checked and found that the error is due to a missing calendar assignment in OAVH for the period control key '03' (Pro rata at mid-period) for our fiscal year variant. Till the last fiscal year it had been maintained, but for current fiscal year the assignment is not maintained.
    Can someone help me to understand how the calendar assignment is done in OAVH for a 03 period control key for a year dependent fiscal year like ours?
    I tried using the transaction OA84 (Generate Period Control), but it provides the calendar assignment for all other period control methods except for '03'. Is there some specific reason as to why OA84 does not generate for '03' period control?
    I checked the last fiscal year's assignments in OAVH for our fiscal year variant for '03' period control, but could not understand how it was configured, because it did not relate to the fiscal year variant assignment that we have done in OB29. Also, I even checked whether we need to enter the mid date of the periods, but that also was not done for the last fiscal year. I am unable to understand how the dates have been assgined.
    Given below is our last Fiscal Year's OAVH settings for '03' period control:
    FYV
    Period Cont
    Description
    Year
    Month
    Day
    Period
    AG
    3
    Pro rata at mid-period
    2014
    3
    17
    0
    AG
    3
    Pro rata at mid-period
    2014
    4
    18
    1
    AG
    3
    Pro rata at mid-period
    2014
    5
    16
    2
    AG
    3
    Pro rata at mid-period
    2014
    6
    16
    3
    AG
    3
    Pro rata at mid-period
    2014
    7
    18
    4
    AG
    3
    Pro rata at mid-period
    2014
    8
    15
    5
    AG
    3
    Pro rata at mid-period
    2014
    9
    15
    6
    AG
    3
    Pro rata at mid-period
    2014
    10
    17
    7
    AG
    3
    Pro rata at mid-period
    2014
    11
    14
    8
    AG
    3
    Pro rata at mid-period
    2014
    12
    15
    9
    AG
    3
    Pro rata at mid-period
    2014
    12
    31
    10
    AG
    3
    Pro rata at mid-period
    2015
    2
    13
    11
    AG
    3
    Pro rata at mid-period
    2015
    2
    28
    12
    Please advice.
    Thanks in Advance.
    Regards
    Ambarish

    Dear Ambarish,
    As it is a year dependent fiscal year variant, we should create the year for the variant via OB29, then generate the period via OA84.
    Best regards.
    Beam

  • Change posting date / fiscal year of parked document

    Hi SAP experts, is there a way we can change the posting date / fiscal year of a parked document? The system displays an error "Changing of document number or fiscal year not possible here". Any comments or suggestions will be greatly appreciated.
    Regards!

    Hi,
    You can change the posting date and period of a parked document. Please go through the link. It will guide with screen shots.
    http://www.finance.utoronto.ca/fast/qrg/nav/hld_prk/parteditpostdel.htm
    Regards,
    Satish Muvva.

  • Mid Month Calculation for Year dependent fiscal year

    Hi All,
    We are in middle of AA implementation .How can we configure mid month in year dependent fiscal year .System doesn't allow to put mid month date for year dependent fiscal year.
    If we copy co.code from best practice co.code BP01 system updates date this table in back round.
    But we are not copying from BP01.
    Any one has configure this for year dependent please input.
    Thanks,

    Hi,
    this function is not possible, you have to use a fiscal year variant with 24 real periods instead.
    Check the IMG documentation concerning "Use of Half Months in the Company Code":
    - When you specify the use of half periods in the definition of an asset company code, half periods are automatically specified in all other company codes that use this fiscal year version.
    - You cannot use half periods with non-calendar fiscal months.
    - You cannot take back the use of half periods once the specification has been made.  It is noted internally by the system in the asset master records.
    Regards,
    Markus

  • FI-AA Impact on changing the year dependent fiscal year period from 445 to 435

    Dear Friends,
    May I have your comment on the impact of below change
    Currently using Year Dependent fiscal year variant K5 and period end closing is *445
    future we want to use the same fiscal year dependent variant K5 , however the period end closing will be *435
    *445 Periods - 1st month 4th sat, 2nd month 4th sat, 3rd month 5th sat will be the closing periods
      similarly for the rest of the months in a year
    *435 Periods -  1st month 4th month, 2nd month 3rd sat, 3rd month 5th sat will be the closing periods
      similarly for the rest of the months in a year
    Impact on Asset Module and other  modules will be a great help
    Regards
    SB

    Hi Sanjai,
    SAP do not recommend to change a Fiscal Year Variant that has already
    been assigned to a company code and has already some postings. This
    will may create database inconsistencies
    Please check the following SAP notes which will give you an
    idea of some adverse effects that may happen as a result of a change
    based on the modules/components you have implemented in your system.
    427920     Analysis program for fiscal year conversion
    210861     Changing fiscal year variant in production system
    193713     SAPF070: Change of fiscal year variant
    672255     Shortened fiscal year/changing fiscal periods
    The change of the fiscal year or the change of the fiscal periods
    has an effect in many modules, for example, in FI, FI-AA, FI-SL, FI-LC,
    EC-CS, IM, CO, EC-PCA, MM, PP, SD, PS, PM.
    Corresponding risks (for example, data inconsistency, system standstill)
    can arise from incorrect changes to the fiscal year or from incorrect
    changes to the fiscal periods in a live SAP system.
    You can refer to the following wiki page also:
    http://wiki.sdn.sap.com/wiki/x/jYXrCw
    I hope you find this information helpful.
    Regards,
    Jose

  • FI Impact on changing the year dependent fiscal year period from 445 to 435

    Dear Friends,
    May I have your comments on the impact of below change
    Currently using year dependent fiscal year variant K5 and Period closing is *445
    Future we want to use the same year dependent fiscal year variant K5 and period end closing is *435
    *445 Periods - 1st month 4th sat, 2nd month 4th sat, 3rd month 5th sat will be the closing periods
      similarly for the rest of the months in a year.
    *435 Periods - 1st month 4th sat, 2nd month 3rd sat,  3rd month 5th sat will be the closing periods.
      similarly for the rest of the months in a year.
    Impact from FI perspective and other modules would be of great help
    Regards,
    SB

    Hi Sanjai,
    SAP do not recommend to change a Fiscal Year Variant that has already
    been assigned to a company code and has already some postings. This
    will may create database inconsistencies
    Please check the following SAP notes which will give you an
    idea of some adverse effects that may happen as a result of a change
    based on the modules/components you have implemented in your system.
    427920     Analysis program for fiscal year conversion
    210861     Changing fiscal year variant in production system
    193713     SAPF070: Change of fiscal year variant
    672255     Shortened fiscal year/changing fiscal periods
    The change of the fiscal year or the change of the fiscal periods
    has an effect in many modules, for example, in FI, FI-AA, FI-SL, FI-LC,
    EC-CS, IM, CO, EC-PCA, MM, PP, SD, PS, PM.
    Corresponding risks (for example, data inconsistency, system standstill)
    can arise from incorrect changes to the fiscal year or from incorrect
    changes to the fiscal periods in a live SAP system.
    You can refer to the following wiki page also:
    http://wiki.sdn.sap.com/wiki/x/jYXrCw
    I hope you find this information helpful.
    Regards,
    Jose

  • Impact on changing the year dependent fiscal year period from 445 to 435

    Dear Friends,
    May I have your comments on the impact of below change
    Currently using Year Dependent fiscal year variant K5 and period end closing is *445
    Future we want to use the same year dependent fiscal year variant K5, however the period end closing will be *435.
    *445 Periods - 1st month 4th sat, 2nd Month 4th Sat & 3rd Month 5th sat will be the closing periods
    similarily for the rest of the months in a year.
    *435 Periods - 1st month 4th sat, 2nd Month 3rd sat & 3rd Month 5th sat will be the closing periods
    similarly for the rest of the months in a year.
    Regards,
    SB

    Hi Sanjai,
    SAP do not recommend to change a Fiscal Year Variant that has already
    been assigned to a company code and has already some postings. This
    will may create database inconsistencies
    Please check the following SAP notes which will give you an
    idea of some adverse effects that may happen as a result of a change
    based on the modules/components you have implemented in your system.
    427920     Analysis program for fiscal year conversion
    210861     Changing fiscal year variant in production system
    193713     SAPF070: Change of fiscal year variant
    672255     Shortened fiscal year/changing fiscal periods
    The change of the fiscal year or the change of the fiscal periods
    has an effect in many modules, for example, in FI, FI-AA, FI-SL, FI-LC,
    EC-CS, IM, CO, EC-PCA, MM, PP, SD, PS, PM.
    Corresponding risks (for example, data inconsistency, system standstill)
    can arise from incorrect changes to the fiscal year or from incorrect
    changes to the fiscal periods in a live SAP system.
    You can refer to the following wiki page also:
    http://wiki.sdn.sap.com/wiki/x/jYXrCw
    I hope you find this information helpful.
    Regards,
    Jose

  • FM for month and year to Fiscal year period

    Hello ABAP Experts,
    Please suggest a FM to convert month+year to fiscal year period.
    Suggestions appreciated.
    Thanks in advance,
    BWer

    use the function moduleGM_GET_FISCAL_YEAR
    pass date and fiscal year variant as 24..
    see all the values of the fiscal year variant in the table T009
    Check with fm FI_PERIOD_DETERMINE
    Thanks
    Seshu

  • Difference between calender year and fiscal year

    Hi Experts,
    Can you please let me know What is the difference between calender year and fiscal year?

    Hi Suresh,
    Calender year  begins on January 1 and ends on December 31.
    A fiscal year (or financial year or accounting reference date) is a 12-month period used for calculating annual ("yearly") financial statements in businesses and other organizations.It can be any 12-month period that a company uses for accounting purposes.
    hope its clear
    Cheers
    Sunil

  • Display last 12 months data in column chart

    Hi All,
    I have one  dashbord  requirement in list box i have (example:):  "oct-11" i need to display previous 12 mnth data in column chart anybody help in excel formula how to display last 12 mnths based on list box selection.
    example:  if i select oct-11 from list box i need to display in chart like
    nov-10 dec-10 nov-10...................................oct-11
    please provide how to write in logic in excel

    Hi Shankar,
    Try this formula in excel : DATE(YEAR(A1),MONTH(A1)-1,DAY(A1))
    A1 will be your cell which is the destination of your List box. & then drag it till 12 months.
    If you are not having day from your list box then manually enter 1 in any cell and map that cell in place of A1 for day.
    HTH.
    Neeraj..

  • How to display accounting periods in a fiscal year?

    hi gurus,
    could you please tell me how to display accounting wise calculations like AP1, AP2 ... AP12 in a given fiscal year in Bex (BI7.0)?
    please tell me the logic?
    regards

    You can create them
    Non calender year
    Non Year dependent
    Number of Periods 16, Special Periods XX (based on your requirement)
    Use -1 or +1 year shift based on your requirement.
    However, your requirement is wrong. December month is overlapping in both the years. Please recheck.
    Regards,
    Ravi

  • What is the difference between Fiscal year variant, Fiscal year and Calyear

    hi,,
    What is the difference between
    1. Fiscal Year Variant (0FISCVARNT)
    2. Fiscal Year (0FISCYEAR)
    3. Calendar Year (0CALYEAR)
    In what scenarios they should be used. If we are getting 0FISCVARNT data from ODS. Can we change into other in cube at update rules level or some other level?
    How can we get factory calendar????
    Message was edited by:
            Avneet M

    Hi Gurus
    I was going through this thread and came up some more questions in my mind.
    1. Do we need to set Fiscal Year, Fiscal Varient settings once for all in BW ? ( The path is given in one of the thread above ) need to know if this is one time setting / rebuilding the tables. what will happen when we select and execute factory calender and Fiscal Varient and Rebuild tables in transfer global setting ? Is this one time we have to do for whole BW system?
    2. when we go to SCAL t-code what we need to do and what it do in the system ? I know its for Factory calender but just want to know what it does. It it also for one time during BW build phase ?
    3. How can we link Factory calender and Fiscal year? IS it thro Fiscal varient ?
    Pl help me to clear this doubt,thanks in advance.

  • Mass change of posting date/fiscal year in LIV parked invoices

    Hi,
    We have OSS note 99775 (program ZFSAP2_B) for mass changing posting date and fiscal year for FI parked documents but I can not use this to change posting date for LIV parked invoices.
    Did anyone have any idea how to mass change the posting date of LIV invoices? any NOTE or PROGRAM?
    I tried to create a BDC using FBV4, which in turn calls MIR4, but system is over writing  initial line item amount and qty from PO. 
    I can read initial invoice line item values and over write again but I dont think this is how I should do.
    Please advice.
    Thank you all and best Regards
    Vijay Goli

    Hi
    Thank you very much for your input.I modified the program ZFSAP2_B given by sap and it worked fine for LIV invoices also.
    When I used this program  in 2007 for FV60 documents the document key was changed without raising the event FIPP.CHANGED. But this year when we changed the posting date the system triggered the CHANGED event and as a result of this event the workflow came to the starting point. We did not make any chages to workflow template during 2007. Any idea what could have casued this event to trigger?
    Thanks
    Vijay

  • How to display last 10 minutes data  only using sql query

    Hi,
    Presently, I'm using version is,
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE 11.1.0.6.0 Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    So, please consider SCOTT Schema to resolve my issue,
    I want to display only last 10 minutes what records are inserted or updated or deleted.
    Please provide in many ways!!
    ThankQ!!

    Hi,
    See below:
    select
    from
      emp
    EMPNO ENAME      JOB        MGR HIREDATE      SAL    COMM DEPTNO
    7369 SMITH      CLERK     7902 17-DEC-80     800             20
    7499 ALLEN      SALESMAN  7698 20-FEB-81    1600     300     30
    7521 WARD       SALESMAN  7698 22-FEB-81    1250     500     30
    7566 JONES      MANAGER   7839 02-APR-81    2975             20
    7654 MARTIN     SALESMAN  7698 28-SEP-81    1250    1400     30
    7698 BLAKE      MANAGER   7839 01-MAY-81    2850             30
    7782 CLARK      MANAGER   7839 09-JUN-81    2450             10
    7788 SCOTT      ANALYST   7566 19-APR-87    3000             20
    7839 KING       PRESIDENT      17-NOV-81    5000             10
    7844 TURNER     SALESMAN  7698 08-SEP-81    1500       0     30
    7876 ADAMS      CLERK     7788 23-MAY-87    1100             20
    7900 JAMES      CLERK     7698 03-DEC-81     950             30
    7902 FORD       ANALYST   7566 03-DEC-81    3000             20
    7934 MILLER     CLERK     7782 23-JAN-82    1300             10
    14 rows selected
    select
    from
      emp
    minus
    select
    from
      emp
       as of timestamp (systimestamp - interval '10' minute)
    EMPNO ENAME      JOB        MGR HIREDATE      SAL    COMM DEPTNO
    0 rows selected
    update
      emp
    set
      ename = ename || ' x'
    where
      empno = 7934
    --1 rows updated.
    select
    from
      emp
    minus
    select
    from
      emp
       as of timestamp (systimestamp - interval '10' minute)
    EMPNO ENAME      JOB        MGR HIREDATE      SAL    COMM DEPTNO
    7934 MILLER x   CLERK     7782 23-JAN-82    1300             10
    */For changes, deletes and inserts compair the two result (emp and emp as of timestamp (systimestamp - interval '10' minute) ) with each other.
    Regards,
    Peter

Maybe you are looking for

  • Read Data's from the Form step type at run time

    Hi Experts, I have the 'Form' step type in my workflow and it will displays some values at the Run time. In this form I have one IO field called 'Comments'. So at the runtime manager can Enter the comments on it. Now my need is I need to get the 'Com

  • Calender and input help Icons is not visible in portal

    Dear Experts, There is a webdynpro application in CRM back end system. When the application is launched in CRM UI, It display the screen elements clearly. But when the application is called from portal environment, the calender icon and input help ic

  • Getting list of PO's for a Batch Number

    Hello All, I have a requirement to get list of Purchase orders for a Batch Number. Is there any standard report available where in i can enter the Batch Number and it will give us list of all PO's where this batch has been used. Points assured. Warm

  • JFRAME- JPANEL question

    I have a JFrame that holds a JPanel. If that JPanel needs to contact the JFrame how do I get access to parent? I tried panelname.getParent, when I did I got a java.lang.ClassCastException Any help would be great. Brock

  • Problem with processing idoc cond_a04

    Hi all, I m using idoc message COND_A04 to populate and create condition and scale entries for Agreements (MEB1). However, i am getting the following error: "Results of pricing with condition type ZI01 can not be changed" where ZI01 is a condition ty