<?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 capture invalid data types in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-invalid-data-types/m-p/2223725#M477658</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 custom RFC function module and it has currency, quantity data types fields with other fields.  If I pass a invalid value to these data types, (from SE37) a core dump occurs. The core dump occurs in such a way that, it happens even before it starts executing the first statement of my RFC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question, is there a way to check if the value supplied for the data type is valid or not , if not exit gracefully with error message to the RETURN table or raise execption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts? Please let me know. Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sundar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 May 2007 17:10:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-09T17:10:09Z</dc:date>
    <item>
      <title>How to capture invalid data types</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-invalid-data-types/m-p/2223725#M477658</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 custom RFC function module and it has currency, quantity data types fields with other fields.  If I pass a invalid value to these data types, (from SE37) a core dump occurs. The core dump occurs in such a way that, it happens even before it starts executing the first statement of my RFC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question, is there a way to check if the value supplied for the data type is valid or not , if not exit gracefully with error message to the RETURN table or raise execption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts? Please let me know. Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sundar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 17:10:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-invalid-data-types/m-p/2223725#M477658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T17:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture invalid data types</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-invalid-data-types/m-p/2223726#M477659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well one way would be generically type the import fields as type string of something like that.  Then when in side the function module, you can move them to the appropriate fields, maybe within a TRY CATCH and you can then handle the exceptions.&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>Wed, 09 May 2007 17:14:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-invalid-data-types/m-p/2223726#M477659</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-05-09T17:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture invalid data types</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-invalid-data-types/m-p/2223727#M477660</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;Your solution is ok for many class errors, but i found an exception to this, the error CX_SY_CONVERSION_NO_NUMBER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;In this escenario:&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data a type i.&lt;/P&gt;&lt;P&gt;CATCH SYSTEM-EXCEPTIONS: CONVT_NO_NUMBER = 5.&lt;/P&gt;&lt;P&gt;  IF a = 'adsdsd'.&lt;/P&gt;&lt;P&gt;    a = 'adsdsd'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDCATCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, you have a dump uncatchable. I dont found any solution for this, except check before the data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will like a function with input string and domain, which validates this data. May be another inputs like check_for_initial_values or range limits. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thinks is very useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2007 16:19:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-capture-invalid-data-types/m-p/2223727#M477660</guid>
      <dc:creator>juan_pascuet</dc:creator>
      <dc:date>2007-11-27T16:19:07Z</dc:date>
    </item>
  </channel>
</rss>

