Skip to Content
0
Former Member
May 29, 2008 at 11:22 AM

Catch block around a function module

370 Views

Hello,

I have the following problem.

I am calling a SAP function module which is duing some arithmetic operations. Sometimes the function module dumps with COMPUTE_BCD_OVERFLOW.

The problem is that this error is not catched in the function module.

So my idea was to catch it in my program.

I tried the following code:

CATCH SYSTEM-EXCEPTIONS COMPUTE_BCD_OVERFLOW = 1.

CALL FUNCTION 'SAPTUNE_GET_SUMMARY_STATISTIC'

EXPORTING

DESTINATION = 'NONE'

TABLES

BUFFER_STATISTIC = LT_BUFF_STATS

EXCEPTIONS

NO_AUTHORIZATION = 01

OTHERS = 99.

ENDCATCH.

IF SY-SUBRC <> 0.

........

.......

ENDIF.

But it doesn't work.

So is there a way how I can catch an exception which is thrown in a SAP function module ?

Thanks