<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1571260#M257849</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;&lt;/P&gt;&lt;P&gt; You can use this function module...  &lt;/P&gt;&lt;P&gt;"CSCP_PARA1_GET_PERIODS" with the following parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date from: 01.01.2006 (First date of the starting moth)&lt;/P&gt;&lt;P&gt;Date to  : 01.10.2006 (First date of the last month)&lt;/P&gt;&lt;P&gt;Time Unit: 'M'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will return 10 records in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Describe the internal table for LINES option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will give the number of months between the given months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also try the following FMs...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HR_HK_DIFF_BT_2_DATES, DAYS_BETWEEN_TWO_DATES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Bharat Kumar Reddy.V&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Oct 2006 06:04:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-09T06:04:06Z</dc:date>
    <item>
      <title>Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1571258#M257847</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 wand to get no of days , month , year when i give &lt;/P&gt;&lt;P&gt;  the 2 month , year only as input , no date is given.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Is there any standard function module that accepts &lt;/P&gt;&lt;P&gt;  month and year and give the no of month , year between&lt;/P&gt;&lt;P&gt;  them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Thanks &amp;amp; Regards &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  Renjith Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2006 05:25:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1571258#M257847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-09T05:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1571259#M257848</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 do not have directly a function module but you can use this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  CALC_FIRST_LAST_DAY_OF_MO&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Calculates the first and last day of the month for the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Month/Year that was input as report parameters.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Also formats the first and last day of the month in&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      all the different formats needed to read production tables&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      and Razorfish tables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_YEAR  Year in format YYYY&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_MO    Month in format MM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM calc_first_last_day_of_mo USING    p_year   "YYYY&lt;/P&gt;&lt;P&gt;                                        p_month  "MM&lt;/P&gt;&lt;P&gt;                            CHANGING    p_beg_dt  LIKE  sy-datum&lt;/P&gt;&lt;P&gt;                                        p_end_dt  LIKE  sy-datum&lt;/P&gt;&lt;P&gt;                                        p_prev_beg_dt LIKE sy-datum&lt;/P&gt;&lt;P&gt;                                        p_prev_end_dt LIKE sy-datum&lt;/P&gt;&lt;P&gt;                                        p_beg_dt_000000&lt;/P&gt;&lt;P&gt;                                        p_beg_dt_240000&lt;/P&gt;&lt;P&gt;                                        p_end_dt_000000&lt;/P&gt;&lt;P&gt;                                        p_end_dt_240000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CHECK NOT ( p_year IS INITIAL ) AND&lt;/P&gt;&lt;P&gt;        NOT ( p_month IS INITIAL ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; First day of the month in sy-datum format&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DATA:  BEGIN OF l_first_day,&lt;/P&gt;&lt;P&gt;           year(4),&lt;/P&gt;&lt;P&gt;           mo(2),&lt;/P&gt;&lt;P&gt;           day(2) VALUE '01',&lt;/P&gt;&lt;P&gt;         END OF l_first_day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  l_first_day-year  =  p_year.&lt;/P&gt;&lt;P&gt;  l_first_day-mo    =  p_month.&lt;/P&gt;&lt;P&gt;  p_beg_dt          =  l_first_day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Last day of the month in sy-datum format&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'OIL_LAST_DAY_OF_MONTH'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            i_date     = p_beg_dt&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            e_last_day = p_end_dt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CALL FUNCTION 'OIU_GET_PREV_MONTH' "DEL OSS 102253&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           i_date = p_end_dt&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           e_date = p_prev_end_dt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  p_prev_end_dt = ( p_beg_dt - 1 ).  "INS OSS 102253&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  l_first_day-year  =  p_prev_end_dt(4).&lt;/P&gt;&lt;P&gt;  l_first_day-mo    =  p_prev_end_dt+4(2).&lt;/P&gt;&lt;P&gt;  p_prev_beg_dt     =  l_first_day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; First and last days of the month with timestamps set to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; '000000' and '240000'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CONCATENATE p_beg_dt '000000'  INTO  p_beg_dt_000000.&lt;/P&gt;&lt;P&gt;  CONCATENATE p_beg_dt '240000'  INTO  p_beg_dt_240000.&lt;/P&gt;&lt;P&gt;  CONCATENATE p_end_dt '000000'  INTO  p_end_dt_000000.&lt;/P&gt;&lt;P&gt;  CONCATENATE p_end_dt '240000'  INTO  p_end_dt_240000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; First Day of the month in format YYYYMMDD+++++&lt;EM&gt;, where '&lt;/EM&gt;+++++' is&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; in timestamp.  Put in range with option = CP. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR r_prd_dt[].&lt;/P&gt;&lt;P&gt;  CLEAR r_prd_dt.&lt;/P&gt;&lt;P&gt;  CONCATENATE p_beg_dt&lt;/P&gt;&lt;P&gt;              '++++++'&lt;/P&gt;&lt;P&gt;      INTO r_prd_dt-low.&lt;/P&gt;&lt;P&gt;  r_prd_dt-sign  =  'I'.&lt;/P&gt;&lt;P&gt;  r_prd_dt-option  =  'CP'.&lt;/P&gt;&lt;P&gt;  APPEND r_prd_dt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " CALC_FIRST_LAST_DAY_OF_MO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2006 05:30:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1571259#M257848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-09T05:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1571260#M257849</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;&lt;/P&gt;&lt;P&gt; You can use this function module...  &lt;/P&gt;&lt;P&gt;"CSCP_PARA1_GET_PERIODS" with the following parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date from: 01.01.2006 (First date of the starting moth)&lt;/P&gt;&lt;P&gt;Date to  : 01.10.2006 (First date of the last month)&lt;/P&gt;&lt;P&gt;Time Unit: 'M'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will return 10 records in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Describe the internal table for LINES option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will give the number of months between the given months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also try the following FMs...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HR_HK_DIFF_BT_2_DATES, DAYS_BETWEEN_TWO_DATES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Bharat Kumar Reddy.V&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2006 06:04:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1571260#M257849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-09T06:04:06Z</dc:date>
    </item>
  </channel>
</rss>

