<?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 function module which could calculate the previous month's start date..... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293552#M500567</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;I want a function module which could calculate the previous month's start date and end date...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say todays date is  like 29.05.2007(start date) it should return &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;01.04.2007 and 30.04.2007...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IS there any FM for this ... or how to go about this scenario ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;samm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 May 2007 13:45:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-29T13:45:43Z</dc:date>
    <item>
      <title>function module which could calculate the previous month's start date.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293552#M500567</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;I want a function module which could calculate the previous month's start date and end date...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say todays date is  like 29.05.2007(start date) it should return &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;01.04.2007 and 30.04.2007...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IS there any FM for this ... or how to go about this scenario ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;samm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 13:45:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293552#M500567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T13:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: function module which could calculate the previous month's start date.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293553#M500568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Start date would be 01 for every month, so to find the last date for a month use RP_LAST_DAY_OF_MONTHS function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 13:49:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293553#M500568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T13:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: function module which could calculate the previous month's start date.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293554#M500569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get the first day is easy...for the last day you could use &amp;lt;b&amp;gt;RP_LAST_DAY_OF_MONTHS&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 13:50:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293554#M500569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T13:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: function module which could calculate the previous month's start date.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293555#M500570</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 try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: wa_date like sy-datum,
      s_date  like sy-datum,
      e_date  like sy-datum.

wa_date = sy-datum - 30.

CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
  EXPORTING
    iv_date = wa_date
  IMPORTING
    ev_month_begin_date = s_date
    ev_month_end_date = e_date.

&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>Tue, 29 May 2007 13:50:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293555#M500570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T13:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: function module which could calculate the previous month's start date.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293556#M500571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See the below Logic :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :g_date(2) TYPE n,           " Date&lt;/P&gt;&lt;P&gt;      g_month(2) TYPE n,          " Month&lt;/P&gt;&lt;P&gt;      g_year(4) TYPE n ,          " Year&lt;/P&gt;&lt;P&gt;      g_bill_low(10) TYPE n,       " From date&lt;/P&gt;&lt;P&gt;      g_bill_high(10) TYPE n,      " To date&lt;/P&gt;&lt;P&gt;      g_month1(2) TYPE n,         " Month&lt;/P&gt;&lt;P&gt;      g_year1(4) TYPE n,          " Year&lt;/P&gt;&lt;P&gt;      g_date1(2) TYPE n,          " Date&lt;/P&gt;&lt;P&gt;      g_year2(4) TYPE n,          " Year&lt;/P&gt;&lt;P&gt;      g_datum LIKE sy-datum.      " System date&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RANGES : r_bdate  FOR vbrk-fkdat.             " Billing date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  g_datum = p_date + 10.&lt;/P&gt;&lt;P&gt;  g_month = g_datum+4(2).&lt;/P&gt;&lt;P&gt;  g_year = g_datum+0(4).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF g_month = 1.&lt;/P&gt;&lt;P&gt;    g_year = g_year - 1.&lt;/P&gt;&lt;P&gt;    g_month = 12.&lt;/P&gt;&lt;P&gt;    g_date = 1.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    g_month = g_month - 1.&lt;/P&gt;&lt;P&gt;    g_date = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Passing the date to billing date-low&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CONCATENATE  g_year g_month g_date  INTO g_bill_low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  r_bdate-low = g_bill_low.&lt;/P&gt;&lt;P&gt;  r_bdate-sign = 'I'.&lt;/P&gt;&lt;P&gt;  r_bdate-option = 'BT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  g_month1 = g_datum+4(2).&lt;/P&gt;&lt;P&gt;  g_year1 = g_datum+0(4).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF g_month1 = 1.&lt;/P&gt;&lt;P&gt;    g_year1 = g_year1 - 1.&lt;/P&gt;&lt;P&gt;    g_month1 = 12.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    g_month1 = g_month1 - 1.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE g_month1.&lt;/P&gt;&lt;P&gt;    WHEN 1.g_date1 = '31'.&lt;/P&gt;&lt;P&gt;    WHEN 3.g_date1 = '31'.&lt;/P&gt;&lt;P&gt;    WHEN 4.g_date1 = '30'.&lt;/P&gt;&lt;P&gt;    WHEN 5.g_date1 =  '31'.&lt;/P&gt;&lt;P&gt;    WHEN 6.g_date1 = '30'.&lt;/P&gt;&lt;P&gt;    WHEN 7.g_date1 = '31'.&lt;/P&gt;&lt;P&gt;    WHEN 8.g_date1 = '31'.&lt;/P&gt;&lt;P&gt;    WHEN 9.g_date1 = '30'.&lt;/P&gt;&lt;P&gt;    WHEN 10.g_date1 = '31'.&lt;/P&gt;&lt;P&gt;    WHEN 11.g_date1 = '30'.&lt;/P&gt;&lt;P&gt;    WHEN 12.g_date1 = '31'.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  g_year2 = g_year1.&lt;/P&gt;&lt;P&gt;  IF g_month1 = 2.&lt;/P&gt;&lt;P&gt;    g_year2 = g_year2 MOD 4 .&lt;/P&gt;&lt;P&gt;    IF g_year2 = 0.&lt;/P&gt;&lt;P&gt;      g_date1 = 29.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      g_date1 = 28.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Passing the date to billing date-high&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CONCATENATE  g_year1  g_month1  g_date1 INTO g_bill_high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  r_bdate-high = g_bill_high.&lt;/P&gt;&lt;P&gt;  APPEND r_bdate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if it is helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 13:51:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293556#M500571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T13:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: function module which could calculate the previous month's start date.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293557#M500572</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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read the first and last date for the previous month&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'RS_VARI_V_LAST_MONTH'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      p_datetab  = t_date1&lt;/P&gt;&lt;P&gt;      p_intrange = s_interchange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read table for the date range of the previous month&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  READ TABLE t_date1 INTO s_date2 INDEX 1 .&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set the select option value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    s_date-sign    = c_i .&lt;/P&gt;&lt;P&gt;    s_date-option  = c_bt.&lt;/P&gt;&lt;P&gt;    s_date-low     = s_date2-low .&lt;/P&gt;&lt;P&gt;    s_date-high    = s_date2-high .&lt;/P&gt;&lt;P&gt;    APPEND s_date TO rt_date .&lt;/P&gt;&lt;P&gt;    CLEAR s_date .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Award points if it helps.&lt;/P&gt;&lt;P&gt;-Gaurang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 13:51:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293557#M500572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T13:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: function module which could calculate the previous month's start date.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293558#M500573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check function modules in Function group 0002. There is FM BAPI_CCODE_GET_FIRSTDAY_PERIOD, which can help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 13:55:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293558#M500573</guid>
      <dc:creator>Peter_Inotai</dc:creator>
      <dc:date>2007-05-29T13:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: function module which could calculate the previous month's start date.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293559#M500574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No FMs needed:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ztest MESSAGE-ID 00.

DATA: start LIKE sy-datum,
      end LIKE sy-datum.

end = sy-datum.
end+6(2) = '01'.
end = end - 1.

start = end.
start+6(2) = '01'.

WRITE: start, end.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 14:01:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293559#M500574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T14:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: function module which could calculate the previous month's start date.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293560#M500575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt; to get the last of the current month, the FM is : RP_LAST_DAY_OF_MONTHS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ur requirement , no Fm is required.&lt;/P&gt;&lt;P&gt;Just copy paste the belwo code and check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: s type sy-datum.&lt;/P&gt;&lt;P&gt; sy-datum+6(2) = '01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; sy-datum = sy-datum - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  write:/ sy-datum.  " this is the last day of the previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  sy-datum+6(2)  = '01'.&lt;/P&gt;&lt;P&gt;  write: / sy-datum.  " this is the first day of the last month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert back if nay issues.&lt;/P&gt;&lt;P&gt;Reward with points if helpful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naveen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 14:04:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293560#M500575</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T14:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: function module which could calculate the previous month's start date.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293561#M500576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is not a function module, but simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data Temp_date   type d.   &lt;/P&gt;&lt;P&gt;Data Start_date    type d.    "Start of Month&lt;/P&gt;&lt;P&gt;Data End_date     type d.    "End of Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp_date = sy-datum.   "20070529 &lt;/P&gt;&lt;P&gt;Temp_date+6(2) = '01' .   "20070501&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Calculate one day before current month &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This works even if we go back a year&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Last_date = Temp_date - 1.  "20070430&lt;/P&gt;&lt;P&gt;First_date = Last_date.&lt;/P&gt;&lt;P&gt;First_date+6(2) = '01'.          "20070401&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 14:05:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293561#M500576</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T14:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: function module which could calculate the previous month's start date.....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293562#M500577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Samir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    We have a function module &amp;lt;b&amp;gt;RP_LAST_DAY_OF_MONTHS&amp;lt;/b&amp;gt; to get the month's start date n end date if u enter the month alone...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function RP_LAST_DAY_OF_MONTHS&lt;/P&gt;&lt;P&gt;exporting.&lt;/P&gt;&lt;P&gt;month = ' '.&lt;/P&gt;&lt;P&gt;importing.&lt;/P&gt;&lt;P&gt;first_date = ' '.&lt;/P&gt;&lt;P&gt;last_date = ' '.&lt;/P&gt;&lt;P&gt;exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IF USEFUL...!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2007 14:36:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-which-could-calculate-the-previous-month-s-start-date/m-p/2293562#M500577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-29T14:36:03Z</dc:date>
    </item>
  </channel>
</rss>

