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.

Similar Messages

  • 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 ..

  • Any function module for getting fiscal year week numbers

    can any one provide me function module for getting fiscal year week numbers ? if no function module please let me know work around.
    Thanks!
    Lakshmikandh

    hi,
    Use FM <b>'DATE_GET_WEEK'</b>...
    parameter D1 LIKE SCAL-DATE.
    Data w like scal-week.
    CALL FUNCTION <b>'DATE_GET_WEEK'</b>
    EXPORTING
    date = D1
    IMPORTING
    WEEK = W
    EXCEPTIONS
    DATE_INVALID = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    write W+4(2).
    Regards,
    Santosh

  • S_P00_07000134 Withholding Generic Report for Fiscal year 2009

    Hi All,
    I was executing S_P00_07000134 Withholding Generic Report for Fiscal year 2009 but when the output came in the output I can see the year 2008 instead of 2009. So hown can I bring 2009 in my report.
    IS there any SAP not whic needsto be applied.
    REgards,
    Kiran C

    Dear,
    What is the reporting period that you have given in this report, try to give 01.01.2009-31.12.2009 if it is a calendar year or as per your fiscal year give the period.

  • POS data variation in bw report for fiscal year

    HI ,
    I got issue from User like ,In a BW report I have given sold to party as best buy with actual sel though and fiscal year form 2006 to 2008.I got some values with factory week 14/2009 for it.But when i selected fiscal year 2007 to 2008 i got some other value for factory week 14/2007 which is not matching with previous value when i drilled down fro Fiscal year 2006 to 2008.Please tell me hwo to proceed wiht this issue .

    If I would come across this problem, I would perform following checks.
    - Run Query for 2006 - 2007 (Check and note down the value for 14/2007)
    - Run Query for 2007 - 2008 (Check and note down the value for 14/2007).
    MAKE SURE THAT YOU HAVE USED SAME SELECTION CRITERIA OTHER THAN YEAR.
    Then check your cube data, put the same selection in the cube and check the data for the week 14/2007 and see which value of the above two noted value is correct.
    You may also want to check if there is any other restriction based on year selection in the query. If any KFs are restricted by some more values based on the fiscalyear selection.
    - Danny

  • Bex Report for Fiscal year

    I have requirement like as below
    In my report selection screen there will be a variable for fiscal year variable is user input.
    in report column there is one KF that is a amount field.
    if user give some value range in the variable like 2005001 to 2005003
    he want to see the amount value for year to date
    like
                   2005001     2005002     2005003
                   1000.00     200.00     300.00
                   300     400     400
    if any one knows please glide me the steps
    how to display year to date value for each fiscal period as per user input in the variable selection.
    Thanks
    samit

    Hi,
    1) You will create a customer exist varible for FYP.
    2) You will also have a user entry varible for FYP to allow the user to enter his values for YTD.
    3) Write a code in CMOD for the customer exist YTD varible.
      if i_step = 2.
          read table i_t_var_range into loc_var_range with key vnam =  'user entry variable.
          year = loc_var_range-low+0(4) .
          period = loc_var_range-low+4(3).
          concatenate year 001 into l_s_range-low .
          concatenate year period into l_s_range-high .
          l_s_range-sign   = 'I'.
          l_s_range-opt    = 'BT'.
          append l_s_range to e_t_range.

  • Function module to get Fiscal year/week

    Hi,
    I searched SAP forum but could not find specific answer to this question.
    I want to find Fiscal year week (YYYYWW) for a date using Fiscal year variant.
    Can you suggest some function module/method to get the info?
    E.g., if todays date is 06/23/2010
    then Fiscal year week should be 201034. (Depending on Fiscal year variant XX)
    Calendar year week is 201025.
    Thanks,
    Chirag

    >
    Chirag Mistry wrote:
    > C'on guys, help me out!
    That's what the other's have been doing all along!
    AT some point, you have to take responsibility yourself. The forum isn't here to provide people with complete packaged solutions. You have to do some work yourself.
    You either have the fiscal year variant in your system as Brad has suggested, or you will have to develop some logic to figure out what week you are in based on the start date of your fiscal year and the date you are interested in.
    Rob

  • 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

  • Fiscal year change not yet made for company 1234

    While executing the T-code S_ALR_87011963 (Asset balances report) reporting year : 31.12.2009, am
    getting the below error u201CFiscal year change not yet made for company
    code 1234u201D
    1)      In T-code OAAQ, For company code 1234 closed fiscal year is 2008.
    2)      Thru F-90, I can post the acquisitions in year 2009.
    3)      Fiscal year 2009 is already opened, while running the reports why
    this error message is showing u201CFiscal year change not yet made for
    company code 1234u201D
    4)      I have to get the reports for closed fiscal years, am not getting
    any reports for fiscal years 2006,2007,2008.
    Please post your comments.
    Thanks,
    vinay

    Hi,
    Please give me below mentioned details.
    1) What is the year showing in OAAQ ?
    2) Which year you have opened in AJRW ?
    Best Regards,
    Madhu

  • 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

  • 0 fiscper3 (posting period)and 0fiscyear (fiscal year) in bw report

    Hi I need a quick help, please resolve my issue in step by step. Report is required to display the 0 fiscper3 (posting period)and 0fiscyear (fiscal year) in bw report. I have a 0fiscper Fiscal Yr / Period in my datasource and infosource but not 0fiscper3 (posting period)and 0fiscyear (fiscal year). Can any body help me how to add the abap code to convert the 0fiscper Fiscal Yr / Period to display 0fiscper3 (posting period)and 0fiscyear (fiscal year in report or how to add by abap code 0fiscper3 (posting period)and 0fiscyear (fiscal year)in datasource. User will select the value of 0FISCYEAR
    Fiscal year during the execution of report. please help
    will reward all points.
    thanks
    soniya kapoor

    In de update rules from infosource to datatarget you fill the rules like this:
    For 0FISCYEAR:
      result = comm_structure-fiscper(4).
    For 0FISPER3
      result = comm_structure-fiscper+4(3).
    Note that this can also be done by using formula's. If you can't ABAP you may prefer to use formula's.

  • BI Reporting: LO & FI environment differences? Role of Fiscal Year Variant

    Hi,
    I will soon be on a project as a Reporting BI Consultant in the Finance environment. A first, but I have worked as a SAP BI Reporting person in SD environment in the past.
    1. What should I expect to be different reporting for FI compared to LO?
    2. In particular, I have some questions about fiscal year variant after reviewing the many documents on this site.
    Let's say k4 is the fiscal year variant and my understanding is that it can be a calenda dependant fiscal year variant, meaning that postings on R3/ECC are stored by months from Jan to Dec[ Is this a true statement about the storage of data? ]
    i.   Now, if this is the case,about data storage, then how is k4 used in reports?
    ii.  If k4 is stored in months then what if the data is needed per weeks, or per days on reports?
    iii. On the same report can there also be another fiscal year variant k5? Any real life examples to clarify it?
    3. What are the challenges I should expect in reporting for finance i.e. as an SAP BI Reporting Consultant?
    Thanks

    A. Aging like how many days Account Receivable been outstanding.. report like 0 - 30Days, 31 - 60Days and 61 - 90Days and so on.
    B. Everything like fisc* depends on variant and everyting 0cal* depends on normal calendar. A record can't have more than one fiscal variant. Like I mentioned to you, a company code may use one of the variants they are allowed to use and everything is based on that. I am not sure I answered your querstion.
    C. Let's assume 05/30/2011 is the calendar day and K1 variant is Jan - Dec, so the 0fiscper = 005/2011 0fiscyear = 2011 and 0fiscper3 = 05 and if the variant is K2 which is July - June then 0fiscper = 011/2011 and 0fiscyear = 2011 and 0fiscper3 = 11. in your report you have to give users variant selection as mandatory variable to get appropriate result.
    2i. like I mentioned above, based on the variant selection, the report displays the correct value.
    2ii. Just like any other data aggregation, if you data is stored by period and they want to drilldown by week, then you need to store your data at detail level. That is why aggregation is very important.
    2iii. Like is is explained above, a company can use only one variant, if you want to get data for Z1 countries, then in the variable selection they pass K1 and likewise for K2. The challenge here is if you want to display both K1 and K2, this is real challeng for global reporting. In this case you have to convert the K2 to K1 in transformation so that you can use one variant for both countries. That way both K1 and K2 coutries for the same fiscal variant will be displayed.
    thanks.
    Wond

  • Shortened Fiscal Year and its impact on BI back end and Bex reports

    Hi All,
    Our client is making some changes to the fiscal year period.
    Becuase of some business requirements, we will have to shortened the fiscal year.
    Can you please suggest - what are the watch points when we do this?
                                            - what will be the impact to BI back end and Bex reports?
    Thanks,
    Nisha

    Hello Nisha,
    Since the fiscal year (Infobjects - 0FISCYEAR and/ 0FISCPER3) is compounded with fiscal year variant, therefore maintaining the correct variant in BI will automatically take care of showing the data correctly.
    So there are two things to be maintained in BI:
    1) To see that the variant definition.
    2) If you need to display the text of the fiscal periods, then the correct texts.
    Let me know if you need more clarifications.
    Regards,
    Shweta
    Edited by: Shweta Kesarwani on Jan 8, 2010 11:10 AM

  • Vendor Ageing Analysis Report for the postings for this fiscal year

    Hi All,
    I require report that lists every supplier that my company has spent money in this fiscal year, need the actual average payment terms, number of days etc. And also how much has been spent with each supplier.
    Kindly let me know the report or the process to extract this data from SAP R/3 system.

    Regarding Ageing analysis of Vendor below three reports may meet your requirements provided transactions to the vendors are done in disciplined manner.
    S_ALR_87012078 - Due Date Analysis for Open Items
    S_ALR_87012084 - Open Items - Vendor Due Date Forecast
    S_ALR_87012085 - Vendor Payment History with OI Sorted List
    Regards,
    Alok

  • 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

Maybe you are looking for