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

Overflow Problem

gouravkumar64
Active Contributor
0 Likes
850

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
Read only

former_member585060
Active Contributor
0 Likes
673

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               

Read only

Former Member
0 Likes
673

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.

Read only

0 Likes
673

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.

Read only

gouravkumar64
Active Contributor
0 Likes
673

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