2008 Oct 23 6:38 AM
Hi All,
The secanrio is like I have to update the time and date.Like in MKPF table i have fields CPUTM and CPUDT.so when an internal order get created it should check for the next "X" mins so that for next "X" if there is any new order has been created or not (i.e Sy-uzeit + X mins) and also display date that is eauql to sy-datum.How to code this in a very simple manner.Your answer will be very helpful.
Regards,
Swathi.K
Hi All,
The secanrio is like I have to update the time and date.Like in MKPF table i have fields CPUTM and CPUDT.so when an internal order get created it should check for the next "X" mins so that for next "X" if there is any new order has been created or not (i.e Sy-uzeit + X mins) and also display date that is eauql to sy-datum.How to code this in a very simple manner.Your answer will be very helpful.
Regards,
Swathi.K
2008 Oct 23 7:11 AM
Hi,
Sample code for your requirement;
data : lv_date type d, "date
lv_time type t, " time
lv_time_x type t, "time after x minutes
X type i. " minutes
lv_time = sy-uzeit. " current time
lv_time_x = sy-uzeit + ( X * 60 ). "convert minutes to seconds and add to time
lv_date = sy-datum. " current date.
* Now you can check as
if MKPF-CPUDt EQ lv_date and ( MKPF-CPUTM GT lv_time and MKPF-CPUTM LE lv_time_x )
* Statements here
Endif.You need to substitute sy-uzeit with CPUTM of the current order.
Revert back if you have any doubts.
Regards
Karthik D
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |