04-17-2012 7:47 AM
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..
04-17-2012 10:15 AM
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
04-17-2012 11:16 AM
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.
04-17-2012 11:25 AM
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.
04-17-2012 1:56 PM