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

abap runtime error COMPUTE_BCD_OVERFLOW

Former Member
0 Likes
4,699

Hi All,

I am getting the below dump while executeing zprogram in 4.0 version.

ABAP runtime errors    COMPUTE_BCD_OVERFLOW
       Occurred on     13.08.2013 at 14:41:16

>> Short dump has not been completely stored. It is too big.


Overflow for arithmetical operation (type P) in program "SAPLCSS7 "

Information on where termination occurred

The termination occurred in the ABAP/4 program "SAPLCSS7 " in
"STUFE_02".
The main program was "Z_DOC_R_G1_002 ".

The termination occurred in line 242
of the source code of program "LCSS7FS1 " (when calling the editor 2420).

Source code extract

FORM STPO_LESEN USING LKL_STLAL.
   CLEAR: RET_CODE.
   CALL FUNCTION 'GET_STPO'
      EXPORTING  ALTER  = LKL_STLAL
                 DATUV  = PM_DATUV
                 SET    = 'X'
                 ALL    = 'X'
      TABLES     WA     = STPOB
                 ADD_WA = STERNTAB
      EXCEPTIONS NO_RECORD_FOUND      =   1
                 KEY_INCOMPLETE       =   2
                 KEY_INVALID          =   3
                 CALL_INVALID         =   4.
   RET_CODE = SY-SUBRC.
ENDFORM.


  FORM STUFE_01.
     AST_STUFE = 0.
  ENDFORM.


  FORM STUFE_02.
==> APS_STUFE = AST_STUFE + 1 .
  ENDFORM.


  FORM STUFE_03.
     CHECK NOT LTB-XTLNR IS INITIAL.

     AST_STUFE = LTB-STUFE.
  ENDFORM.

How to solve this issue. Please advice.

Thanks,

Venkata

3 REPLIES 3
Read only

Former Member
0 Likes
1,623

Hi Venkata,

Please check what is the field length of AST_STUFE . it could be the reason of overflow.

Also check the note it could help.

Note 869851 - Field overflow with large purchase order quantities

Symptom

When you create or change the quantity of purchase order items with large quantities, a runtime error occurs:
There is an overflow in an arithmetic operation (type P) in program "xxxxxxxx".


Other terms

OKCODE_ADSN, ITEM_PROCESS_MAIN, AD_SERIALNUMBER_IN_PO
SAPMM06E SAPLMEPO
COMPUTE_BCD_OVERFLOW, CX_SY_ARITHMETIC_OVERFLOW
ME21, ME21N, ME22, ME22N


Solution

From now on, order quantities up to an order quantity of 2147483647 are supported.
Caution:
We have since made additions to the corrections in 46C2.

Read only

Former Member
0 Likes
1,623

Hi,

Check the type and length of APS_STUFE.

Thanks & Regards


Read only

0 Likes
1,623

Hi Manu,

Below are the data types :

aps_stufe like stpol-stufe, which is of type DEC   length  2 and

ast_stufe like stpol-stufe,  which is of type DEC   length  2

In debuging the values are as below:

Aps_Stufe = 999

Ast_Stufe = 999

How to solve this. Please help.

Thanks,

Venkata