<?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 How to delete wrong values from the table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-wrong-values-from-the-table/m-p/1090702#M100584</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;I have a field of type SY-DATUM and I am loading data from an external system into BW. The field should be of the format YYYYMMDD (Ex: 20051025). But I have some corrupt data where the field is not in the specified format. Sometimes the date is in othe formats, for example 05/02/054, 20/04/04 and some other formats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, When the field is not in the correct format, I would like to set the field to NULL. Any ideas appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;GOva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Nov 2005 19:22:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-11-03T19:22:46Z</dc:date>
    <item>
      <title>How to delete wrong values from the table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-wrong-values-from-the-table/m-p/1090702#M100584</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;I have a field of type SY-DATUM and I am loading data from an external system into BW. The field should be of the format YYYYMMDD (Ex: 20051025). But I have some corrupt data where the field is not in the specified format. Sometimes the date is in othe formats, for example 05/02/054, 20/04/04 and some other formats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, When the field is not in the correct format, I would like to set the field to NULL. Any ideas appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;GOva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2005 19:22:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-wrong-values-from-the-table/m-p/1090702#M100584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-03T19:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete wrong values from the table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-wrong-values-from-the-table/m-p/1090703#M100585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, you can check the plausibility of the date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the data coming in is not of the correct format for SAP, then you set to initial..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out this sample program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001 .


data: p_date type sy-datum value '65/1/2545'.


call function 'DATE_CHECK_PLAUSIBILITY'
     exporting
          date                      = p_date
     exceptions
          plausibility_check_failed = 1
          others                    = 2.

if sy-subrc = 1.
  write:/ 'This date is not a real date'.
else.
  write:/ 'Looks ok to me'.
endif.


p_Date = sy-datum.


call function 'DATE_CHECK_PLAUSIBILITY'
     exporting
          date                      = p_date
     exceptions
          plausibility_check_failed = 1
          others                    = 2.

if sy-subrc = 1.
  write:/ 'This date is not a real date'.
else.
  write:/ 'Looks ok to me'.
endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch HEilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2005 19:33:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-wrong-values-from-the-table/m-p/1090703#M100585</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-03T19:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete wrong values from the table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-wrong-values-from-the-table/m-p/1090704#M100586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please make sure to mark you post as solved if you question has been answered completely.  THanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2005 20:36:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-wrong-values-from-the-table/m-p/1090704#M100586</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-03T20:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete wrong values from the table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-wrong-values-from-the-table/m-p/1090705#M100587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just finished my testing. Works fine. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2005 20:40:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-wrong-values-from-the-table/m-p/1090705#M100587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-03T20:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete wrong values from the table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-wrong-values-from-the-table/m-p/1090706#M100588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cool,  glad to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regard,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2005 20:45:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-delete-wrong-values-from-the-table/m-p/1090706#M100588</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-11-03T20:45:07Z</dc:date>
    </item>
  </channel>
</rss>

