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 Problem

gouravkumar64
Active Contributor
0 Kudos

1)In smart forms i am passing one structure .within that i am putting 3 component endda , begda .component type is dats.Then i need difference of this two.For this i declare one field diff.component type is int1.But in run time it gives me error OVERFLOW when converting.

2)In first time run -736410 is the value in overflow but i did not put any value like this. from where it is coming?

3)kindly give me the new link of posting a thread/question in this  abap forum.if i am posting this in wrong location..

4 REPLIES 4

former_member585060
Active Contributor
0 Kudos

Hi,

    Check out the subtraction fields, i mean you you must have doing BEGDA - ENDDA, so the value is coming in negative.

Example :-

BEGDA = '20120301'.   " 03/01/2012

ENDDA = '20120416'.   " 04/16/2012

v_diff = ENDDA - BEGDA = 46.     "You must have using BEGDA - ENDDA.

Thanks & Regards

Bala Krishna               

Former Member
0 Kudos

Hi Gourav,

Change your datatype of difference component from int1 to int4. Then, this will work. int1 is short in length for the difference hence the error. So, change it to int4.

Hope this helps.

Regards,

Sindhu Pulluru.

0 Kudos

Sindhu has pointed out correctly

int1 can have max possible intiger is 255. If the differernce between two dates is greater that 255 days the it will overflow. use just  abap default type i or int4 as sindhu suggested.

gouravkumar64
Active Contributor
0 Kudos

My problem solved..Thanks all of you...