Fiscal year split logic

Hi Guys Business requirement is have the fiscal year split logic
1. Fiscal year 2007 (T009b) or ODD fiscal years and not calendar 2007
2. Fiscal Yeat 2008 or Even Fiscal Year and Not Calendar 2008
I want the simple abap logic that with generate a success message in process chain for Even year and Else return Odd to go other path in process chain
Thanks
Sincerely
Soniya Kapoor

Hi Sonia,
U can get the fiscal year by using FM:
FTI_FISCAL_YEAR_MONTH_GET or any other FM.
Then , if the fiscal year is divisible by 2, it is a even year else, odd year.give messages accordingly.
Hope it solves ur query.

Similar Messages

  • Splitting is not working for fiscal year 2008

    hai experts,
    The splitting is not working for fiscal year 2008. This is critical for month end.
    pls explain me ful cycle and advise me what i have to do,
    thank you

    Hi
    Please check the documentation in the links below.
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/1c/2ed140ed61712ae10000000a155106/content.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/87/3da04028f40160e10000000a1550b0/content.htm
    This gives yuo a brief on Document splitting. Please let me know if you need any further help. Please do award points if found useful.
    Karthik

  • Funds Management Issue not able to split PR/PO amount based fiscal year

    Hello Experts,
    We are implementing SAP Funds Management with BCS.
    Business Scenario: Service Purchase requisitions and Purchase orders created for one year. beginning in current years and ending in next fiscal year. our company fiscal year is Jan to Dec. commitments in funds management are updated based on delivery date in current fiscal year only.
    Requirement: Need to update funds commitment from PR or PO into respective fiscal years.
    Example:
    Fiscal year: Jan 2014 to Dec 2014
    Service PR or PO created for -  April 2014 to March 2015
    Value of PR or PO 12000 Rupees
    commitment should update as follows; 2014 - Rs. 9000 and 2015 Rs. 3000
    Please provide us solutions for above issue.
    Thanks in advance for the support.

    Excuse me Venkata:
    Fiscal year: Jan 2014 to Dec 2014
    Service PR or PO created for -  April 2014 to March 2015
    Value of PR or PO 12000 Rupees
    commitment should update as follows; 2014 - Rs. 9000 and 2015 Rs. 3000
    How do you think that system (SAP MM and SAP BCS) will update 9000 (year 2014) and 3000 (year 2015) ? That's impossible. Think about it.
    You'll need two lines like Eli said.
    That's the only way, and right one.
    Regards.

  • Open and Close periods/Fiscal years

    Dear All
    We are in the process of FM-BCS implementation, we observed thre is transaction code (FMOPER) for open the Budget periods. This is working for Budget workbech (FBMM) only. But at the time of Actual Postings even period is not open in FMOPER system is allowing for actual postings.
    Kindly suggest where we can control actual postings through period open/cose option in FM-BCS.
    Thanks in advance
    Rao

    Hi Rao,
    You need to be aware of all the impact of the use of PBET (Period-Based Encumbrance Tracking) before activating it in transaction OF39. This is not a simple change, it impacts all your integrated postings that come from all other areas (FI, CO, MM, SD) into FM.
    You cannot use any FM update date other than the POSTING date when PBET is active.
    One common error when you activate PBET is FI_E050 - Posting date/period 00/00/0000 is earlier than existing
    date/period 00/00/0000.
    If you want updating to take place on the delivery date, you must return profile to Fiscal Year Based (non-PBET) updating.
    This step will also eliminate the error FI_E050.
    Part of the basic PBET logic, aims at recording a detailed change history of every single document in FM.
    For more details on this, please also refer to the program documentation  and chapter Public Sector Management -> Funds Management -> Recording Actual and Commitment Data -> Period-Based Encumbrance Tracking.
    The standard functionality when PBET is active is to use the system date as the FM posting date. However, you do have 3 options to overwrite this:
    Document Creation:
    1.- Version Management (PR/PO)
    2.- FM updating date is the document posting date.
    Document Change:
    1.- System use FM_TRANS_DATE date as FM updatign date, if this date is not filled, system use system date as FM updating date.
    If customer want to change this logic, the FM updating date is decided by one of the following three steps, in order shown.
    - Version Management (PR/PO): Posting date of version
    - Transaction FMOD to override the update date by user
    - Activate user exit EXIT_SAPLFMFA_004 so that a popup screen is
       displayed that permits entering the FM posting date, you could
       manually set the date found in the document header to a later date.
      - you could manually set the date found in the document header to a
    later date (System date  SY_DATUM).
    PBET is Periodic-based encumbrance tracking and it is a function that monitors encumbrances per period, with a change record issued for each change made within a period. This function belongs to Funds Management Area (PSM-FM).
    If PBET is active, system does not allow posting to a date earlier than the present date, you will receive error FI_E050 in case this is not satisfied. Follow are two comments form the code which indicate same:
    "No new dates can be earlier than the original or new account assignment line items".
    "Ensure that new fm update dates are not older than original date or if a change, this change must be latest date in document"
    To use or not to use PBET is customer decision and this impact that the period is verified more strictly than without PBET. Maybe you should consider with your consultant if using PBET is the best solution for your business processes.
    Best Regards,
    Vanessa.

  • Items are in different fiscal years - Posting

    Hello
    Here one user is doing a transaction F-32 for clear customer items.  He has to clear items but the items were posted in different fiscal years.  When he tries to post the document, it gives the message "Items are in different fiscal years".  few items are in the last year and rest are in the current year. Both the fiscal years are open in the case.  How can I post the document ?

    can you provide the message number.
    can you also confirm if this is an error, warning or message.
    As standard you should be able to clear open items from different fiscal years.
    Are you matching invoices off with a zero balance?
    Also can you confirm if you have activated document splitting?

  • Interpretation of Fiscal year variant

    Hello Experts,
    Ok, using the Tcode OB29, I could see the fiscal year variant K4, K6,  K7 as follows:
    Variant----Yr Dependent--Calendar Yr--Posting Periods----Special Per.
    K4----
    Unchecked----
    Checked----
    4----
    2        
    K6----
    checked----
    Unchecked-----4--
    2        
    K7----
    Unchecked----
    Unchecked-----4--
    2        
    In went into the details of the “Change View” of K6  and K7 and it shows:
    Month----
    Day----
    Period----
    Year Shift
    1----
    31----
    7----
    0
    2----
    28----
    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
    1. Can you help me interpret the second table and how it relates to the K6 row in the first table?
    2. In particular, I will appreciate some clarification on the Year shift and in the column period, why it started from 7; and why after 12, it switched to 1.
    4. Can you give a reason why in some cases K6 will be used while in others K7  or K4 will be used.
    3. Also, some help I’ve gotten so far were suggesting that to modify the variant I go to:
    AC Financials ® FI Financial Accounting  General Ledger Accounting ® FI - Closing and Reporting ® Fiscal Year.
    I could not find this instruction under BW. Was it some R3 instruction of BW?

    Hi,
    I believe the "year shift" column is meant for the non-calendar fiscal year.
    eg in a Calender year  
    Jan  Feb  Mar  Apr  May  Jun
    Fiscal year definition
    Period
    10   11   12   1    2    3
    Year Displacement
    -1   -1   -1   0    0    0
    It is just telling the system that when it is eg 21 Jan 2006, the fiscal year to be captured will be FY 2005.  When it turns 01 Apr 2006, the FY will be 2006.
    In your eg, it is following the logic that when it is 01 June 2006 the FY will be 2006. But when it turns 01 July 2006 the FY will be captured as 2007.
    By the way, the special periods are meant for capturing adjustment.
    For more information on the year shift, please see
    http://help.sap.com/saphelp_46c/helpdata/en/96/8b2fc843ce11d189ee0000e81ddfac/content.htm
    In BW, these are considered the basic settings, alongside with the currency definition.  Go into SBIW in BW to see the basic settings for currencies and fiscal variant defined.  Usually when the BW system is set up, these 2 settings will be read into the system as part of the initial configuration.
    Cheers,
    Gim

  • Data conversion for New GL - Going live during fiscal year

    Hi Experts,
    My client is going live on Oct 1 (fiscal year in Jan -Dec). So for data conversion we need to load P&L and BalanceSheet as of Sept 30, 2009.  I need your help to resolve few open issues. (we have activated Doc Splitting with Zero Balance and Segment )
    1) When we load P&L balances - how can I assign Profit Centers to all these P&L iitems .  
    2) What is the procedure (best practices) to assign Profit Centers to all the Balance Sheet items since we are going live during Fiscal Year
    3) When we process open items  (AR, AP) in month of October how the Profit Center assignment will work?
    (My client will be using Profit /Cost center terminology first time, so we need to map all the B&S and PnL items to Profit centers)
    4) What is the best way to map all the Balance Sheet GL accounts to Profit Centers.
    Sorry for asking too many questions. Any help would me very much appreciated.
    Thanks,
    Sam

    1) When we load P&L balances - how can I assign Profit Centers to all these P&L iitems .
    Each P&L account balance has to be upload with cost centre, then automatically PC will be triggered.
    2) What is the procedure (best practices) to assign Profit Centers to all the Balance Sheet items since we are going live during Fiscal Year
    Let client decide the profit centre for balance sheet items, since they knows which balance relates to which pc
    3) When we process open items (AR, AP) in month of October how the Profit Center assignment will work?
    While uploading AR,AP balances, each line item to be uploaded with profit centre, automatically in october PC assignment will work.
    (My client will be using Profit /Cost center terminology first time, so we need to map all the B&S and PnL items to Profit centers)
    4) What is the best way to map all the Balance Sheet GL accounts to Profit Centers
    Try to identify each balance sheet gl balance to each profit centre, this will help in future reports. otherwise put in common pc

  • Q1: Secondary Index. Q2: Fiscal Year /Period

    Hi gurus,
    I have two questions need your explain:
    Q1: To improve the query performance I am going to create some secondary indexes on an ODS, I am wondering whether this action will remove the data from the ODS therefore I have to reset the data loading process and if these indexes can be maintained while data loading automatically ?
    Q2: About fiscal year /period which technical name is 0fiscper. we know in sales order header, item also purchase order and billing ODS or CUBEs, FY/Period are existed in those models. but there are still some other dates e.g. delivery date, goods issue date, goods recieve date, document date, posting date and so on. So which date is used to generate FY/Period ?
    Thanks in advance
    Edited by: Leon Ouyang on Dec 3, 2008 4:27 PM
    Edited by: Leon Ouyang on Dec 4, 2008 1:26 AM

    Hi,
    1)The creation of index have no effect on the data stored and you need not delete or relaod the data.
    System will adjust the index with every data load to the DSO automatically.
    2)Fiscal year period depeneds upon the module from which you are using the data and you can tweak the logic for this suit your need.
    If the data source is providing the fiscal period values then well and good.
    If not then generally its mapped to those dates which are driving date of the query or the date which is going to be used by the user for the input selections in the report.
    for example if you want sales based on the posting date in the reports and user just wnt sale till month and not date then.......you map posting date to fiscal period in the transformation and use them in the reporting.
    This can vary too...there is no hard fast rule for what date it should be mapped...and it all depends upon the reporting requirement
    The good design practise is to fill it with the same date which is filling calday and calmonth objects.This will keep granuarlty as same...but if you want some other selection in the report then you can map calday to some other date and fiscal period to some thing else.
    Ajeet

  • 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

  • Fiscal Year field when Setting up posting period

    Hi,
    Our client has financial year from 1st July - 30 June.  How we normally do is:
    for 1/7/2007 - 30/6/2008, Fiscal Year field = 2008 and 1/7/2008 - 30/6/2009, Fiscal Year field = 2009. etc etc.
    However, what I notice is:
    When creating new period, eg: for 1/7/2008 - 30/6/2009, SAP will default the Fiscal Year = 2008.  So, it really requires our client to be very careful and overwrites the default.
    My question is:
    (a) Does the field 'Fiscal Year' play any signigicant role in SAP?
    (b) What is your normal approach about filling in this 'Fiscal Year' field?
    (c) We also notice that when we put in 2008 as the Fiscal Year, when writing report using XL Reporter, we can never reply on the Period code.  We need to refer to the Period name instead.    It is rather confusing for some of our client.
    Any thoughts appreciated.

    Hi
    I'm not sure what impact that it has but I usually change it to be 2008 (Jul 07 to Jun 08) etc.. as this make more sense to our clients.
    Also, I change the period names to be more logical as well, like July 2007 rather than 2007/08-1. This means that on reports (like XLReporter) it makes more sense to the non-financial people receiving the reports.
    Regards
    Jenny

  • ABAP routine for DTP fiscal year/period filter

    Hi All,
    Delta loads are which not possible for when the transformation source is an InfoSet.  To limit the data in these loads, currently a filter is set in the DTPs on fiscal year/period so only load the current month and 2 prior months are loaded.  This filter has to be updated each month for each of the DTPs manually.  To eliminate this monthly task a dynamic filter (routine) needs should be used rather than a static filter. Can anybody help me in providing the logic
    Regards
    Siri

    data: l_idx like sy-tabix.
    read table l_t_range with key
         fieldname = give field name .
         Data : Year(4) type n,
                   period1(2) type n.
                   period2(2)type n.
    Currper = sy-datum+4(2) .
    period1 = currper-1 .
    period2 = currper-2.
    year = sy-datum+0(4).
    concatenate  year currper to P1.
    concatenate  year period1 to P2. // define P1 , P2 , P3 as 0fiscper .
    concatenate  year period2 to P3.
    l_t_range-sign = 'I'.
    l_t_range-option = 'BT'.
    l_t_range-low =  P3.
    l_t_range-high=  P1.

  • Asset Aquisition report date problem in indian fiscal year style  (urgent)

    hi all genius there,
    i am developing asset aquisiton report in which i should get
    the record of asset depending on indian fiscal year (1st april to 31st march).
    so that means if i enter 31.03.2006 then i should get all the asset records
    from 01.04.2005 to 31.03.2006.
    how to do it. its very urgent. plz if aany one has done this scenario for
    asset aquisition report then plz send me the code.
    my id is- [removed by moderator]
    or otherwise i am sending my code plz check it and do the modification to get the above requirement.
    REPORT Z_FA_ACQ  NO STANDARD PAGE HEADING
                     LINE-SIZE 400
                     LINE-COUNT 65(3).
    TYPE-POOLS : SLIS.
    TABLES : ANLA,                         "ASSET MASTER RECORD-SEGMENT
             ANLZ,                         "time dependent asset allocations
             ANLC,
             ANEK.
    DATA : BEGIN OF T_ANLA OCCURS 0,
           BUKRS LIKE ANLA-BUKRS,
           ANLN1 LIKE ANLA-ANLN1,
           ANLN2 LIKE ANLA-ANLN2,
           AKTIV LIKE ANLA-AKTIV,
           TXT50 LIKE ANLA-TXT50,
           ZUGDT LIKE ANLA-ZUGDT,
           MENGE LIKE ANLA-MENGE,
           MEINS LIKE ANLA-MEINS,
           ANLKL LIKE ANLA-ANLKL,
           END OF T_ANLA.
    DATA : BEGIN OF T_ANLZ OCCURS 0,
           BUKRS LIKE ANLZ-BUKRS,
           ANLN1 LIKE ANLZ-ANLN1,
           ANLN2 LIKE ANLZ-ANLN2,
           GSBER LIKE ANLZ-GSBER,
           KOSTL LIKE ANLZ-KOSTL,
           STORT LIKE ANLZ-STORT,
           RAUMN LIKE ANLZ-RAUMN,
           KFZKZ LIKE ANLZ-KFZKZ,
           WERKS LIKE ANLZ-WERKS,
           END OF T_ANLZ.
    DATA : BEGIN OF T_ANEK OCCURS 0,
           BUKRS LIKE ANEK-BUKRS,
           ANLN1 LIKE ANEK-ANLN1,
           ANLN2 LIKE ANEK-ANLN2,
           BELNR LIKE ANEK-BELNR,
           BUDAT LIKE ANEK-BUDAT,
           XBLNR LIKE ANEK-XBLNR,
           SGTXT LIKE ANEK-SGTXT,
           GJAHR LIKE ANEK-GJAHR,
          pdate LIKE anek-budat, " modified by sanjeev for date logic
           END OF T_ANEK.
    DATA : BEGIN OF T_ANLC OCCURS 0,
           BUKRS LIKE ANLC-BUKRS,
           ANLN1 LIKE ANLC-ANLN1,
           ANLN2 LIKE ANLC-ANLN2,
           ANSWL LIKE ANLC-ANSWL,
           NAFAP LIKE ANLC-NAFAP,
           AAFAP LIKE ANLC-AAFAP,
           AFABE LIKE ANLC-AFABE,
           GJAHR LIKE ANLC-GJAHR,
           END OF T_ANLC.
    DATA : BEGIN OF IT_FINAL OCCURS 0,
            ANLN1 LIKE ANLA-ANLN1,
            ANLN2 LIKE ANLA-ANLN2,
            AKTIV LIKE ANLA-AKTIV,
            TXT50 LIKE ANLA-TXT50,
            ZUGDT LIKE ANLA-ZUGDT,
            MENGE LIKE ANLA-MENGE,
            MEINS LIKE ANLA-MEINS,
            GSBER LIKE ANLZ-GSBER,
            KOSTL LIKE ANLZ-KOSTL,
            STORT LIKE ANLZ-STORT,
            RAUMN LIKE ANLZ-RAUMN,
            KFZKZ LIKE ANLZ-KFZKZ,
            BELNR LIKE ANEK-BELNR,
            BUDAT LIKE ANEK-BUDAT,
          pdate LIKE anek-budat,
            XBLNR LIKE ANEK-XBLNR,
            SGTXT LIKE ANEK-SGTXT,
            ANSWL LIKE ANLC-ANSWL,
            NAFAP LIKE ANLC-NAFAP,
            AAFAP LIKE ANLC-AAFAP,
            GJAHR LIKE ANEK-GJAHR,
            ANLKL LIKE ANLA-ANLKL,
            END OF IT_FINAL.
    DATA: PDATE LIKE ANEK-BUDAT.
    PDATE = SY-DATUM.
    DATA:V_LOW LIKE SY-DATUM,
        V_HIGH LIKE SY-DATUM,
        V_DATE(04) TYPE N,
        V_YEAR(04) TYPE N.
    V_YEAR = V_DATE(04).
    V_YEAR = V_YEAR - 1.
    CONCATENATE V_YEAR '0401' INTO V_LOW.
    CLEAR V_YEAR.
    V_YEAR = V_DATE(04).
    CONCATENATE V_YEAR '0331' INTO V_HIGH.
    DATA : LINE_COLOR(4) TYPE C.
    DATA : FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
           GD_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA: EVENT  TYPE SLIS_ALV_EVENT OCCURS 0 WITH HEADER LINE.
    SELECTION-SCREEN : BEGIN OF BLOCK B_FA WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_BUKRS FOR ANLA-BUKRS DEFAULT 'ML',
                     S_ANLN1 FOR ANLA-ANLN1,
                     S_ANLN2 FOR ANLA-ANLN2,
                     S_ANLKL FOR ANLA-ANLKL,
                     S_AKTIV FOR ANLA-AKTIV,
                     S_GSBER FOR ANLZ-GSBER,
                     S_KOSTL FOR ANLZ-KOSTL,
                     S_WERKS FOR ANLZ-WERKS,
                     S_STORT FOR ANLZ-STORT,
                   S_BUDAT FOR ANEK-BUDAT,
                     S_GJAHR FOR ANEK-GJAHR.
    SELECTION-SCREEN : END OF BLOCK B_FA.
    *PARAMETERS : budat LIKE anek-budat.
    SET PF-STATUS '100'.
    SELECT BUKRS ANLN1 ANLN2 AKTIV TXT50 ZUGDT MENGE MEINS ANLKL
           FROM ANLA
           INTO CORRESPONDING FIELDS OF TABLE T_ANLA
           WHERE ANLN1 IN S_ANLN1
           AND   ANLN2 IN S_ANLN2
           AND   BUKRS IN S_BUKRS
           AND   ANLKL IN S_ANLKL
           AND   AKTIV IN S_AKTIV.
    CHECK : NOT T_ANLA[] IS INITIAL.
    SELECT BUKRS ANLN1 ANLN2 GSBER KOSTL STORT RAUMN KFZKZ
           FROM ANLZ
           INTO CORRESPONDING FIELDS OF TABLE T_ANLZ
           FOR ALL ENTRIES IN T_ANLA
           WHERE ANLN1 = T_ANLA-ANLN1
           AND   ANLN2 = T_ANLA-ANLN2
           AND   BUKRS = T_ANLA-BUKRS
           AND   GSBER NOT IN S_GSBER
           AND   KOSTL IN S_KOSTL
           AND   WERKS IN S_WERKS.
    SELECT BUKRS ANLN1 ANLN2 BELNR BUDAT XBLNR SGTXT GJAHR
           FROM ANEK
           INTO CORRESPONDING FIELDS OF TABLE T_ANEK
           FOR ALL ENTRIES IN T_ANLA
           WHERE ANLN1 = T_ANLA-ANLN1
           AND   ANLN2 = T_ANLA-ANLN2
           AND   BUKRS = T_ANLA-BUKRS
           AND   BUDAT >= V_LOW
           AND   BUDAT <= V_HIGH.
          AND  gjahr IN s_gjahr. " modified for date logic by Sanjeev
    SELECT BUKRS ANLN1 ANLN2 ANSWL NAFAP AAFAP AFABE GJAHR
           FROM ANLC
           INTO CORRESPONDING FIELDS OF TABLE T_ANLC
           FOR ALL ENTRIES IN T_ANLA
           WHERE ANLN1 = T_ANLA-ANLN1
           AND   ANLN2 = T_ANLA-ANLN2
           AND   BUKRS = T_ANLA-BUKRS
           AND   AFABE = '01'.
    LOOP AT T_ANLA.
      MOVE : T_ANLA-ANLN1 TO IT_FINAL-ANLN1,
             T_ANLA-ANLN2 TO IT_FINAL-ANLN2,
             T_ANLA-AKTIV TO IT_FINAL-AKTIV,
             T_ANLA-TXT50 TO IT_FINAL-TXT50,
             T_ANLA-ZUGDT TO IT_FINAL-ZUGDT,
             T_ANLA-MENGE TO IT_FINAL-MENGE,
             T_ANLA-MEINS TO IT_FINAL-MEINS.
      READ TABLE T_ANLZ WITH KEY BUKRS = T_ANLA-BUKRS
                                 ANLN1 = T_ANLA-ANLN1
                                 ANLN2 = T_ANLA-ANLN2 BINARY SEARCH.
      IF SY-SUBRC EQ 0.
        MOVE : T_ANLZ-GSBER TO IT_FINAL-GSBER,
               T_ANLZ-KOSTL TO IT_FINAL-KOSTL,
               T_ANLZ-STORT TO IT_FINAL-STORT,
               T_ANLZ-RAUMN TO IT_FINAL-RAUMN,
               T_ANLZ-KFZKZ TO IT_FINAL-KFZKZ.
      ENDIF.
      READ TABLE T_ANLC WITH KEY BUKRS = T_ANLA-BUKRS
                                 ANLN1 = T_ANLA-ANLN1
                                 ANLN2 = T_ANLA-ANLN2 BINARY SEARCH.
      IF SY-SUBRC EQ 0.
        MOVE : T_ANLC-ANSWL TO IT_FINAL-ANSWL,
               T_ANLC-NAFAP TO IT_FINAL-NAFAP,
               T_ANLC-AAFAP TO IT_FINAL-AAFAP.
      ENDIF.
    LOOP AT T_ANEK WHERE BUKRS = T_ANLA-BUKRS AND ANLN1 = T_ANLA-ANLN1 AND
        ANLN2 = T_ANLA-ANLN2 AND   BUDAT >= V_LOW
                                 AND   BUDAT <= V_HIGH AND BUDAT IN S_BUDAT.
        MOVE : T_ANEK-BELNR TO IT_FINAL-BELNR,
               T_ANEK-BUDAT TO IT_FINAL-BUDAT,
               T_ANEK-GJAHR TO IT_FINAL-GJAHR,
               T_ANEK-XBLNR TO IT_FINAL-XBLNR,
               T_ANEK-SGTXT TO IT_FINAL-SGTXT.
        APPEND IT_FINAL.
      ENDLOOP.
    ENDLOOP.
    PERFORM BUILD_FIELDCATALOG.
    PERFORM DISPLAY_ALV_REPORT.
    PERFORM BUILD_LAYOUT.
          FORM BUILD_FIELDCATALOG                                       *
    FORM BUILD_FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'ANLN1'.
      FIELDCATALOG-SELTEXT_M = 'ASSET MAIN NO'.
      FIELDCATALOG-COL_POS   = 0.
      FIELDCATALOG-OUTPUTLEN = 14.
      FIELDCATALOG-EMPHASIZE = 'X'.
      FIELDCATALOG-KEY       = 'X'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'ANLN2'.
      FIELDCATALOG-SELTEXT_M = 'SUB NO'.
      FIELDCATALOG-COL_POS   = 1.
      FIELDCATALOG-OUTPUTLEN = 7.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'AKTIV'.
      FIELDCATALOG-SELTEXT_M = 'CAP.DATE'.
      FIELDCATALOG-COL_POS   = 2.
      FIELDCATALOG-OUTPUTLEN = 10.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'TXT50'.
      FIELDCATALOG-SELTEXT_M = 'NAME'.
      FIELDCATALOG-COL_POS   = 3.
      FIELDCATALOG-OUTPUTLEN = 50.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'ZUGDT'.
      FIELDCATALOG-SELTEXT_M = 'POSTING DATE'.
      FIELDCATALOG-COL_POS   = 4.
      FIELDCATALOG-OUTPUTLEN = 10.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'MENGE'.
      FIELDCATALOG-SELTEXT_M = 'QTY'.
      FIELDCATALOG-COL_POS   = 5.
      FIELDCATALOG-OUTPUTLEN = 13.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'MEINS'.
      FIELDCATALOG-SELTEXT_M = 'UNITS'.
      FIELDCATALOG-COL_POS   = 6.
      FIELDCATALOG-OUTPUTLEN = 3.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'GSBER'.
      FIELDCATALOG-SELTEXT_M = 'BA'.
      FIELDCATALOG-COL_POS   = 7.
      FIELDCATALOG-OUTPUTLEN = 4.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'KOSTL'.
      FIELDCATALOG-SELTEXT_M = 'COST CENTER'.
      FIELDCATALOG-COL_POS   = 8.
      FIELDCATALOG-OUTPUTLEN = 13.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'STORT'.
      FIELDCATALOG-SELTEXT_M = 'LOCATION'.
      FIELDCATALOG-COL_POS   = 9.
      FIELDCATALOG-OUTPUTLEN = 10.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'RAUMN'.
      FIELDCATALOG-SELTEXT_M = 'ROOM'.
      FIELDCATALOG-COL_POS   = 10.
      FIELDCATALOG-OUTPUTLEN = 10.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'KFZKZ'.
      FIELDCATALOG-SELTEXT_M = 'LICENSE PLATE NO'.
      FIELDCATALOG-COL_POS   = 11.
      FIELDCATALOG-OUTPUTLEN = 20.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'BELNR'.
      FIELDCATALOG-SELTEXT_M = 'DOC NO'.
      FIELDCATALOG-COL_POS   = 12.
      FIELDCATALOG-OUTPUTLEN = 13.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'BUDAT'.
      FIELDCATALOG-SELTEXT_M = 'POSTING DATE'.
      FIELDCATALOG-COL_POS   = 13.
      FIELDCATALOG-OUTPUTLEN = 15.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'XBLNR'.
      FIELDCATALOG-SELTEXT_M = 'REF NO'.
      FIELDCATALOG-COL_POS   = 14.
      FIELDCATALOG-OUTPUTLEN = 25.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'SGTXT'.
      FIELDCATALOG-SELTEXT_M = 'TEXT'.
      FIELDCATALOG-COL_POS   = 15.
      FIELDCATALOG-OUTPUTLEN = 50.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'ANSWL'.
      FIELDCATALOG-SELTEXT_M = 'ACQ VAL'.
      FIELDCATALOG-COL_POS   = 16.
      FIELDCATALOG-OUTPUTLEN = 13.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'NAFAP'.
      FIELDCATALOG-SELTEXT_M = 'ORD.DEP'.
      FIELDCATALOG-COL_POS   = 17.
      FIELDCATALOG-OUTPUTLEN = 13.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME = 'AAFAP'.
      FIELDCATALOG-SELTEXT_M = 'UNPLAN DEP'.
      FIELDCATALOG-COL_POS   = 18.
      FIELDCATALOG-OUTPUTLEN = 13.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR FIELDCATALOG.
    ENDFORM.
    PERFORM ALVDISPLAY.
    FORM ALVDISPLAY.
    EVENT-FORM = 'USERCOMMAND'(002).
    EVENT-NAME = 'USER_COMMAND'(001).
    APPEND EVENT.
    ENDFORM.
    FORM DOWNLOADEXCEL.
    DATA : B_FILE1 LIKE RLGRAP-FILENAME.
    ENDFORM.
          FORM BUILD_LAYOUT                                             *
    FORM BUILD_LAYOUT.
      GD_LAYOUT-ZEBRA = 'X'.
      GD_LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
    ENDFORM.
          FORM DISPLAY_ALV_REPORT                                       *
    FORM DISPLAY_ALV_REPORT.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            I_INTERFACE_CHECK        = ' '
             I_CALLBACK_PROGRAM       = SY-REPID
            i_callback_pf_status_set = 100
            i_callback_user_command  = sy-ucomm
            I_STRUCTURE_NAME         =
             IS_LAYOUT                = GD_LAYOUT
               IT_FIELDCAT              = FIELDCATALOG[]
            IT_EXCLUDING             =
            IT_SPECIAL_GROUPS        =
            IT_SORT                  =
            IT_FILTER                =
            IS_SEL_HIDE              =
            I_DEFAULT                = 'X'
            I_SAVE                   = ' '
            IS_VARIANT               = ' '
            IT_EVENTS                =
            IT_EVENT_EXIT            = EVENT[]
            IS_PRINT                 =
            I_SCREEN_START_COLUMN    = 0
            I_SCREEN_START_LINE      = 0
            I_SCREEN_END_COLUMN      = 0
            I_SCREEN_END_LINE        = 0
       IMPORTING
            E_EXIT_CAUSED_BY_CALLER  =
            ES_EXIT_CAUSED_BY_USER   =
           TABLES
                T_OUTTAB                 = IT_FINAL
           EXCEPTIONS
                PROGRAM_ERROR            = 1
                OTHERS                   = 2.
    ENDFORM.
    Hi,
    we encourage open discussion and no emails, as the answer to your question shall be posted in the forum to be read by other users, who might be interested in it as well.
    Mario

    hi,
    i've tried to correct your code:
    -> v_year, v_low and v_high was not filled
    ...SELECTION-SCREEN : END OF BLOCK b_fa.
    PARAMETERS p_year LIKE anlc-gjahr DEFAULT sy-datum(4).
    *PARAMETERS : budat LIKE anek-budat.
    SET PF-STATUS '100'.
    v_year = p_year.
    v_year = v_year - 1.
    CONCATENATE v_year '0401' INTO v_low.
    CLEAR v_year.
    v_year = p_year.
    CONCATENATE v_year '0331' INTO v_high.
    SELECT bukrs anln1 anln2 aktiv txt50 zugdt menge meins anlkl
    FROM anla
    pls reward useful answers
    thx.
    Andreas

  • Invoice problem. Fiscal Year

    Hello,
    When a case lasts between two fiscal years (It begins before April 30th and ends after May 1st), It is generated two invoices: one dated on April 30th with the services provided until that day and another for the new fiscal year. We need to have only one invoice per case. We seached on the billing parameters and on the Customizing and can't find where to define this.

    Hi, Thanks for your help.
    My coworker found the solution. In order to have only one invoice per case, you have to go to customizing to Set billing parameters in Patient Accounting -> Billing and dismark the checks in Period Split and Revenue Assignment.

  • Urgent!Fiscal Year Changes !

    Hi All
    Does anyone has implemented the changes for the Fiscal Year from Calendar Year Jan-Dec 2011 to Apr 2011 - Mar 2011
    So in my case now I need to show the reports for 2011 as Jan 2011 - Mar 2012.
    for 2012, Apr 2012- Mar 2013.
    Any ideas are highly appreciable. very urgent.
    so how my month and year report retrival changes... to be done?
    what are the precautions?
    Thanks for your suggestions.

    Hi,
    I do not know about the fiscal year variant way as it means you would need to customize and I am not sure if its possible to do what you want but since I am not an expert on that matter please rely on other posters.
    Regarding the ABAP way:
    1) create a variable on 0FISCYEAR that the user needs to fill, for example ZVAR_FISCYEAR. Use it in query but not on relevant keyfigures. It needs to pop up on selection screen but should restrict some dummy.
    2) create a variable on 0CALMONTH that is processed by user exit, for example ZVAR_CALMONTH. Make sure it is an interval
    3) go to the user exit relevant for bex reporting (please do investigate yourself also as this is covered in lots of topics)
    4) create logic that whenever user fills in 2011 in ZVAR_FISCYEAR the ZVAR_CALMONTH variable is filled as needed
    Small example:
      WHEN 'ZVAR_CALMONTH'.
        IF i_step = 2.
          LOOP AT i_t_var_range INTO loc_var_range
            WHERE vnam = 'ZVAR_FISCYEAR'.
            CLEAR l_s_range.
            l_s_range-low(4)   = loc_var_range-low(4).
    IF l_s_range-low(4) = '2011'.
            l_s_range-low+4(2)  = '01'.
            l_s_range-high(4) = '2012'.
            l_s_range-low+4(2)  = '05'.
    ELSEIF
    l_s_range-low(4) = '2012'.
            l_s_range-low+4(2)  = '04'.
            l_s_range-high(4) = '2013'.
            l_s_range-low+4(2)  = '03'.
    ENDIF.
            l_s_range-sign     = 'I'.
            l_s_range-opt      = 'BT'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.
    5) restrict the relevant keyfigures in your query on 0CALMONTH with as range ZVAR_CALMONTH
    Please not I am not an diehard abapper nor do i have access to a system to test now so please share thoughts if the above is incorrect, usually i need one or two fixes before it works
    hope it at least gave you the right direction.
    C.

  • Fiscal year varient ecc 6.0

    Hi Gurus
    I  created  one fiscal year varient  ecc .6.0 ,(24 period , april to march)  i can't save  that  varient . i got some information    gap in financial year varient period ZZ
    thanks
    bala

    New G/L is having extended facility comparing to classic G/L. Classic G/L is supported by Sap Table GLT0 whereas New G/L is supported by SAP Table FAGLFLEXT.
    Addl. fields like cost center, Profit center, segment will be available in this table which is not there in OLD table. If it is a new implementation you need not activate New G/L. With all new installation New G/L is activated with the standard SAP.
    New GL concept is used normally in the following situations:
    1. An organization has units in more than one country and has separate currencies and need to maintain separate ledgers.
    2. Different financial years are required for legal requirement. For ex: for the companies act Jan to December and for Income tax act April to March
    3. To Maintain US GAAP or any other GAAP requirements.
    Example:
    Letu2019s assume that your company is in INDIA and US. Your parent company is US which follows FY K4 and Your Indian Company has to submit the balance sheets as per FY V3. Also Indian companies follows Indian GAAP and US company USGAAP.
    Letu2019s assume that there are some accounting differences between these two and the values differ at the time of posting. In such a case you create US company as a Leading ledger with FY variant K4 and Indian company with V3.
    When you are posting transactions which are independent of ledgers the system will post to all the ledgers by default. When you want to post transactions to only effecting Indian GAAP then the Ledger Groups Come in to the picture and you will post to the ledger groups by using FB01L or FB50L. These two transactions will give you the flexibility of posting to selected ledgers.
    In multi ledger environment you use FAGLB03 instead of FS10N and FAGLL03 instead of FBL3N. You can have only one leading ledger and all other are non leading ledgers. You can maintain as many ledgers as you need with different currencies, different fiscal year variants. In classic GL environment you need to configure this by using special purpose ledger and derive your reports. Important concepts in NEW G/L are
    1. Parallel Accounting
    2.Document Splitting     
    3.Integartion

Maybe you are looking for