‎2007 Sep 03 10:16 AM
what is all about sy-datum system variable...explain with simple example
‎2007 Sep 03 10:18 AM
‎2007 Sep 03 10:18 AM
Hi Balaji,
SY-DATUM is the system variable that holds the value of current date at runtime
WRITE : sy-datum.
It will give you 03.09.2007 for today
Thanks and Best Regards,
Vikas Bittera.
‎2007 Sep 03 10:18 AM
sy-datum contains the <u><b>SERVER</b></u> system date.
You can get more information about the system values if you go to SE11 and put SYST in the structures field.
The SYST structure has a lot of useful information related with the server, the environment and the application running, check it, you will learn a lot
BTW: in debugging mode, check for sy-datum to get that date, but if you want to get all the system fields, you must check SYST and not SY 😛
‎2007 Sep 03 10:21 AM
Hi,
Sy-datum contains today's date.
*Example1
data: v_date type sy-datum.
v_date = sy-datum.
write:/5 v_date.
*Example2
write:/5 sy-datum.
‎2007 Sep 03 10:24 AM
SY-DATUM : Local date of the SAP system. Can be set using GET TIME.
write SY-DATUM4(2) to datechar0(2).
write '/' datechar+2(1).
write SY-DATUM6(2) to datechar3(2).
write '/' TO datechar+5(1).
write SY-DATUM0(4) to datechar6(4).
Value of SY-DATUM 20010616
Here's how the field changes with the execution of each line.
06________
06/_______
06/16_____
06/16/____
06/16/2001
‎2007 Sep 03 10:26 AM
Hi,
It is the System field which stores Current Date. All the system fields are stored in table SYST. Check it.
SY-DATUM - System Date
SY-UZEIT - System Time
‎2007 Sep 03 10:30 AM
It will store the current date .You can get this value globally.It is stored in the SYST table , which the table for all system variables.
Kindly reward if it helps.
Thanks and Regards,
Anoop
‎2007 Sep 03 1:03 PM
hi balaji
Sy-Datum is nothing but pre-defined system variable,which gives you the current system date.
for eg...
REPORT ZPROG.
write : 'current system date :' ,sy-datum.
output:
current system date : 03.09.2007
REWARD IF USEFUL.........!!