‎2009 Aug 04 4:34 PM
Hello everyone,
I want to know that how can we make use of these two system functions SY-TIMLO, SY-DATUM ?
What should i write in data? pbo? pai?
Should i write something like this in data?
DATA: Ok_date TYPE SY-DATUM.
DATA: Ok_time TYPE SY-TIMLO.
What should i write in pbo and pai and should i need to make changes in screen elements? do i need to create one?
Please guide and explain with an example. Thanks a lot for writing back.
Regards,
Lucky
Moderator message - Please ask a specific question - post locked
Edited by: Rob Burbank on Aug 4, 2009 12:14 PM
‎2009 Aug 04 4:43 PM
HI,
These are system variables used to hold the date and time. The way you have defined are correct. If you are using a module pool and want the output to display the cuurent date and time as soon as you run the program , just create 2 input box on the screen and set their time as DATS and TIMS for date and time type variables. In the PBO module simply write
ok_date = sy-datum
ok_time = sy-timlo.
for time you may also use sy-uzeit.
Regards,
Sachin
‎2009 Aug 04 4:57 PM
actually i wanted to know how do i make use of them in dialog programmin pbo and pai modules.. it sounds confusin though i only know how to use sy-ucomm in pai and pbo stuff..
thanks for writing back.
Regards,
Lucky
‎2009 Aug 04 4:59 PM
Hi,
create two variables in the top include..
data :P_date type Sy-datum default sy-datum,
p_time type sy-uzeit default sy-uzeit.
---
Next go to screen and enter table syst...
and select datum and uzeit and drag to screen..
and rename the field to p_date for syst-date and p_time for syst-uzeit.
Prabhudas
‎2009 Aug 04 5:11 PM
this one sounds useful i will try that.
thanks both of you for writing back.
Regards,
Lucky