‎2007 Oct 24 6:10 AM
Hi Experts,
Is it possible to decrement the sy-datum value?
Regards,
Keerthi vasan.M
‎2007 Oct 24 6:13 AM
HI,
u have to change the server date then it will be changed.
if u want to change programatically use as below.
data:dat type sy-datum.
dat = sy-datum - 1.
write:/ dat.
rgds,
bharat.
‎2007 Oct 24 6:12 AM
Hi,
In your program yes you can do that but it is not recommended to change the value of SYST fields.
Regards,
Atish
‎2007 Oct 24 6:13 AM
HI,
u have to change the server date then it will be changed.
if u want to change programatically use as below.
data:dat type sy-datum.
dat = sy-datum - 1.
write:/ dat.
rgds,
bharat.
‎2007 Oct 24 6:18 AM
hi,
You can move sy-datum value to a variable and then decrement it.
Reward points if useful.
Thanks and Regards,
Litta
‎2007 Oct 24 6:24 AM
No, you can not change system field value. Instead get SY_DATUM into a DATE variable and perform your operation.
ashish
‎2007 Oct 24 6:25 AM
HI Keerthi,
Move sy-datum value to variable type date and then decrement it by 1.
data : d_date type date.
d_date = sy-datum.
d_date = d_date - 1.
Regards,
Hemant
‎2007 Oct 24 6:33 AM
Hi,
You can change it in program
just try this
data date type d.
sy-datum = sy-datum - 1.
MOVE sy-datum TO date.
WRITE / date.
Regards,
Atish
‎2007 Oct 24 8:06 AM
The sy_datum can be decremented usign the following piece of code.
DATA date TYPE d.
[
date = sy_datum - 1.
]
or
[
sy-datum = sy-datum - 1.
MOVE sy-datum TO date.
]
WRITE ' The modified date is : ' , date.
Both the way will take you to the final desired result.
‎2007 Oct 24 8:15 AM
Hi Keerthi,
you can do like
ws_date = sy-datum - 1.
Reward if Useful.
Regards,
Chitra
‎2010 Dec 15 2:42 PM