Application Development 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: 

overflow occurred

Former Member
0 Kudos

hi ,

when i am trying to activate a particular custom program after i copied from another system(Quality) i am getting error as -

When attempting to convert the value 99999999999,

an overflow occurred.

what is to be done in this case?

please help on this issue.

21 REPLIES 21

valter_oliveira
Active Contributor
0 Kudos

Never heard about that one! But try to use download in QAS and upload in DEV.

In menu of tcode se38: Utilities->more utilities->Upload/Download

Regards,

Valter Oliveira.

Former Member
0 Kudos

is it a problem in the code?

0 Kudos

yes.

i have defined as;

maxpreis LIKE ekpo-netpr VALUE '99999999999',

here the error is.

0 Kudos

maxpreis LIKE ekpo-netpr VALUE '99999999999'

So, that error doesn't surprise me ... with such a big net price!

Regards.

Valter.

0 Kudos

but the same code is working in Quality server.

how to proceed?

0 Kudos

can you post a bit of the code ... for us to understand the goal of initializing that variable with that value ... what's the exact row on which the dump occurs?

0 Kudos

Well, there is an overflow, so you need to shorten the ammount.

Just curious, is ekpo-netpr the same lenght in Quality?

0 Kudos

this is it.. its a include:

zeord_max LIKE eord-zeord,

liefbild,

newmet VALUE 'X', "für Preise setzen im Hintergrund

refe1(16) TYPE p,

refe2(16) TYPE p, "Rechenfeld 2

maxpreis LIKE ekpo-netpr VALUE '99999999999', maxwert LIKE ekpo-netwr VALUE '9999999999999',

maxproze(3) TYPE p VALUE '99999',

max_menge LIKE equp-qumng VALUE '999999999999999',

matkl LIKE eina-matkl, "Materialklasse

matnr LIKE eina-matnr, "Material

lifnr LIKE eina-lifnr, "Lieferant

ekorg LIKE eine-ekorg, "Einkaufsorg

esokz LIKE eine-esokz, "Sonderkennzeichen

werks LIKE eine-werks, "Werk

datum LIKE sy-datum,

xeine_tabix LIKE sy-tabix,

updall, "für Aufruf aus rm06inp0

titel_abrgrp.

the problem is in the bold one.

then again in some other module trying to use if :

IF REFE2 LE MAXPREIS.

XEKPO-NETPR = REFE2.

ENDIF.

ENDIF.

IF XEKPO-ZWERT NE 0.

*--- Umrechnen Wert von Fremd- in Hauswährung -


*

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

EXPORTING

DATE = XEKKO-BEDAT

RATE = XEKKO-WKURS

FOREIGN_AMOUNT = XEKPO-ZWERT

FOREIGN_CURRENCY = XEKKO-WAERS

LOCAL_CURRENCY = WAEHRUNG

IMPORTING

LOCAL_AMOUNT = REFE2.

IF REFE2 LE MAXPREIS.

XEKPO-ZWERT = REFE2.

just comparing things.

0 Kudos

yes it is.

the data elements length is also 11 and dec 2.

so i guess there should not be a problem

0 Kudos

I would say that you should replace your code by:


DATA: maxpreis LIKE ekpo-netpr VALUE '999999999.99'. "and so on ...

But I'm with ramiro, I'm very curious how can this work in another system?

Regards.

Valter Oliveira.

0 Kudos

thanks all.

i have used 9 with 2 decimal.

but how is it working in other system.

any inputs on this?

Former Member
0 Kudos

Hi Poonam,

The maximum length of EKPO-NETPR is 11 ( including 2 decimals).

Thats is the reason you are getting the error during generating the program.

The maximum value it can take is 999999999.99

Thanks,

Jyothi

0 Kudos

its the same. i changed it.

even then

0 Kudos

i think i am getting this. i ll check it later.

0 Kudos

Sorry. Make the amount to 9 digits i.e. '999999999'.

0 Kudos

Does the program in QA has the fixed point arithmetic checked in attributes?

0 Kudos

what is this? i have no idea what you are telling?

please tell me in detail.

0 Kudos

hi,

i checked for the attributes in both the system.

the fixed arithmetic was checked in development and was not checked in quality.

what does this mean?

so i unchecked in development and removed those decimal points but its still telling that overflow.

Former Member
0 Kudos

Hi Poonam,

This is because you have assigned a larger number in the smaller sized field.

The field NETPR is of Length 11, decimal 2. That means 9 digits for the number and 2 digits for decimals.

try:

data: v_variable type vbap-netpr value '999999999'.

See if it helps.

- Hemant

Edited by: Hemant Satpute on Sep 10, 2008 9:08 PM

muhammet_arslan
Discoverer
0 Kudos

Uncheck the "Fixed point arithmetic" checkbox in the main program.

Former Member
0 Kudos

Hello Poonam,

Could you please tell me your solution. I am also getting same error.

Regards,
Sangita