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

Problem in report for TYPE P

Former Member
0 Likes
1,235

I have problem in a Report in ECC5.0. Its giving Dump. Can anyone help me …

The given below is the Dump. I have declare netprc as netprc: TYPE P DECIMALS 2.

Error analysis

An exception occurred. This exception is dealt with in more detail below . The exception, which is assigned to the class 'CX_SY_ZERODIVIDE', was neither caught nor passed along using a RAISING clause, in the procedure "EXTRACT_DATA" "(FORM)"

.

Since the caller of the procedure could not have expected this exception to occur, the running program was terminated. The reason for the exception is:

In the current program "ZFIINSTR0020", an arithmetic operation ('DIVIDE',

'/', 'DIV', or 'MOD') with a type P operand attempted to divide by 0.

dump Code

MOVE-CORRESPONDING stock_tab TO output_tab.

MOVE-CORRESPONDING billing_tab TO output_tab.

MOVE-CORRESPONDING mara_tab TO output_tab.

<b>netprc = stock_tab-netpr / billing_tab-fkimg. </b> "XXXX

move netprc to output_tab-ntprc.

grsval = konv_tab-kbetr * billing_tab-fkimg.

move grsval to output_tab-grsval.

1 ACCEPTED SOLUTION
Read only

Former Member
774

Hi Alykya,

The error message indicates that there is divide by zero.

Try doing this

<b> CHECK NOT billing_tab-fkimg IS INITIAL.</b>

netprc = stock_tab-netpr / billing_tab-fkimg

You can also use TRY and CATCH. If the denominator is zero the system will throw a dump.

TRY.
DATA: TMP TYPE I.
TMP = 1 / 0 .
CATCH CX_SY_ZERODIVIDE.
  w_error_issued = 'X'.
ENDTRY.

Cheers

VJ

I have problem in a Report in ECC5.0. Its giving Dump. Can anyone help me …

The given below is the Dump. I have declare netprc as netprc: TYPE P DECIMALS 2.

Error analysis

An exception occurred. This exception is dealt with in more detail below . The exception, which is assigned to the class 'CX_SY_ZERODIVIDE', was neither caught nor passed along using a RAISING clause, in the procedure "EXTRACT_DATA" "(FORM)"

.

Since the caller of the procedure could not have expected this exception to occur, the running program was terminated. The reason for the exception is:

In the current program "ZFIINSTR0020", an arithmetic operation ('DIVIDE',

'/', 'DIV', or 'MOD') with a type P operand attempted to divide by 0.

dump Code

MOVE-CORRESPONDING stock_tab TO output_tab.

MOVE-CORRESPONDING billing_tab TO output_tab.

MOVE-CORRESPONDING mara_tab TO output_tab.

<b>netprc = stock_tab-netpr / billing_tab-fkimg. </b> "XXXX

move netprc to output_tab-ntprc.

grsval = konv_tab-kbetr * billing_tab-fkimg.

move grsval to output_tab-grsval.

2 REPLIES 2
Read only

Former Member
775

Hi Alykya,

The error message indicates that there is divide by zero.

Try doing this

<b> CHECK NOT billing_tab-fkimg IS INITIAL.</b>

netprc = stock_tab-netpr / billing_tab-fkimg

You can also use TRY and CATCH. If the denominator is zero the system will throw a dump.

TRY.
DATA: TMP TYPE I.
TMP = 1 / 0 .
CATCH CX_SY_ZERODIVIDE.
  w_error_issued = 'X'.
ENDTRY.

Cheers

VJ

Read only

0 Likes
774

Hi vijay,

The problem is solved.

Thanks a Lot.

Thanks & Regards

Alykya