<?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: List Months between a date range in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-months-between-a-date-range/m-p/1367461#M181499</link>
    <description>&lt;P&gt;Not as per Question.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jan 2023 10:32:28 GMT</pubDate>
    <dc:creator>viva_kd</dc:creator>
    <dc:date>2023-01-02T10:32:28Z</dc:date>
    <item>
      <title>List Months between a date range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-months-between-a-date-range/m-p/1367457#M181495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm trying to list the months between a given date range in an ABAP report to generate a MIS report(ALV).. Say I have 2 date ranges, 01.01.2006 to 01.04.2006.. I want to list &lt;/P&gt;&lt;P&gt;Jan 2006&lt;/P&gt;&lt;P&gt;Feb 2006&lt;/P&gt;&lt;P&gt;Mar 2006&lt;/P&gt;&lt;P&gt;Apr 2006.. Any FM in SAP to get this OP..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2006 04:58:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/list-months-between-a-date-range/m-p/1367457#M181495</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-02T04:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: List Months between a date range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-months-between-a-date-range/m-p/1367458#M181496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can try creating an select options and appending with the values in low  &amp;amp; high and selectop-options = 'BT'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 May 2006 07:45:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/list-months-between-a-date-range/m-p/1367458#M181496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-14T07:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: List Months between a date range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-months-between-a-date-range/m-p/1367459#M181497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use this function module to get months beween two dates&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. MONTHS_BETWEEN_TWO_DATES   or&lt;/P&gt;&lt;P&gt;2. MONTHS_BETWEEN_TWO_DATES_NEW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please reward the point if you are satisfied with answer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;john.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2006 13:19:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/list-months-between-a-date-range/m-p/1367459#M181497</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-15T13:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: List Months between a date range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-months-between-a-date-range/m-p/1367460#M181498</link>
      <description>&lt;P&gt;DID u get solution , any FM .please post.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 10:32:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/list-months-between-a-date-range/m-p/1367460#M181498</guid>
      <dc:creator>viva_kd</dc:creator>
      <dc:date>2023-01-02T10:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: List Months between a date range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-months-between-a-date-range/m-p/1367461#M181499</link>
      <description>&lt;P&gt;Not as per Question.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 10:32:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/list-months-between-a-date-range/m-p/1367461#M181499</guid>
      <dc:creator>viva_kd</dc:creator>
      <dc:date>2023-01-02T10:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: List Months between a date range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/list-months-between-a-date-range/m-p/1367462#M181500</link>
      <description>&lt;P&gt;Hello  &lt;SPAN class="mention-scrubbed"&gt;viva.kd&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;you can use function module MONTH_NAMES_GET for this purpose.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;program Z_TEST2.&lt;BR /&gt;parameters: pdate1 type d default '20060101',&lt;BR /&gt;            pdate2 type d default '20060401'.&lt;BR /&gt;types: begin of TMonth,&lt;BR /&gt;         monthAbbr type char3,&lt;BR /&gt;         year type numc4,&lt;BR /&gt;       end of TMonth.&lt;BR /&gt;data: monthsBtDates type standard table of TMonth with empty key,&lt;BR /&gt;      monthBtDates type TMonth.&lt;BR /&gt;data: rc type syst_subrc,&lt;BR /&gt;      months type standard table of T247.&lt;BR /&gt;" Get all months with their names&lt;BR /&gt;call function 'MONTH_NAMES_GET'&lt;BR /&gt;  IMPORTING&lt;BR /&gt;    RETURN_CODE           = rc&lt;BR /&gt;  TABLES&lt;BR /&gt;    MONTH_NAMES           = months&lt;BR /&gt;  EXCEPTIONS&lt;BR /&gt;    MONTH_NAMES_NOT_FOUND = 1&lt;BR /&gt;    OTHERS                = 2.&lt;BR /&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;BR /&gt;  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;BR /&gt;    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;BR /&gt;  exit.&lt;BR /&gt;ENDIF.&lt;BR /&gt;perform getMonthsBtDates using pdate1 pdate2.&lt;BR /&gt;loop at monthsBtDates assigning field-symbol(&amp;lt;mBtDates&amp;gt;).&lt;BR /&gt;  write:/ &amp;lt;mBtDates&amp;gt;-monthAbbr, &amp;lt;mBtDates&amp;gt;-year.&lt;BR /&gt;endloop.&lt;BR /&gt;*&lt;BR /&gt;form getMonthsBtDates using d1 type d d2 type d.&lt;BR /&gt;  data: currentDate type d,&lt;BR /&gt;        currentMonth type numc2.&lt;BR /&gt;  currentDate = d1.&lt;BR /&gt;  clear monthsBtDates.&lt;BR /&gt;  while currentDate &amp;lt;= d2.&lt;BR /&gt;    currentMonth = currentDate+4(2).&lt;BR /&gt;    read table months with key mnr = currentMonth&lt;BR /&gt;        assigning field-symbol(&amp;lt;month&amp;gt;).&lt;BR /&gt;    if sy-subrc = 0.&lt;BR /&gt;      monthBtDates-monthAbbr = &amp;lt;month&amp;gt;-ktx.&lt;BR /&gt;      monthBtDates-year = currentDate(4).&lt;BR /&gt;      append monthBtDates to monthsBtDates.&lt;BR /&gt;    endif.&lt;BR /&gt;    " Now move to next month&lt;BR /&gt;    currentDate+6(2) = '28'.&lt;BR /&gt;    add 4 to currentDate.&lt;BR /&gt;    currentDate+6(2) = '01'.&lt;BR /&gt;  endwhile.&lt;BR /&gt;endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Kind regards and a happy new year&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 17:10:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/list-months-between-a-date-range/m-p/1367462#M181500</guid>
      <dc:creator>jmodaal</dc:creator>
      <dc:date>2023-01-02T17:10:08Z</dc:date>
    </item>
  </channel>
</rss>

