<?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 Date condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-condition/m-p/5794899#M1310604</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to write code for date field validation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Condition:&lt;/P&gt;&lt;P&gt;1. Check If date field contains alphabet A to Z. &lt;/P&gt;&lt;P&gt;If yes - don't fail the load but capture in PSA with returncode 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Check if date field is blank/ empty.&lt;/P&gt;&lt;P&gt;If yes, load should continue and date field can be empty which is acceptable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Check if the date field is 10 characters long.&lt;/P&gt;&lt;P&gt;If yes - do all the varification for day, month &amp;amp; year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. If length is less than 10, don't fail the load but capture in PSA with returncode 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me how to put all this condition togather in code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please ask a specific question, but don't ask the forum to do your work for you. Try coding this yourself and if you have specific questions, then come back to the forum with them. - post locked&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Jun 22, 2009 1:14 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jun 2009 16:52:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-22T16:52:52Z</dc:date>
    <item>
      <title>Date condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-condition/m-p/5794899#M1310604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to write code for date field validation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Condition:&lt;/P&gt;&lt;P&gt;1. Check If date field contains alphabet A to Z. &lt;/P&gt;&lt;P&gt;If yes - don't fail the load but capture in PSA with returncode 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Check if date field is blank/ empty.&lt;/P&gt;&lt;P&gt;If yes, load should continue and date field can be empty which is acceptable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Check if the date field is 10 characters long.&lt;/P&gt;&lt;P&gt;If yes - do all the varification for day, month &amp;amp; year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. If length is less than 10, don't fail the load but capture in PSA with returncode 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me how to put all this condition togather in code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please ask a specific question, but don't ask the forum to do your work for you. Try coding this yourself and if you have specific questions, then come back to the forum with them. - post locked&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Jun 22, 2009 1:14 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 16:52:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-condition/m-p/5794899#M1310604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-22T16:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Date condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-condition/m-p/5794900#M1310605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; 1. Check If date field contains alphabet A to Z. &lt;/P&gt;&lt;P&gt;&amp;gt; If yes - don't fail the load but capture in PSA with returncode 1.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;if you declare it as type D or sy-datum it will not accept characters &lt;/P&gt;&lt;P&gt;&amp;gt; 2. Check if date field is blank/ empty.&lt;/P&gt;&lt;P&gt;&amp;gt; If yes, load should continue and date field can be empty which is acceptable.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; if lv_date is initial.&lt;/P&gt;&lt;P&gt;&amp;gt; 3. Check if the date field is 10 characters long.&lt;/P&gt;&lt;P&gt;&amp;gt; If yes - do all the verification for day, month &amp;amp; year.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;move the date to character format and check the screen length and check if its 10 or less &lt;/P&gt;&lt;P&gt;&amp;gt; 4. If length is less than 10, don't fail the load but capture in PSA with returncode 1.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; raise exception 1&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 17:02:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-condition/m-p/5794900#M1310605</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-06-22T17:02:39Z</dc:date>
    </item>
  </channel>
</rss>

