Skip to Content
0
Jan 02, 2013 at 04:11 AM

Arithmetical errors or conversion errors found in routine

184 Views

Hello guys,

I met this problem when I using further processing to load data from DSO01 to DSO02.

I searched on forum and found many articles about this issue.

Most of them are related to 2lis, condition rate etc.

But my scenario is different:

We don't extract data use SAP BI content.

The data source is a customized datasource for PP.

The error didn't happened from datasource to DSO.

It is like:

datasource -----PSA---, DSO01(data mart)----- DSO02(data mart)

From PSA-dso01 is ok,

The error happened at DSO01----- DSO02 .

The process chain ran well for a long time.

But yesterday it failed on the step of further processing from DSO01 to DSO02(data mart was used).

I expanded the Processing (data packet): Errors have occurred section in Detail tab of monitor and found the error message as:

Arithmetical errors or conversion errors found in routine ROUTINE_0003 record 1433

I turn back to datamart and check corresponding data package and couldn't find any corrupted/non-logic data.

Because I use datamart and further processing so ,I was unable to use simulate update to check.

I also checked all the routine in update rules, but all the routine is simple routine. I can't find any point which can cause /0 situation.

We use BW 3.x and BW 7.0

Can anyone help me?

I pasted one of the routine.

______________________________________________

FORM compute_data_field

TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring

USING COMM_STRUCTURE LIKE /BIC/CS8SGPPDS01

RECORD_NO LIKE SY-TABIX

RECORD_ALL LIKE SY-TABIX

SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS

CHANGING RESULT LIKE /BIC/ASGPPDS0200-/BIC/SGEXTR_IN

RETURNCODE LIKE SY-SUBRC "Do not use!

ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update

*

*$*$ begin of routine - insert your code only below this line *-*

* fill the internal table "MONITOR", to make monitor entries

lt_zp-sign = 'I'.

lt_zp-option = 'BT'.

lt_zp-low = 'ZP10'.

lt_zp-high = 'ZP99'.

append lt_zp.

* CONDITION 1 : si class number= Z9Z011 et A4Z90012(A4BATCH) is differen

* to initial.

select single /bic/A4Z90012 /bic/A4Z90013 /bic/A4Z90014 into

(ls_batch-/bic/A4Z90012, ls_batch-/bic/A4Z90013,

ls_batch-/bic/A4Z90014)

from /BIC/MA4BATCMAT

where /BIC/A4BATCMAT = COMM_STRUCTURE-/BIC/A4BATCHin

AND /BIC/A0MATNR = COMM_STRUCTURE-/BIC/A0MATNR.

case COMM_STRUCTURE-/BIC/A4CLASNUM.

when 'Z9Z011'.

IF ls_batch-/bic/A4Z90012 <> '0.00'.

RESULT = ( ( ls_batch-/bic/A4Z90012 / 100 ) *

COMM_STRUCTURE-/BIC/SGQTYIN ).

ELSEIF ls_batch-/bic/A4Z90012 = '0.00'.

RESULT = ( ls_batch-/bic/A4Z90013 / 100 ) *

COMM_STRUCTURE-/BIC/SGQTYIN .

ENDIF.

when 'Z9Z003' or 'Z9Z010'.

lv_sqrt = ( c_value2

-

c_value3 * ( c_value4 +

( COMM_STRUCTURE-/BIC/A4Z9_14IN ) ) ).

lv_sqrt = sqrt( abs( lv_sqrt ) ).

RESULT = ( COMM_STRUCTURE-/BIC/A4Z9_14IN )

* ( c_value1 - lv_sqrt ) *

COMM_STRUCTURE-/BIC/SGQTYIN.

when others.

endcase.

* if abort is not equal zero, the update process will be canceled

ABORT = 0.

*$*$ end of routine - insert your code only before this line *-*

*

ENDFORM.

FORM compute_data_field

TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring

USING COMM_STRUCTURE LIKE /BIC/CS8SGPPDS01

RECORD_NO LIKE SY-TABIX

RECORD_ALL LIKE SY-TABIX

SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS

CHANGING RESULT LIKE /BIC/ASGPPDS0200-/BIC/SGEXTR_IN

RETURNCODE LIKE SY-SUBRC "Do not use!

ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update

*

*$*$ begin of routine - insert your code only below this line *-*

* fill the internal table "MONITOR", to make monitor entries

lt_zp-sign = 'I'.

lt_zp-option = 'BT'.

lt_zp-low = 'ZP10'.

lt_zp-high = 'ZP99'.

append lt_zp.

* CONDITION 1 : si class number= Z9Z011 et A4Z90012(A4BATCH) is differen

* to initial.

select single /bic/A4Z90012 /bic/A4Z90013 /bic/A4Z90014 into

(ls_batch-/bic/A4Z90012, ls_batch-/bic/A4Z90013,

ls_batch-/bic/A4Z90014)

from /BIC/MA4BATCMAT

where /BIC/A4BATCMAT = COMM_STRUCTURE-/BIC/A4BATCHin

AND /BIC/A0MATNR = COMM_STRUCTURE-/BIC/A0MATNR.

case COMM_STRUCTURE-/BIC/A4CLASNUM.

when 'Z9Z011'.

IF ls_batch-/bic/A4Z90012 <> '0.00'.

RESULT = ( ( ls_batch-/bic/A4Z90012 / 100 ) *

COMM_STRUCTURE-/BIC/SGQTYIN ).

ELSEIF ls_batch-/bic/A4Z90012 = '0.00'.

RESULT = ( ls_batch-/bic/A4Z90013 / 100 ) *

COMM_STRUCTURE-/BIC/SGQTYIN .

ENDIF.

when 'Z9Z003' or 'Z9Z010'.

lv_sqrt = ( c_value2

-

c_value3 * ( c_value4 +

( COMM_STRUCTURE-/BIC/A4Z9_14IN ) ) ).

lv_sqrt = sqrt( abs( lv_sqrt ) ).

RESULT = ( COMM_STRUCTURE-/BIC/A4Z9_14IN )

* ( c_value1 - lv_sqrt ) *

COMM_STRUCTURE-/BIC/SGQTYIN.

when others.

endcase.

* if abort is not equal zero, the update process will be canceled

ABORT = 0.

*$*$ end of routine - insert your code only before this line *-*

*

ENDFORM.