Enterprise Resource
Planning Portal

 

Advertise | Founder BLOG

ERPGenie.COM ABAP Tips and Tricks Database

THE ultimate
ERP website

 

Forums | Vote for us |

Google    Other Search Options

Login

Login to view more content!!!





Lost Password?
No account yet? Register

Registered Access

Poll

What is your relationship with SAP?
 
Home
Catching division by 0 error! PDF Print E-mail
User Rating: / 3
PoorBest 
Written by Kevin Wilson   
Wednesday, 30 May 2007
Yes, you can catch a division by zero error... How???
DATA: result TYPE p DECIMALS 2,
      number TYPE i VALUE 9.

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.

Related Items:

 
< Prev   Next >

Google Search

Statistics

Contribution Activity
Utilities: 41
Tips and Tricks: 362
Sample Code: 174
Total Contributions: 592

Member Activity
Members: 6795 since 2/1/2007!
New: 2 since yesterday!
Visitors: 2163880
We have 2 guests online

Newest Members

Welcome our newest members:

Google Ads