<?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: how to validate future date ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-future-date/m-p/11893825#M1961741</link>
    <description>&lt;P&gt;Read again you source code, the error is obvious; Are you aware of existence of system fields such as SY-DATLO or SY-DATUM?&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2019 06:49:49 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2019-07-01T06:49:49Z</dc:date>
    <item>
      <title>how to validate future date ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-future-date/m-p/11893823#M1961739</link>
      <description>&lt;P&gt;I need a validation for, example if user enter a future date that should be catched in error table.? Below is my code. &lt;/P&gt;
  &lt;P&gt;SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S32 { color: #3399FF; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; }&lt;/P&gt;
  &lt;P&gt;SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }&lt;/P&gt;
  &lt;P&gt;PARAMETERS : P_DATE LIKE SY-DATUM.&lt;BR /&gt; data: lv_date type sy-datum.&lt;/P&gt;
  &lt;P&gt;lv_date = p_date + 1.&lt;BR /&gt; if p_date &amp;gt; lv_date.&lt;BR /&gt; MESSAGE 'you entered a future date' type 'E'.&lt;BR /&gt; else.&lt;BR /&gt; MESSAGE 'you entered acorrect date' type 'I'.&lt;BR /&gt; ENDIF.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jun 2019 06:02:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-future-date/m-p/11893823#M1961739</guid>
      <dc:creator>former_member592491</dc:creator>
      <dc:date>2019-06-29T06:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to validate future date ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-future-date/m-p/11893824#M1961740</link>
      <description>&lt;P&gt;Run it in debug to see what you did wrong. And why are you using the L in your variable name, when it clearly isn't local?&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jun 2019 07:07:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-future-date/m-p/11893824#M1961740</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2019-06-29T07:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to validate future date ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-future-date/m-p/11893825#M1961741</link>
      <description>&lt;P&gt;Read again you source code, the error is obvious; Are you aware of existence of system fields such as SY-DATLO or SY-DATUM?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 06:49:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-future-date/m-p/11893825#M1961741</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2019-07-01T06:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to validate future date ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-future-date/m-p/11893826#M1961742</link>
      <description>&lt;P&gt;As  &lt;SPAN class="mention-scrubbed"&gt;raymond.giuseppi&lt;/SPAN&gt; mentioned, the problem is quite obvious: it's adding 1 to a variable and the comparing the result with the original variable. When Y = X + 1 then the condition IF Y &amp;gt; X will &lt;STRONG&gt;always&lt;/STRONG&gt; be true. This code does not validate whether the date is in future, it's really just meaningless. &lt;/P&gt;&lt;P&gt;To determine if the date is in future you need to establish first what exactly is the definition of "future". What time zone and what date do you want to use as a base for comparison? When the criteria is clear then you can simply compare two date fields.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 18:57:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-future-date/m-p/11893826#M1961742</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2019-07-01T18:57:39Z</dc:date>
    </item>
  </channel>
</rss>

