<?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 on Date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-on-date/m-p/1736747#M320409</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;for last and first day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data:f_date type sy-datum,
l_date type sydatum.


CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
EXPORTING
iv_date = sy-datum
IMPORTING
EV_MONTH_BEGIN_DATE = f_date
EV_MONTH_END_DATE = l_date.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;last working day&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TM_DATE_CHECK_WORKING_DAY&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if hlped pls mark poin ts&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Nov 2006 06:51:38 GMT</pubDate>
    <dc:creator>anversha_s</dc:creator>
    <dc:date>2006-11-29T06:51:38Z</dc:date>
    <item>
      <title>Function Module on Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-on-date/m-p/1736746#M320408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;      Function Module on the Last working Date of a month and Last day of th emonth based on the company code and period.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 06:45:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-on-date/m-p/1736746#M320408</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-29T06:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module on Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-on-date/m-p/1736747#M320409</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;for last and first day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data:f_date type sy-datum,
l_date type sydatum.


CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
EXPORTING
iv_date = sy-datum
IMPORTING
EV_MONTH_BEGIN_DATE = f_date
EV_MONTH_END_DATE = l_date.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;last working day&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TM_DATE_CHECK_WORKING_DAY&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if hlped pls mark poin ts&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 06:51:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-on-date/m-p/1736747#M320409</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-11-29T06:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module on Date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-on-date/m-p/1736748#M320410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;We want to fill the two selection screen fields p_fromdate and p_todate&lt;/P&gt;&lt;P&gt;with the first and last date of the previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA:&lt;/P&gt;&lt;P&gt;    l_monthn(2) TYPE n,&lt;/P&gt;&lt;P&gt;    l_yearn(4)  TYPE n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Find current month and year&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  MOVE sy-datum+4(2) TO l_monthn.&lt;/P&gt;&lt;P&gt;  MOVE sy-datum+0(4) TO l_yearn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; If current month &amp;gt; 1 subtract 1 from then month&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF  l_monthn &amp;gt; 1.&lt;/P&gt;&lt;P&gt;    l_monthn = l_monthn - 1.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    l_monthn = 12.&lt;/P&gt;&lt;P&gt;    l_yearn = l_yearn - 1.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;First date of month&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CONCATENATE l_yearn l_monthn '01' INTO p_fromdate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Last date of month&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            day_in            = p_fromdate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            last_day_of_month = p_todate&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            day_in_no_date    = 1&lt;/P&gt;&lt;P&gt;            OTHERS            = 2.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Laxmi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 07:09:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-on-date/m-p/1736748#M320410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-29T07:09:40Z</dc:date>
    </item>
  </channel>
</rss>

