<?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 Re: function to get quarter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-to-get-quarter/m-p/1472314#M221869</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't think that there is  a standard function.  You will need to determine what the current period which sy-datum falls under using function module 'FI_PERIOD_DETERMINE'.  Then in your code, you will need to determine the 4 buckets for the quarters in ranges.  Then check the value against each range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Aug 2006 02:00:08 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-08-03T02:00:08Z</dc:date>
    <item>
      <title>function to get quarter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-to-get-quarter/m-p/1472313#M221868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi , is there any function to get Current Quarter of the year??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 01:44:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-to-get-quarter/m-p/1472313#M221868</guid>
      <dc:creator>kowong</dc:creator>
      <dc:date>2006-08-03T01:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: function to get quarter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-to-get-quarter/m-p/1472314#M221869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't think that there is  a standard function.  You will need to determine what the current period which sy-datum falls under using function module 'FI_PERIOD_DETERMINE'.  Then in your code, you will need to determine the 4 buckets for the quarters in ranges.  Then check the value against each range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 02:00:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-to-get-quarter/m-p/1472314#M221869</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-03T02:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: function to get quarter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-to-get-quarter/m-p/1472315#M221870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take the following for example.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

data: xspbup type spbup.

data: xgjahr type bkpf-gjahr.
data: xpoper type t009b-poper.
data: check_spbup type spbup.


ranges: q1 for xspbup.
ranges: q2 for xspbup.
ranges: q3 for xspbup.
ranges: q4 for xspbup.

q1-sign = 'I'.
q1-option = 'BT'.
q1-low+0(4) = sy-datum+0(4).
q1-low+4(2) = '01'.
q1-high+0(4) = sy-datum+0(4).
q1-high+4(2) = '03'.
append q1.

q2-sign = 'I'.
q2-option = 'BT'.
q2-low+0(4) = sy-datum+0(4).
q2-low+4(2) = '04'.
q2-high+0(4) = sy-datum+0(4).
q2-high+4(2) = '06'.
append q2.

q3-sign = 'I'.
q3-option = 'BT'.
q3-low+0(4) = sy-datum+0(4).
q3-low+4(2) = '07'.
q3-high+0(4) = sy-datum+0(4).
q3-high+4(2) = '09'.
append q3.

q4-sign = 'I'.
q4-option = 'BT'.
q4-low+0(4) = sy-datum+0(4).
q4-low+4(2) = '09'.
q4-high+0(4) = sy-datum+0(4).
q4-high+4(2) = '12'.
append q4.


call function 'FI_PERIOD_DETERMINE'
     exporting
          i_budat = sy-datum
          i_periv = 'YT'
     importing
          e_gjahr = xgjahr
          e_poper = xpoper.

check_spbup+0(4) = xgjahr.
check_spbup+4(2) = xpoper.

if check_spbup in q1.
  write:/ 'This date is under Q1'.
endif.
if check_spbup in q2.
  write:/ 'This date is under Q2'.
endif.
if check_spbup in q3.
  write:/ 'This date is under Q3'.
endif.
if check_spbup in q4.
  write:/ 'This date is under Q4'.
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 02:04:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-to-get-quarter/m-p/1472315#M221870</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-03T02:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: function to get quarter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-to-get-quarter/m-p/1472316#M221871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kokwei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BKK_GET_QUARTER_DATE &lt;/P&gt;&lt;P&gt;TSTR_PERIODS_QUARTERS&lt;/P&gt;&lt;P&gt;HR_99S_GET_DATES_QUARTER&lt;/P&gt;&lt;P&gt;SLIM_GET_QUARTERLY_PERIODS&lt;/P&gt;&lt;P&gt;RS_VARI_V_QUARTER1XXXX &lt;/P&gt;&lt;P&gt;RS_VARI_V_QUARTER2XXXX &lt;/P&gt;&lt;P&gt;RS_VARI_V_QUARTER3XXXX &lt;/P&gt;&lt;P&gt;RS_VARI_V_QUARTER4XXXX &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 03:48:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-to-get-quarter/m-p/1472316#M221871</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2006-08-03T03:48:36Z</dc:date>
    </item>
  </channel>
</rss>

