<?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 module or any other thing... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843136#M358072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;chk this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry this one &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=842442&amp;amp;messageID=2805380" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=842442&amp;amp;messageID=2805380&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Chandrasekhar Jagarlamudi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jan 2007 15:41:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-22T15:41:09Z</dc:date>
    <item>
      <title>Function module or any other thing...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843135#M358071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any function module to check whether current date falls under which quarter..&lt;/P&gt;&lt;P&gt;01.01.2007 to 31.03.2007 is first quarter,&lt;/P&gt;&lt;P&gt;01.04.2007 to 30.06.2007 is second quarter&lt;/P&gt;&lt;P&gt;01.07.2007 to 31.09.2007 is third quarter&lt;/P&gt;&lt;P&gt;01.10.2007 to 31.12.2007 is four quarter..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;year will be divided in the above format and i need to check in which quarter the system date falls.. can any one sugest me any idea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 15:38:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843135#M358071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-22T15:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Function module or any other thing...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843136#M358072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;chk this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry this one &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=842442&amp;amp;messageID=2805380" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=842442&amp;amp;messageID=2805380&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Chandrasekhar Jagarlamudi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 15:41:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843136#M358072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-22T15:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Function module or any other thing...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843137#M358073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out Rich's Answer in this thread &lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=842366&amp;amp;messageID=2124693" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=842366&amp;amp;messageID=2124693&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 15:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843137#M358073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-22T15:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Function module or any other thing...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843138#M358074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just take offset of date and check like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_date = sy-datum+4(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check v_date falls in between '01' and '03', then give 'first quarter'.&lt;/P&gt;&lt;P&gt;or '04 and '06' second quarter......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regds,&lt;/P&gt;&lt;P&gt;kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 15:43:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843138#M358074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-22T15:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Function module or any other thing...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843139#M358075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&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;HR_99S_GET_QUARTER &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise you can try this sample code from other thread.&lt;/P&gt;&lt;P&gt;Assuming date format is MM/DD/YYYY.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
v1 = date+0(2).

if V1 = '01' or v1 ='02' or v1 = '03'.
  quarter = 1.
elseif V1 = '04' or v1 ='05' or v1 = '06'.
  quarter = 2.
elseif V1 = '07' or v1 ='08' or v1 = '09'.
  quarter = 3.
elseif V1 = 10' or v1 ='11' or v1 = '12'.
  quarter = 4.
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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 15:43:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843139#M358075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-22T15:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Function module or any other thing...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843140#M358076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can even check out these FM's&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;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 15:49:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843140#M358076</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-22T15:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Function module or any other thing...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843141#M358077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this example....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : v_date type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_date = sy-datum+4(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if v_date ge 1 and v_date le 3.&lt;/P&gt;&lt;P&gt; write : 'first quarter'.&lt;/P&gt;&lt;P&gt;elseif v_date ge 3 and v_date le 6.&lt;/P&gt;&lt;P&gt; write : 'sec quarter'.&lt;/P&gt;&lt;P&gt;elseif v_date ge 6 and v_date le 9.&lt;/P&gt;&lt;P&gt; write : 'third quarter'.&lt;/P&gt;&lt;P&gt;elseif v_date ge 9 and v_date le 12.&lt;/P&gt;&lt;P&gt; write : 'fourth quarter'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regds,&lt;/P&gt;&lt;P&gt;kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 15:57:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843141#M358077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-22T15:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Function module or any other thing...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843142#M358078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I guess you cannot view that theread ... here is that answer..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report ztest_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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 15:57:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843142#M358078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-22T15:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Function module or any other thing...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843143#M358079</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;Please check the following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS: P99SG.&lt;/P&gt;&lt;P&gt;DATA: ws_permo TYPE p99sg_quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'HR_99S_GET_QUARTER'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    im_date             = sy-datum&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   ex_quarter          =  ws_permo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ws_permo-q will contain the quarter number..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 16:02:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-or-any-other-thing/m-p/1843143#M358079</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-22T16:02:51Z</dc:date>
    </item>
  </channel>
</rss>

