ALV Report to check upto current fiscal year

Hi All,
I am running a reoprt. its output is in this way.
Division                Fiscal year                                  Net Price.
Chemical              2006                                              3456456
                            2007                                             5456436
                           2008                                                  45345
                           2009                                                   4545
                           2010                                                     45456
                          Over Due
                           Due
                            0 to 30 days
                          and so on
Now My problem here is I have this secctionof cede it should increase my fiscal year, But I checked it in the run time its not stopping at the S-fkdat-high, ( I mean in the current fiscal year.). Here also I am posting the section of code.
Can any body identitfy where my code is wrong, and why its not stopping at the currennt fiscall year.
S_FKDAT = S_FKDAT-LOW+0(04).
APPEND S_FKDAT.
DO.
IF NOT S_FKDAT IS INITIAL.
S_FKDAT = S_FKDAT + 1.
APPEND S_FKDAT.
CHECK
S_FKDAT = S_FKDAT-HIGH+0(04).
STOP.
APPEND S_FKDAT.
ENDIF.
ENDDO.
Thanks in Advance
Edited by: Ravi Narayan Padhi on Oct 14, 2010 3:09 PM

HI,
iam not getting wat ur try to do here in this logic can u elaborate the logic
As per my understanding ur requirement logic should  be -->
if not S_FKDAT[] IS INITIAL.
  read table S_FKDAT index 1.
    while S_FKDAT-low ne sy-datum+0(4).
         S_FKDAT-option = 'I'
         S_FKDAT-sign = 'EQ'
         S_FKDAT-low = S_FKDAT-low + 1
         APPEND S_FKDAT.
    endwhile.
endif.
Regards,
Madhukar Shetty

Similar Messages

  • I would like to display current fiscal year always on variable screen

    Hi
    I have requirement in which I would like to display the current fiscal year on variable screen in BI Report.
    we have a standard variable however the sap exit to display the current fiscal year is not shown...
    Can any one tell me, how to proceed in this case.
    Thanks
    Chetan

    Hello,
    For I-step = 1, use the function module DATE_TO_PERIOD_CONVERT.
    here for IMPORT use i_date = sy-datum and i_periv = ur fiscal variant.
    The output is e_buper contains fiscal period and e_gjhar contains fiscal year.
    The use concatenate to join fiscal year and fiscal period to the variable low value.
    Regards,
    Shashank

  • Report ... conversion for fiscal year representation

    have a report which prints the actuals for a fiscal year . Its like each country has their own fiscal year representation , The report is currently printing the data based on its own fiscal year representation , i have to modify the report and want it to print based on US(sep-aug) fiscal representation .. like for example for india its printing with may as fiscal period 1 , instead i want to print it with may data as fiscal period 9 and to print the data from sep-aug for all countries. I dont understand how to give the select statement and how to proceed with this. I appreciate if anyone can help me with this.
    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.

    someone please help me with this ..

  • To post write up in the current fiscal year

    Hi,
    I am trying to post write up in the current fiscal. However, the system is not allowed to post me. I know that the write-up needs to be posted from the next fiscal year. However, due to the requirement, we need to post in this current and switch off the message.  I have already switched off the message in OBA5, but still, I cannot proceed to post with write-up in the current year. Is there a way that I can post this.
    The following are the error details.
    You cannot post write-ups
    Message no. AA400
    Diagnosis
    According to the transaction type, you have to post to area 01. However, in this area, there is either no accumulated depreciation or the write-up depreciation type(s) are not managed in this area.
    Procedure
    Check the transaction type.
    Regards,
    Ravi

    Hi Ravi,
    A write up can only be carried out if you have cumulated depreciation   values (from previous years). In the current fiscal year depreciation  should be posted the 'normal' way. Write ups mean that too much  depreciation was posted in a previous year and that you will correct  this in the current year. Therefore, the system does not allow posting write ups if there exist no cumulative depreciation values from   previous year. In other words you cannot perform a write up  for an asset in the year of acquisition.                                                                               
    Also make sure that the depreciation area(s) is defined as such to  manage cumulative depreciation type or write-up depreciation type. This  should eliminate the error 'AA400'.                                                                               
    Following is the menu path to take:                                       
    CU: FI-AA
         -> Transactions                     
         - > Define Transaction Types for                                           
             - > post-capitalization (trans. AO77 and OAXD)                          
              -> manual depreciation (trans. AO78 and OAXE)                          
    For both,- select your Chart of Depr.                                      
             - >select your Transaction Type                                    
             -> select Depr. Area Specs.                                        
    Regards Bernhard
    Edited by: Bernhard Kirchner on May 10, 2010 3:00 PM

  • How to design extractor can have only current Fiscal Year data.

    Dear Experts,
    I require a full upload DSO , which can have only current fiscal year data . I have created view putting there certain conditions for minimising the data size. How i can restrict it , to have only current fisacal year data for YTD reports. It would be daily uploaded.
    Should i created Data Source based on function ?
    Regards,
    Anand Mehrotra.

    while extracting the data from source you can set the filters at the info package level so that it will not extract the previous years data.
    In the data selection tab in Info package enter the current fiscal year and schedule the IP it will extract only the current year data.
    next execute the DTP to load data till DSO.
    the data is restricted in the infopackage level before entering to PSA so there is no need to write any routines in the DSO level.
    Edited by: prashanthk on Feb 1, 2011 12:45 PM

  • Year To Date for Current Fiscal Year

    Hi All,
    I have installed BC variable Year To Date for Current Fiscal Year 0I_CFYTD..
    foloowing error occurs
    Variable 0I_CFYTD could not be replaced..
    Do i need to write any code or Please help.....

    Hi,
    Please check if fiscal year variant is used in the filter. Else the BC variable throws an error. Drag fiscal year variant to the filter area and set a value or variable input for the same.
    Regards,
    Satya

  • System fiscal year in co code does not match current fiscal year.

    Hi
    I have seen this problem.I  did run some closing steps and this error gone . Can some one please explain some logic behind this error ? Because I am sure i have not done any specific transaction to match the system fiscal year and current fiscal year then how this error gone away ?
    I have checked the other posts on this forum related to this error but still feel to ask for clarity of concept.
    Thanks in advance
    Satya

    Hi Satya,
    Ex:
    FY is 2011 ( for US)
    compny code FY may / may not same as system FY.
    for Business adjust ment / Financial Adjustments client not close previous FY.
    now if you check your system, Comp Code FY is 2010 & System FY is 2011.
    Company Code Closing FY T.Code: OAAQ
    Tables need to chek for conformation year end activities done/not: TABA, T093B, T093C
    Regards,
    Viswa

  • What varaible is best to use for current fiscal year.

    Hello all,
    I have few restricted key figures which need to be reported as "for current fiscal year" so which ios the best variable we can use for that.In the filter area I have fiscal year variant and comp code do I have to give users the input ready for fiscal year?
    Also then i need comparison between current and previous year for same RKF so I plan to offset the varaible by "-1" .
    Thanks

    It works for me Bhanu. Last I used that it gave me errors so was not sure.
    for YTD i dont see any variable in fiscal year am I looking at wrong place.
    can you suggest something
    Thanks

  • Current fiscal year and previous fiscal year restriction in Query  Customer

    Hi ,
    My requirment is disply current year qtrs and previous year qtrs in the report . User will not enter year , date , month or qtr . system should calucualte and disply curremt year qtrs and previous year qtrs .
    I have created ZFISCYEAR reference of a 0FISYEAR year . now I would like to write customer exit for Current fiscal year and previous fiscal year to display current year qtrs and previous year qtrs.
    Could you please provide customer exit code if you have or recomend if you know any other options.
    Appriciate you help
    Thanks

    hi try this
    take into account that I don't know th periv you use could be K4 or one defined by you so I have commented it.
    The coding here is for the current fiscal period for the previous year just to another l_year varibale and populate with offset for instance l_year = l_year - 1.
    so for current year
    WHEN 'CURRPERIOD'.
        current_date = sy-datum.
        CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
          EXPORTING
            i_date  = current_date
        '    i_periv = ''
          IMPORTING
         '   e_buper = l_period.
            e_gjahr = l_year.
        l_s_range-low = l_year.
        l_s_range-sign = 'I'.
        l_s_range-opt = 'EQ'.
        APPEND l_s_range TO e_t_range.
    for previous period
    WHEN 'PREVPERIOD'.
        current_date = sy-datum.
        CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
          EXPORTING
            i_date  = current_date
        '    i_periv = ''
          IMPORTING
         '   e_buper = l_period.
            e_gjahr = l_year.
        l_year = l_year - 1.
        l_s_range-low = l_year.
        l_s_range-sign = 'I'.
        l_s_range-opt = 'EQ'.
        APPEND l_s_range TO e_t_range.
    bye
    Boujema

  • Capturing previous year invoice document in current fiscal year

    Dear All,
    One of my client requirement is that have posted invoice in previous year and they are making payment in current fiscal year, this scenario they want to capture in payment advice. When am checking all the table with the input as payment document number and fcleared fiscal year system not showing the invoice reference against which it is cleard. For current year cleared documents we can extract the invoice reference where as for previous year system not picking that invoice number.
    Have checked in all the table entries, kindly suggest me is there any other alternative way to do this...
    Regards,
    Balaji.c

    Dear All,
    The problem is resolved since by giving the input as previous fiscal year and then system able to show the invoice number even if its cleared in current year. Invoice belongs to preious year and cleared documen in current year in that case we have to give the input parameter as previous fiscal year against that document number.
    Thanks for all the inputs.
    Regards,
    Balaji.c

  • Reversal of Last Fiscal year asset in current fiscal year

    Dear SAP experts
    Asset has been booked in last fiscal year (jan2006) depreciation also posted till this fiscal year last month (2007 June)
    Asset value-70000 (invoice value)
    Accumulated Depreciation-33753.42
    Asset net book value as on date- 36246.58
    With same information one more asset also booked by mistake, so my client want to reverse any one of them asset with depreciation (which has booked in last fiscal year)
    I tried with asset credit memo (T code ABGF); it is picking up only asset net book value (36246.58) not accumulated depreciation (which is already affected in Accumulated GL account).
    Can you tell me is there any way to solve this problem

    Hi Chaitanya,
    If you have already acquired and depriciated the asset in previous fiscal year and closed the books and published the results why do you want to reverse it now. from accounting point of view also how would you show the entry for reversal of depriciation.
    Any how the acqusition and depriciation posted in previous fiscal year can not be reversed in current fiscal year it can be reversed only in previous fiscal year. as per SAP standards you can write up the asset if you have wrongly depricaiated the asset.
    Or else you can retire the asset with revenue which will give the same financial impact as you are expecting.
    Thanks & Regards
    Sree

  • Asset write off in the current fiscal year.

    Hi Experts,
    I want to write off an asset in next 4 periods of the current fiscal year 2007. For example:
    Asset 11000
    APC value: 10000
    APC Date: 01.01.2005
    The useful life will end in fiscal year 2008.
    The book value left at the begining of the current fiscal year 2007 Rs. 4000.00
    In the current fiscal year this asset has already been depreciated for previuos 3 periods.
    Now Business wants to write off ( fully depreciated ) this asset in next 4 periods equally and then if the book value and tax value is nil, they want to scap the asset.
    Now can you please tell me how to make this happened. Its very urgent. If you need any more information, most welcome.
    Rgds,
    BABA

    Hi,
        You would have to set the asset to manual depreciation(Depr.Key MANU)
    and generate a posting via ABMA for each of the periods.
    Kind regards

  • Function module to read customer balances for current fiscal year.

    Hi,
    Could anyone please tell me about the function module which would display the customer credit balances from the FD10n transaction code for teh current fiscal year. that means from july 2010 to july 2011.

    Hi,
    use the BAPI 'BAPI_AR_ACC_GETCURRENTBALANCE'
      CALL FUNCTION 'BAPI_AR_ACC_GETCURRENTBALANCE' "Closing balance of customer account in current fiscal year
      EXPORTING
        companycode =               " bapi3007_1-comp_code  Company code
        customer =                  " bapi3007_1-customer  Customer
      IMPORTING
        actual_balance =            " bapi3007_9    Carry forward balance and balance
        return =                    " bapireturn    Return Code
        .  "  BAPI_AR_ACC_GETCURRENTBALANCE
    This method provides a customer's balance for the current fiscal year.
    It displays both the balance of standard transactions and the total balance of standard transactions and all special general ledger transactions.
    Read the Documentation of the BAPI.
    Regards,
    Dhina..

  • Variable to display data from Current Fiscal Year to the MONTH entered

    Hi Friends,
    In the Quey Designer I require a CHARACTERISTIC VARIABLE for the 0CALMONTH which should have the following features:-
    1.Input Month(e.g JUN 2008)
    2.Mandatory
    3.Ready for Input
    The query should show the following OUTPUT:-
    The data should be displayed from the CURRENT FISCAL YEAR to the value of the Input MONTH entered.
         e.g For Input  =  DEC2008
               Output = from APRIL 2008 to DEC2008.
    Do we have a standard variable for this or we have to go for a Customer Exit??
    Thanks in Advance!!!
    Vivek

    Hi,
    Create a customer exit as follows.
    WHEN 'ZCMTD'.
    you variable name
    data: ZCMTD_LOW like sy-datum.
    ZCMTD_LOW = sy-datum.
    ZCMTD_LOW+4(2) = '04'.
    *replacing last two symbols (month) in the current month with '04'
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = ZCMTD_LOW.
    *initializing low interval limit
    L_S_RANGE-HIGH = SY-DATUM.
    *initializing high interval limit
    L_S_RANGE-SIGN = 'I'.
    *defining interval as inclusive
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDCASE.
    Thanks,
    Ashok

  • Current Fiscal Year

    Hi,
    Is there an oracle function that returns the current fiscal year in format (2012/2013)?
    Thanks

    Hi,
    sliderrules wrote:
    Is there an oracle function that returns the current fiscal year in format (2012/2013)?That depends on what you mean by fiscal year.
    If a fiscal year begins on April 1 of every calendar year, then
    ADD_MONTHS ( TRUNC ( ADD_MONTHS (d, -3)
                      , 'YEAR'
            , 3
            )is the beginning of the fiscal year that contains DATE d. The "magic number" 3 reflects the fact that the fiscal year starts 3 months after the calendar year.
    If you want a string like '2012/2013' that shows the calendar years when the fiscal year begins/ends, then use the expression above to get the beginning date, use EXTRACT to get the year as a number, and then add 1 to it.
    If you're just interested in the year number, as in your message, then you don't need the outer ADD_MONTHS or TRUNC; you can just EXTRACT the year from <tt>ADD_MONTHS (d, -3)</tt>
    You might consider a user-defined function for this. It will be slower than doing it in pure SQL, but it will be a lot more convenient. You don't have to use the function in situations where performance is an issue.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}
    Edited by: Frank Kulash on Mar 14, 2013 11:30 AM

Maybe you are looking for