10-11-2008 11:23 AM
experts,
if sy-datum = 00000000.
does sy-datum = sy-datum + 1 implie adding 1 day ,
if so the value of sy-datum should be 01.01.0001
but the value of sy-datum is 02.01.0001.
what does it imply?
thanks in advance.
10-11-2008 11:35 AM
Hi there.
Yes, adding 1 to a date field means adding one day to it.
Date '01.01.0001' is like the time limit, so you cannot add 1 day to some date and the result being the fisrt day. Try to add 1 to '31129999' ... it's the same (you'll get all zeros).
Regards,
Valter Oliveira.
10-11-2008 12:09 PM
hi valter,
by your means of answer 00000000 does not have any significance, if so adding 1 to sydatum( = 00000000 ) is resulting in 02.01.0001,why is it so.
thanks in advance
10-11-2008 12:16 PM
by your means of answer 00000000 does not have any significance
That's correct. '00000000' for a date variable is it's not like initial value '0.00' for currency, because '0.00' is a relevant price (0 euros, is an offer!) but '00000000' is not even a date.
Regards,
Valter Oliveira.
10-11-2008 12:19 PM
10-11-2008 12:44 PM
OK, my last try
This is from sap help (arythmetic operation):
DATA: result TYPE string,
date TYPE d VALUE '20020704'.
result = + date.
The assignment is equivalent to a COMPUTE statement and sets result to the value "731036" - that is, the number of days since 01.01.0001.
Regards,
Valter Oliveira.
10-11-2008 1:14 PM