<?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: Dates in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dates/m-p/4056100#M969616</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;Select Options is an internal table. You can pick the date values from the internal Table and you can process that thing with the help of the OFFSET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_date = s_date-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this thing with the high value of the internal table and if it is not then add one to the month field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_date&lt;EM&gt;4(2) = w_date&lt;/EM&gt;4(2) + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will solve ur problem By and Large.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But keep in mind the months of December because Next month is January, First Month of next year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take Necessary precaution of that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sumit Agarwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Jul 2008 10:03:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-04T10:03:50Z</dc:date>
    <item>
      <title>Dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dates/m-p/4056097#M969613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I need the FM or Logic to findout the same  date in the next month and so,if user gives the date range 01.01.2008 to 01.06.2008 .it means 01.02.2008,01.03.2008,01.04.2008,01.05.2008.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;regds,&lt;/P&gt;&lt;P&gt;Sree.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 09:33:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dates/m-p/4056097#M969613</guid>
      <dc:creator>former_member125931</dc:creator>
      <dc:date>2008-07-04T09:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dates/m-p/4056098#M969614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Snicky,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this code it is working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT-OPTIONS:
  s_date FOR sy-datum.

DATA :
  w_split LIKE sy-datum.


w_split = s_date-low.


WHILE w_split GE s_date-low.

  IF w_split+4(2) gt s_date-high+4(2).

    EXIT.

  ELSE.

      WRITE :/ w_split.

    w_split+4(2) = w_split+4(2) + 1.

  ENDIF.
ENDWHILE..&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 09:56:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dates/m-p/4056098#M969614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T09:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dates/m-p/4056099#M969615</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;Start date of a month is 1 for any month. But then use FM FIRST_DAY_IN_PERIOD_GET&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
    EXPORTING
    i_gjahr              =  sp_gjahr
*     i_monmit        =  gp_monat
      i_periv             =  'K4'
      i_poper           =  sp_monat
 IMPORTING
     e_date             =  gv_firstday
 EXCEPTIONS
   input_false          =  1
   t009_notfound     =  2
   t009b_notfound   =  3
   OTHERS            =  4
            .
  IF sy-subrc  0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF. ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Found Help Full Do reward.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt; Eshwar.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 09:59:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dates/m-p/4056099#M969615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T09:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dates/m-p/4056100#M969616</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;Select Options is an internal table. You can pick the date values from the internal Table and you can process that thing with the help of the OFFSET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_date = s_date-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this thing with the high value of the internal table and if it is not then add one to the month field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_date&lt;EM&gt;4(2) = w_date&lt;/EM&gt;4(2) + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will solve ur problem By and Large.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But keep in mind the months of December because Next month is January, First Month of next year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take Necessary precaution of that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sumit Agarwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 10:03:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dates/m-p/4056100#M969616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T10:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dates/m-p/4056101#M969617</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;Try the following code and check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  D1 TYPE D,  D2 TYPE D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  MIN(2) TYPE N, MAX(2) TYPE N, CTR(2) TYPE N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  BEGIN OF WA,&lt;/P&gt;&lt;P&gt;	  COL1 TYPE D,&lt;/P&gt;&lt;P&gt;           END OF WA,&lt;/P&gt;&lt;P&gt;           ITAB LIKE WA OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D1 = '20080101'.&lt;/P&gt;&lt;P&gt;D2 = '20080601'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MIN = D1+4(2).&lt;/P&gt;&lt;P&gt;MAX = D2+4(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CTR = MIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHILE ( CTR &amp;lt;= MAX ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WA-COL1 = D1.&lt;/P&gt;&lt;P&gt;    WA+4(2) = CTR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND WA TO ITAB.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;    CTR = CTR + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDWHILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB INTO WA.&lt;/P&gt;&lt;P&gt;   WRITE:/ WA-COL1.&lt;/P&gt;&lt;P&gt;END&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Murthy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 10:05:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dates/m-p/4056101#M969617</guid>
      <dc:creator>former_member787646</dc:creator>
      <dc:date>2008-07-04T10:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dates/m-p/4056102#M969618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ThankYou  Swapna,my problem solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 10:06:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dates/m-p/4056102#M969618</guid>
      <dc:creator>former_member125931</dc:creator>
      <dc:date>2008-07-04T10:06:55Z</dc:date>
    </item>
  </channel>
</rss>

