Application Development Discussions

Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Error

Former Member

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

08-02-2007 4:17 AM

Hi,

My program outputs the detail of GL accoung details for selected month

Its working fine for every month except 9, 11 and 12

if i gave 9 month its throwing me to short dump showing the error

COMPUTE_BCD_OVERFLOW

CX_SY_ARITHMETIC_OVERFLOW

Please tell me what will be the error

Points will be given

<b>

Thanks & Regards,

Azhar</b>

- SAP Managed Tags:
- ABAP Development

1 ACCEPTED SOLUTION

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

08-02-2007 4:21 AM

Hi,

Look this code, you can easily understand what BCD overflow

```
PARAMETERS fact TYPE i.
DATA: fact_save TYPE i,
res(16) TYPE p.
*** ARITHMETIC_ERRORS contains COMPUTE_BCD_OVERFLOW ***
CATCH SYSTEM-EXCEPTIONS ARITHMETIC_ERRORS = 5.
res = fact_save = fact.
SUBTRACT 1 FROM fact.
DO fact TIMES.
MULTIPLY res BY fact. "<- COMPUTE_BCD_OVERFLOW
SUBTRACT 1 FROM fact.
ENDDO.
ENDCATCH.
IF sy-subrc = 5.
WRITE: / 'Overflow! Factorial of', fact_save,
'can not be calculated.'.
ELSE.
WRITE: / 'Factorial of', fact_save, 'gives', res.
ENDIF.
```

aRs

Points are always welcome

- SAP Managed Tags:
- ABAP Development

2 REPLIES 2

Former Member

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

08-02-2007 4:21 AM

Hi Azhar,

Can you paste your code. and also tell the place where the dump occuring by looking in ST22.

Regards,

Atish

- SAP Managed Tags:
- ABAP Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

08-02-2007 4:21 AM

Hi,

Look this code, you can easily understand what BCD overflow

```
PARAMETERS fact TYPE i.
DATA: fact_save TYPE i,
res(16) TYPE p.
*** ARITHMETIC_ERRORS contains COMPUTE_BCD_OVERFLOW ***
CATCH SYSTEM-EXCEPTIONS ARITHMETIC_ERRORS = 5.
res = fact_save = fact.
SUBTRACT 1 FROM fact.
DO fact TIMES.
MULTIPLY res BY fact. "<- COMPUTE_BCD_OVERFLOW
SUBTRACT 1 FROM fact.
ENDDO.
ENDCATCH.
IF sy-subrc = 5.
WRITE: / 'Overflow! Factorial of', fact_save,
'can not be calculated.'.
ELSE.
WRITE: / 'Factorial of', fact_save, 'gives', res.
ENDIF.
```

aRs

Points are always welcome

- SAP Managed Tags:
- ABAP Development