<?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: how to use this function modules in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-this-function-modules/m-p/3714481#M894160</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;You can do it in following manner...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: L_YEAR TYPE NUMC4,&lt;/P&gt;&lt;P&gt;           L_MONTH1 TYPE NUMC3,&lt;/P&gt;&lt;P&gt;          SDATE  TYPE SY-DATUM,&lt;/P&gt;&lt;P&gt;         EDATE TYPE SY-DATUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;L_YEAR =    P_PERIOD+0(4).&lt;/P&gt;&lt;P&gt;L_MONTH1 = P_PERIOD+4(2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'FIRST_DAY_IN_PERIOD_GET'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_gjahr = L_YEAR&lt;/P&gt;&lt;P&gt;i_periv = 'CY'   "YOUR FISCAL YEAR VARIANT&lt;/P&gt;&lt;P&gt;i_poper = L_MONTH1&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;e_date = SDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'LAST_DAY_IN_PERIOD_GET'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_gjahr = P_YEAR&lt;/P&gt;&lt;P&gt;i_periv = 'CY'&lt;/P&gt;&lt;P&gt;i_poper = P_month&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;e_date = EDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;REWARD IF USEFUL&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: SHREE WADEKAR on Apr 24, 2008 10:38 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Apr 2008 04:58:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-24T04:58:11Z</dc:date>
    <item>
      <title>how to use this function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-this-function-modules/m-p/3714477#M894156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read Function modules FIRST_DAY_IN_PERIOD_GET and LAST_DAY_IN_PERIOD_GET to ge the first and last  dates of the periods entered on the selection screen. Here Year = First 4 characters and Period = Next two characters of YearPeriod field of the selection screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 04:44:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-this-function-modules/m-p/3714477#M894156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T04:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to use this function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-this-function-modules/m-p/3714478#M894157</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;find below the sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; call function 'FIRST_DAY_IN_PERIOD_GET'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;           i_gjahr        = p_year&lt;/P&gt;&lt;P&gt;           i_periv        = 'CY'&lt;/P&gt;&lt;P&gt;           i_poper        = p_month&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;           e_date         = s_date-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'LAST_DAY_IN_PERIOD_GET'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          i_gjahr        = p_year&lt;/P&gt;&lt;P&gt;          i_periv        = 'CY'&lt;/P&gt;&lt;P&gt;          i_poper        = p_month&lt;/P&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;          e_date         = s_date-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 04:48:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-this-function-modules/m-p/3714478#M894157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T04:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to use this function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-this-function-modules/m-p/3714479#M894158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HEY CAN YU PLEASE CLARIFY WHAT EXACTLY U WANT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COZ U HAVE ALREADY TOLD WHAT WILL BE THE INPUT PARAMETRS AND WHAT WILL BE THE UPTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THEN WHAT U WANT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF YOU CAN CLARIFY THEN WE CAN TRY TO HELP YOU OUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 04:51:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-this-function-modules/m-p/3714479#M894158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T04:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to use this function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-this-function-modules/m-p/3714480#M894159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
* get the first day of the period
CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
  EXPORTING
    I_GJAHR              = wgjahr
*   I_MONMIT             = 00
    I_PERIV              = 'V9'
    I_POPER              = wbuper
  IMPORTING
    E_DATE               = wfirstday
  EXCEPTIONS
    INPUT_FALSE          = 1
    T009_NOTFOUND        = 2
    T009B_NOTFOUND       = 3
    OTHERS               = 4.

* if today is not the first day of the period, return an error.
if sy-datum &amp;lt;&amp;gt; wfirstday.

* Date is not the first day of the fiscal period.
  MESSAGE E003(ZBW).

endif.


CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
           EXPORTING
                I_GJAHR        = LOC_YEAR
                I_PERIV        = '01'
                I_POPER        = LOC_POPER
           IMPORTING
                E_DATE         = LOC_DATE
           EXCEPTIONS
                INPUT_FALSE    = 1
                T009_NOTFOUND  = 2
                T009B_NOTFOUND = 3
                OTHERS         = 4.
      L_S_RANGE-LOW      = LOC_DATE.
      L_S_RANGE-SIGN     = 'I'.
      L_S_RANGE-OPT      = 'EQ'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 04:52:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-this-function-modules/m-p/3714480#M894159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T04:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to use this function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-this-function-modules/m-p/3714481#M894160</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;You can do it in following manner...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: L_YEAR TYPE NUMC4,&lt;/P&gt;&lt;P&gt;           L_MONTH1 TYPE NUMC3,&lt;/P&gt;&lt;P&gt;          SDATE  TYPE SY-DATUM,&lt;/P&gt;&lt;P&gt;         EDATE TYPE SY-DATUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;L_YEAR =    P_PERIOD+0(4).&lt;/P&gt;&lt;P&gt;L_MONTH1 = P_PERIOD+4(2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'FIRST_DAY_IN_PERIOD_GET'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_gjahr = L_YEAR&lt;/P&gt;&lt;P&gt;i_periv = 'CY'   "YOUR FISCAL YEAR VARIANT&lt;/P&gt;&lt;P&gt;i_poper = L_MONTH1&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;e_date = SDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'LAST_DAY_IN_PERIOD_GET'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_gjahr = P_YEAR&lt;/P&gt;&lt;P&gt;i_periv = 'CY'&lt;/P&gt;&lt;P&gt;i_poper = P_month&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;e_date = EDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;REWARD IF USEFUL&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: SHREE WADEKAR on Apr 24, 2008 10:38 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 04:58:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-this-function-modules/m-p/3714481#M894160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T04:58:11Z</dc:date>
    </item>
  </channel>
</rss>

