<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Fiscal year in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year/m-p/4082968#M976265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is when the fiscal period and fiscal year is given in the selection screen,then in the o/p the dates corresponding to the periods given in the selection screen has to be displayed.for our customer the fiscal year starts from october and ends at september.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month 1 in the year 2008 corresponds to month 10 in 2007.&lt;/P&gt;&lt;P&gt;month 2 in the year 2008 corresponds to month 11 in 2007 and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the o/p it should be displayed as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2008-1    2008-2   2008-3............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2008-1 should have dates in october 2007&lt;/P&gt;&lt;P&gt;2008-2 should have dates in november 2007.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I convert the periods given in the selection screen to dates and display them as shown above in the o/p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest a proper solution for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hema&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jul 2008 04:54:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-08T04:54:04Z</dc:date>
    <item>
      <title>Fiscal year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year/m-p/4082968#M976265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is when the fiscal period and fiscal year is given in the selection screen,then in the o/p the dates corresponding to the periods given in the selection screen has to be displayed.for our customer the fiscal year starts from october and ends at september.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month 1 in the year 2008 corresponds to month 10 in 2007.&lt;/P&gt;&lt;P&gt;month 2 in the year 2008 corresponds to month 11 in 2007 and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the o/p it should be displayed as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2008-1    2008-2   2008-3............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2008-1 should have dates in october 2007&lt;/P&gt;&lt;P&gt;2008-2 should have dates in november 2007.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I convert the periods given in the selection screen to dates and display them as shown above in the o/p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest a proper solution for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hema&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 04:54:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year/m-p/4082968#M976265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T04:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year/m-p/4082969#M976266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;GJAHR &amp;amp; MONAT are the fields you will find in SAP database tables.Data fetch &amp;amp; processing are based on the format it is stored in DB. But in your display report, have to hard code or create a custom table for your format of Oct = 01, Nov  02 etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the hint is usefulu2026 Say thanks by rewardu2026.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prabhu Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 05:05:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year/m-p/4082969#M976266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T05:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year/m-p/4082970#M976267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Supriya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; this might help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  CONVERSION_EXIT_PDATE_INPUT Conversion Exit for Domain GBDAT: DD/MM/YYYY -&amp;gt; YYYYMMDD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  CONVERSION_EXIT_IDATE_INPUT External date INPUT conversion exit (e.g. 01JAN1994)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  CONVERSION_EXIT_SDATE_INPUT External date (e.g. 01.JAN.1994) INPUT conversion exit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  CONVERT_DATE_INPUT Conversion of a date from external to internal format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  CONVERSION_EXIT_PDATE_OUTPUT Conversion Exit for Domain GBDAT: YYYYMMDD -&amp;gt; DD/MM/YYYY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  CONVERSION_EXIT_IDATE_OUTPUT External date OUTPUT conversion exit (e.g. 01JAN1994)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  CONVERSION_EXIT_LDATE_OUTPUT Internal date OUTPUT conversion exit (e.g. YYYYMMDD)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  CONVERSION_EXIT_SDATE_OUTPUT Internal date OUTPUT conversion exit (e.g. YYYYMMDD)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  CALCULATE_DATE : Calculates the future date based on the input .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  DATE_TO_DAY : Returns the Day for the entered date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  DATE_COMPUTE_DAY : Returns weekday for a date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  DATE_GET_WEEK : Returns week for a date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  RP_CALC_DATE_IN_INTERVAL : Add days / months to a date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  MONTH_NAMES_GET : Get the names of the month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v  WEEK_GET_FIRST_DAY : Get the first day of the week..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 05:07:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year/m-p/4082970#M976267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T05:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year/m-p/4082971#M976268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Hema,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module DATE_TO_PERIOD_CONVERT can be used to get the current period by passing the current date. This function module need the following import parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I_DATE         Current Date&lt;/P&gt;&lt;P&gt;I_MONMIT     First day of the second half of the month&lt;/P&gt;&lt;P&gt;PERIV           Fiscal year variant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I_DATE in this field you can pass todays date or sy-datum.&lt;/P&gt;&lt;P&gt;I_MONMIT in this field you can pass '00'&lt;/P&gt;&lt;P&gt;PERIV in this filed you can pass the FISCAL YEAR for a list of Fiscal years run transaction &lt;STRONG&gt;OB37&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: D_PERIOD          T009B-POPER,                " determined posting period&lt;/P&gt;&lt;P&gt;  D_Year              T009B-BDATJ.               "  determined fiscal year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
     EXPORTING
          I_DATE         = SY-DATUM
          I_MONMIT   = 00
          I_PERIV        = 'K4'
     IMPORTING
          E_BUPER        = D_PERIOD
          E_GJAHR        = D_YEAR
     EXCEPTIONS
          INPUT_FALSE          = 1
          T009_NOTFOUND  = 2
          T009B_NOTFOUND = 3
          OTHERS                  = 4.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERIOD_DAY_DETERMINE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above mentioned function module will determine the first of the the Fiscal Year. If you want to know the first day of the Fiscal year for a Company, then you can use this function module. While trying this function module for company codes of different countries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT YH_PERIODDAYDETERMINE .


Data: d_gjahr     like BKPF-GJAHR,   "Fiscal year
      d_monat     like BKPF-MONAT,   "Posting period
      d_periv     like T001-PERIV,   "Period version
      d_fday      like BKPF-BUDAT,   "First period day
      d_lday      like BKPF-BUDAT,   "Last period day
      d_SPERIOD   like BKPF-BSTAT.   "Special period indicator


    Move: '2008' to   d_gjahr,
          '01'   to   d_monat,
          'K4'   to   d_periv.

CALL FUNCTION 'PERIOD_DAY_DETERMINE'
  EXPORTING
    I_GJAHR                    = d_gjahr
    I_MONAT                    = d_monat
    I_PERIV                    = d_periv
  IMPORTING
    E_FDAY                     = d_fday
    E_LDAY                     = d_lday
    E_SPERIOD                  = d_SPERIOD
  EXCEPTIONS
    ERROR_PERIOD               = 1
    ERROR_PERIOD_VERSION       = 2
    FIRSTDAY_NOT_DEFINED       = 3
    PERIOD_NOT_DEFINED         = 4
    YEAR_INVALID               = 5
    OTHERS                     = 6
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write:/ 'First Day Of the Fiscal Year =',d_fday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output of the above program is as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Period Day Determine                                                                                &lt;/P&gt;&lt;P&gt;First Day Of the Fiscal Year = 01/01/2008             &lt;/P&gt;&lt;P&gt;Last Day Of the first period Fiscal Year = 01/31/2008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change the Fiscal Year Variant to some other country and see the result. In my system I got the following result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Period Day Determine                                                                                &lt;/P&gt;&lt;P&gt;First Day Of the Fiscal Year = 04/01/2008              &lt;/P&gt;&lt;P&gt;Last Day Of the first period Fiscal Year = 04/30/2008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Indu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 05:26:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year/m-p/4082971#M976268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T05:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal year</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year/m-p/4082972#M976269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with the below function module G_POSTING_DATE_OF_PERIOD_GET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran BObbala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 05:26:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fiscal-year/m-p/4082972#M976269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T05:26:32Z</dc:date>
    </item>
  </channel>
</rss>

