<?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: help in dates in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069474#M428463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Antonio,&lt;/P&gt;&lt;P&gt;use the  FM rp_last_day_of_the_months to get&lt;/P&gt;&lt;P&gt;last day of the month by passing the month number and first day is obviously 01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So u can find out the data between these days,&lt;/P&gt;&lt;P&gt;hope this helps,&lt;/P&gt;&lt;P&gt;keerthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Mar 2007 08:13:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-19T08:13:56Z</dc:date>
    <item>
      <title>help in dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069472#M428461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallow I wont to now if I can choose validity of date for &amp;lt;b&amp;gt;one month&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;Ex. If the user choose 1.3.07&lt;/P&gt;&lt;P&gt;I wont to get all the data for this month from 1.3.07 until 31.3.07 and so on&lt;/P&gt;&lt;P&gt;How can I do that&lt;/P&gt;&lt;P&gt;Its very important for me the dates for all month that the user choose &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     SELECT stdaz plans  &lt;/P&gt;&lt;P&gt;  FROM pa2010&lt;/P&gt;&lt;P&gt;  INTO (wa_emp_tab-no_of_hours_imb , wa_imb_hours_itab-plans)&lt;/P&gt;&lt;P&gt;  WHERE pernr = wa_emp_tab-pernr&lt;/P&gt;&lt;P&gt;  AND lgart = '9EXT'                        "  Wage Type (salary)&lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt; AND begda &amp;lt;= so_date&lt;/P&gt;&lt;P&gt;  AND endda =&amp;gt; so_date&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;  GROUP BY stdaz plans.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS so_date TYPE sy-datum OBLIGATORY DEFAULT sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 08:08:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069472#M428461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T08:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: help in dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069473#M428462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes u can do that...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data w_date like p_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_date = p_date.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;**code to get the last day of the entered month...&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;move '01' to w_date+6(2).&lt;/P&gt;&lt;P&gt;add '01' to w_date+4(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if w_date+4(2) gt 12.&lt;/P&gt;&lt;P&gt;w_date+4(2) = '01'.&lt;/P&gt;&lt;P&gt;add '0001' to w_date(4).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subtract 1 from w_date.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;**Here w_date contains the last date of the user entered month..&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Now....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT stdaz plans&lt;/P&gt;&lt;P&gt;FROM pa2010&lt;/P&gt;&lt;P&gt;INTO (wa_emp_tab-no_of_hours_imb , wa_imb_hours_itab-plans)&lt;/P&gt;&lt;P&gt;WHERE pernr = wa_emp_tab-pernr&lt;/P&gt;&lt;P&gt;AND lgart = '9EXT' " Wage Type (salary)&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;AND begda = p_date&lt;/P&gt;&lt;P&gt;AND endda = w_date&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;GROUP BY stdaz plans.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves ur problem...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sai ramesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 08:11:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069473#M428462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T08:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: help in dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069474#M428463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Antonio,&lt;/P&gt;&lt;P&gt;use the  FM rp_last_day_of_the_months to get&lt;/P&gt;&lt;P&gt;last day of the month by passing the month number and first day is obviously 01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So u can find out the data between these days,&lt;/P&gt;&lt;P&gt;hope this helps,&lt;/P&gt;&lt;P&gt;keerthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 08:13:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069474#M428463</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T08:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: help in dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069475#M428464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi  kiran varanasi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how i can use it in my select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 08:15:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069475#M428464</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T08:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: help in dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069476#M428465</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;    obviously first day of any month is 01...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'LAST_DAY_OF_MONTHS'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      DAY_IN            = ST1_DATE&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      LAST_DAY_OF_MONTH = EN1_DATE&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;here, st1_date will hold 01.03.2007 and en1_date will hold 31.03.2007.. use this in your select statement as follows...but i think the operands will be in the reverse order...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT stdaz plans &lt;/P&gt;&lt;P&gt;FROM pa2010&lt;/P&gt;&lt;P&gt;INTO (wa_emp_tab-no_of_hours_imb , wa_imb_hours_itab-plans)&lt;/P&gt;&lt;P&gt;WHERE pernr = wa_emp_tab-pernr&lt;/P&gt;&lt;P&gt;AND lgart = '9EXT' " Wage Type (salary)&lt;/P&gt;&lt;P&gt;AND begda =&amp;gt; st1_date &lt;/P&gt;&lt;P&gt;AND endda &amp;lt;= en1_date&lt;/P&gt;&lt;P&gt;GROUP BY stdaz plans.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but appending the values to a range and using in your select will yield better performance..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helpful, reward&lt;/P&gt;&lt;P&gt;Sathish. R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 08:24:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069476#M428465</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T08:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: help in dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069477#M428466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi antonio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now take the start date and end date into two variables say s_low and s_high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ...... from pA0000 into table Itab&lt;/P&gt;&lt;P&gt;where begda = s_low&lt;/P&gt;&lt;P&gt;and enda = s_high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;keerthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 08:24:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069477#M428466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T08:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: help in dates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069478#M428467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data : lastday like sy-datum,&lt;/P&gt;&lt;P&gt;         firstday like sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate so_date(6) '01' into firstday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'LAST_DAY_OF_MONTHS'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;DAY_IN = firstday&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;LAST_DAY_OF_MONTH = lastday&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i am not sure about your select qry what you want here?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT stdaz plans &lt;/P&gt;&lt;P&gt;FROM pa2010&lt;/P&gt;&lt;P&gt;INTO (wa_emp_tab-no_of_hours_imb , wa_imb_hours_itab-plans)&lt;/P&gt;&lt;P&gt;WHERE pernr = wa_emp_tab-pernr&lt;/P&gt;&lt;P&gt;AND lgart = '9EXT' " Wage Type (salary)&lt;/P&gt;&lt;P&gt;AND begda between firstdate and lastday&lt;/P&gt;&lt;P&gt;AND endda between firstdate and lastday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 09:36:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-dates/m-p/2069478#M428467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T09:36:05Z</dc:date>
    </item>
  </channel>
</rss>

