<?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: Handling runtime exceptions in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379288#M811399</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Blag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I figured out a way with your help.&lt;/P&gt;&lt;P&gt;But I am still a lil bit hazy about the data clusters concept.&lt;/P&gt;&lt;P&gt;Do you have any links/material where I can read about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Goldie.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Feb 2008 21:22:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-21T21:22:23Z</dc:date>
    <item>
      <title>Handling runtime exceptions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379280#M811391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I encountered a runtime exception while executing a program.&lt;/P&gt;&lt;P&gt;The error was: &lt;/P&gt;&lt;P&gt;&lt;EM&gt;An exception occurred that is explained in detail below.&lt;/EM&gt;                                     &lt;/P&gt;&lt;P&gt;    &lt;EM&gt;The exception, which is assigned to class 'CX_SY_IMPORT_MISMATCH_ERROR', was&lt;/EM&gt;                &lt;/P&gt;&lt;P&gt;    &lt;EM&gt;not caught and&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;    &lt;EM&gt;therefore caused a runtime error.&lt;/EM&gt;                                                             &lt;/P&gt;&lt;P&gt;    &lt;EM&gt;The reason for the exception is:&lt;/EM&gt;                                                              &lt;/P&gt;&lt;P&gt;    &lt;EM&gt;During import the system discovered that the target object has&lt;/EM&gt;                                &lt;/P&gt;&lt;P&gt;   &lt;EM&gt;a different length than the object to be imported.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it was occurring at this code line&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 IMPORT RU-VERSION TO ORU_VERSION
             CRT
        FROM DATABASE PCL2(RU) ID RX_KEY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can somebody please explain how to handle such an exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Goldie.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 21:47:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379280#M811391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T21:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Handling runtime exceptions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379281#M811392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please do not duplicate or cross post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 22:04:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379281#M811392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T22:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Handling runtime exceptions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379282#M811393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thought this question would be better answered in ABAP objects forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I delete a thread?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;goldie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 22:12:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379282#M811393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T22:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Handling runtime exceptions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379283#M811394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think so, but you can mark one of them as solved (without assigning points).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 22:14:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379283#M811394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T22:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Handling runtime exceptions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379284#M811395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added the addition ACCEPTING TRUNCATION to the above statement and the current runtime error has been solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now a new runtime error came up.'CONNE_IMPORT_WRONG_OBJECT_TYPE'	of exception 'CX_SY_IMPORT_MISMATCH_ERROR'		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is because there is a type conflict between the structured objects.&lt;/P&gt;&lt;P&gt;The defn of CRT is like this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:  BEGIN OF CRT .
        INCLUDE STRUCTURE PC22Y.  "Cumulated result table (USA)
DATA:  END   OF CRT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I dont know where the mismatch is occuring in the data cluster.&lt;/P&gt;&lt;P&gt;Infact I am very much confused with the data cluster structure.&lt;/P&gt;&lt;P&gt;How do I resolve this issue?&lt;/P&gt;&lt;P&gt;Any insights would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Goldie.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 18:46:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379284#M811395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T18:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Handling runtime exceptions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379285#M811396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use CATH-EXCEPTIONS...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT Z_ATG_DUMMY.

DATA: RESULT TYPE P DECIMALS 3,

NUMBER TYPE I VALUE 11.

CATCH SYSTEM-EXCEPTIONS ARITHMETIC_ERRORS = 5.
  DO.
    NUMBER = NUMBER - 1.
    RESULT = 1 / NUMBER.
    WRITE: / NUMBER, RESULT.
  ENDDO.
ENDCATCH.

SKIP.

IF SY-SUBRC = 5.
  WRITE / 'Division by zero!'.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check for what exception you need to use...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 18:47:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379285#M811396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T18:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Handling runtime exceptions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379286#M811397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Blag,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the tip.&lt;/P&gt;&lt;P&gt;But how can I correct if I encounter the exception in my case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont know what is the structure of the cluster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please explain me what this code does?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IMPORT RU-VERSION TO ORU_VERSION
             CRT
        FROM DATABASE PCL2(RU) ID RX_KEY
        accepting truncation.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goldie.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 18:56:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379286#M811397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T18:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Handling runtime exceptions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379287#M811398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Should be something like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CATCH SYSTEM-EXCEPTIONS IMPORT_MISMATCH_ERRORS = 5.
IMPORT RU-VERSION TO ORU_VERSION
             CRT
        FROM DATABASE PCL2(RU) ID RX_KEY.
ENDCATCH.
 
SKIP.
 
IF SY-SUBRC = 5.
  WRITE / 'Import Error!'.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 20:15:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379287#M811398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T20:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Handling runtime exceptions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379288#M811399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Blag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I figured out a way with your help.&lt;/P&gt;&lt;P&gt;But I am still a lil bit hazy about the data clusters concept.&lt;/P&gt;&lt;P&gt;Do you have any links/material where I can read about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Goldie.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 21:22:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-runtime-exceptions/m-p/3379288#M811399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T21:22:23Z</dc:date>
    </item>
  </channel>
</rss>

