<?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 System exception - Field symbol - Initial check in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-exception-field-symbol-initial-check/m-p/8410245#M1645581</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm assigning a component of a structure to a field symbol. Component "LIEFERTERMIN" is type N(6).&lt;/P&gt;&lt;P&gt;Now I get a wrong value from my source structure. &amp;lt;fs_check&amp;gt; is now "R12022". This will cause a short dump on any arithmetic operation, of course. But first of all I'm checking if the value of the field symbol is initial. This however also results in a short dump (CONVT_NO_NUMBER) which is also ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'LIEFERTERMIN' OF STRUCTURE &amp;lt;fs_filecontent&amp;gt; TO &amp;lt;fs_check&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;   IF &amp;lt;fs_check&amp;gt; IS INITIAL.&lt;/P&gt;&lt;P&gt;   .....&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; However, I can neither catch this short dump with a &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt; ... &lt;/P&gt;&lt;P&gt;CATCH CX_SY_CONVERSION_NO_NUMBER into OREF.&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;block nor with a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CATCH SYSTEM-EXCEPTIONS conversion_errors = 1.&lt;/P&gt;&lt;P&gt;ENDCATCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on how to catch this exception?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;King regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Jan 2012 15:41:58 GMT</pubDate>
    <dc:creator>alexander_oertel2</dc:creator>
    <dc:date>2012-01-03T15:41:58Z</dc:date>
    <item>
      <title>System exception - Field symbol - Initial check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-exception-field-symbol-initial-check/m-p/8410245#M1645581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm assigning a component of a structure to a field symbol. Component "LIEFERTERMIN" is type N(6).&lt;/P&gt;&lt;P&gt;Now I get a wrong value from my source structure. &amp;lt;fs_check&amp;gt; is now "R12022". This will cause a short dump on any arithmetic operation, of course. But first of all I'm checking if the value of the field symbol is initial. This however also results in a short dump (CONVT_NO_NUMBER) which is also ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'LIEFERTERMIN' OF STRUCTURE &amp;lt;fs_filecontent&amp;gt; TO &amp;lt;fs_check&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;   IF &amp;lt;fs_check&amp;gt; IS INITIAL.&lt;/P&gt;&lt;P&gt;   .....&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; However, I can neither catch this short dump with a &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt; ... &lt;/P&gt;&lt;P&gt;CATCH CX_SY_CONVERSION_NO_NUMBER into OREF.&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;block nor with a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CATCH SYSTEM-EXCEPTIONS conversion_errors = 1.&lt;/P&gt;&lt;P&gt;ENDCATCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on how to catch this exception?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;King regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 15:41:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-exception-field-symbol-initial-check/m-p/8410245#M1645581</guid>
      <dc:creator>alexander_oertel2</dc:creator>
      <dc:date>2012-01-03T15:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: System exception - Field symbol - Initial check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-exception-field-symbol-initial-check/m-p/8410246#M1645582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: lv_packed_number     TYPE p.                        "#EC NEEDED
  CATCH SYSTEM-EXCEPTIONS convt_no_number = 1.
    lv_packed_number = &amp;lt;fs_check&amp;gt;.
  ENDCATCH.
  IF sy-subrc NE 0.
" Not a number
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 15:51:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-exception-field-symbol-initial-check/m-p/8410246#M1645582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-03T15:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: System exception - Field symbol - Initial check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-exception-field-symbol-initial-check/m-p/8410247#M1645583</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;in the rest of the program I have several other assignments like this one and I cannot be sure where the error will happen. What I know is that it will be a conversion error. Is there a possibility to catch the &amp;lt;fs_check&amp;gt; is initial - Exception (CONVT_NO_NUMBER) globally or do I have to use this part of your code for every single other assignment statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So basically use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CATCH SYSTEM-EXCEPTIONS convt_no_number = 1.&lt;/P&gt;&lt;P&gt; ASSIGN COMPONENT 'C1' OF STRUCTURE &amp;lt;fs_filecontent&amp;gt; TO &amp;lt;fs_check&amp;gt;.&lt;/P&gt;&lt;P&gt;IF &amp;lt;fs_check&amp;gt; IS INITIAL.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ASSIGN COMPONENT 'C2' OF STRUCTURE &amp;lt;fs_filecontent&amp;gt; TO &amp;lt;fs_check&amp;gt;.&lt;/P&gt;&lt;P&gt;IF &amp;lt;fs_check&amp;gt; IS INITIAL.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ASSIGN COMPONENT 'C3' OF STRUCTURE &amp;lt;fs_filecontent&amp;gt; TO &amp;lt;fs_check&amp;gt;.&lt;/P&gt;&lt;P&gt;IF &amp;lt;fs_check&amp;gt; IS INITIAL.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCATCH.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 16:02:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-exception-field-symbol-initial-check/m-p/8410247#M1645583</guid>
      <dc:creator>alexander_oertel2</dc:creator>
      <dc:date>2012-01-03T16:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: System exception - Field symbol - Initial check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-exception-field-symbol-initial-check/m-p/8410248#M1645584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do a TRY - CATCH on a whole coding block containing several assignments but that would also mean that exception will be raised the moment a conversion error occurs and none of other statements subsequent to statement causing conversion error till ENDTRY will be executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't want that to happen and would want to continue with rest of coding then you have to call this routine for each new numeric field that may contain non numeric characters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be you can create a form or macro, to make the test more appealing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 16:08:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-exception-field-symbol-initial-check/m-p/8410248#M1645584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-03T16:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: System exception - Field symbol - Initial check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-exception-field-symbol-initial-check/m-p/8410249#M1645585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use the logical expression [IS ASSIGNED|http://help.sap.com/abapdocu_702/en/abenlogexp_assigned.htm] instead of the IS INITIAL. More over, you should start using the [Class Based exceptions|http://help-abap.zevolving.com/2011/12/class-based-exception/] instead of using the System Exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TRY.
   ASSIGN COMPONENT 'C1' OF STRUCTURE &amp;lt;fs_filecontent&amp;gt; TO &amp;lt;fs_check&amp;gt;.
   IF &amp;lt;fs_check&amp;gt; IS ASSIGNED.
   
   ENDIF.
  CATCH CX_SY_CONVERSION_ERROR into lo_exc.
      data: lv_String type string.
      lv_String = lo_Exc-&amp;gt;get_text( ).
      message lv_String type 'S'
ENDTRY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 16:12:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-exception-field-symbol-initial-check/m-p/8410249#M1645585</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2012-01-03T16:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: System exception - Field symbol - Initial check</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/system-exception-field-symbol-initial-check/m-p/8410250#M1645586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your replies. I actually found the problem with help of a colleague and I realized, I didn't copy and paste a vital part of the problem to this question. All your answers actually would have helped thus I'm assigning points to everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code check was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF &amp;lt;fs_check&amp;gt; IS INITIAL or &amp;lt;fs_check&amp;gt; EQ ''.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if &amp;lt;fs_check&amp;gt; of type N(6) contains wrong data like 'R12022' the second check (EQ '') will dump and can't be catched. As the second check actually is not needed I just removed it from the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks anyway,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 09:10:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/system-exception-field-symbol-initial-check/m-p/8410250#M1645586</guid>
      <dc:creator>alexander_oertel2</dc:creator>
      <dc:date>2012-01-04T09:10:50Z</dc:date>
    </item>
  </channel>
</rss>

