Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Catch block around a function module

Former Member
0 Likes
1,170

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
648

Hi Buddy,

See this sap note.

1139208--->COMPUTE_BCD_OVERFLOW in program REUKEWU3A.

Try this and get back to me incase of any queries.

Dont forget to reward points if found useful.

Thanks,

Satyesh

3 REPLIES 3
Read only

Former Member
0 Likes
649

Hi Buddy,

See this sap note.

1139208--->COMPUTE_BCD_OVERFLOW in program REUKEWU3A.

Try this and get back to me incase of any queries.

Dont forget to reward points if found useful.

Thanks,

Satyesh

Read only

0 Likes
648

Hi,

this doesn't work because the field overflow occures in a original SAP function module. I can not change SAP code.

TRY / CATCH / ENDTRY does also not work.

The exception isn't caught.

Thanks

Arnfried

Read only

ThomasZloch
Active Contributor
0 Likes
648

Maybe you can use the TRY / CATCH / ENDTRY statements here.

Also, since it is an SAP function that dumps, did you check for SAP notes on the topic?

Cheers

Thomas