10-25-2006 2:22 PM
In which case we declare the date field by type Sy-datum or scal-date or type d.
10-25-2006 2:26 PM
Hi Johnn,
sy-datum current application server data ex 19981130
if you want to add a day
data : x like sy-datum.
x = sy-datum + 1.
Then x will have tommorow's date.
Thanks
Venki
10-25-2006 2:34 PM
You cannot declare field by TYPE Sy-datum.
But LIKE, because sy-datum isn't a type but a VARIABLE.
It is the system variable (in this case the date!).
"Sy" is the SYSTEM table of variable.
10-25-2006 2:37 PM
10-25-2006 2:42 PM
Hi John,
think, ther's no difference btw. scal-date and sy-datum
but what's about field TCURR-GDATU?
-> this is a field for invert date
(fm CONVERSION_EXIT_INVDT_OUTPUT)
A.
10-25-2006 3:22 PM
Hi,
difference is in output length and display format
1) data lv_date like sy-datum has output length
10 including separators like / or which
are user specific.
data lv_date like sy-datum
lv_date = sy-datum.
write lv_date.
output is 10/25/2006.
2) data lv_date type d has output length 8
data lv_date typew d
lv_date = sy-datum.
write lv_date.
output is 10252006 without separators.
Regards,
amole