2007 Nov 29 1:25 PM
hi guyz,
My requirement is populating all background jobs 30 mins before system time...
everything is fine when system time is more than half ...for example system 12:30 or more...if it system date less than 30
for example 12:02 ...my from time should be 11:32 but for some reason iam getting 11:28
My code for your reference....
***********************************************************************************
if ls_jselect-to_time+2(2) <= '30'.
ls_jselect-from_time0(2) = ls_jselect-to_time0(2) - 1.
ls_jselect-from_time2(2) = ls_jselect-to_time2(2) - 30.
concatenate ls_jselect-from_time+0(2)
ls_jselect-from_time+2(2)
ls_jselect-to_time+4(2)
into lv_from_time .
ls_jselect-from_time = lv_from_time.
else.
ls_jselect-from_time2(2) = ls_jselect-to_time2(2) - 30.
concatenate ls_jselect-to_time+0(2)
ls_jselect-from_time+2(2)
ls_jselect-to_time+4(2)
into lv_from_time .
ls_jselect-from_time = lv_from_time.
endif.
**************************************************************************
Thanks
2007 Nov 29 1:38 PM
hi,
it cannot calculate circular at least this way), change it:
if ls_jselect-to_time+2(2) <= '30'.
ls_jselect-from_time0(2) = ls_jselect-to_time0(2) - 1.
ls_jselect-from_time2(2) = ls_jselect-to_time2(2) <b>+</b> 30.
hope this helps
ec
hi guyz,
My requirement is populating all background jobs 30 mins before system time...
everything is fine when system time is more than half ...for example system 12:30 or more...if it system date less than 30
for example 12:02 ...my from time should be 11:32 but for some reason iam getting 11:28
My code for your reference....
***********************************************************************************
if ls_jselect-to_time+2(2) <= '30'.
ls_jselect-from_time0(2) = ls_jselect-to_time0(2) - 1.
ls_jselect-from_time2(2) = ls_jselect-to_time2(2) - 30.
concatenate ls_jselect-from_time+0(2)
ls_jselect-from_time+2(2)
ls_jselect-to_time+4(2)
into lv_from_time .
ls_jselect-from_time = lv_from_time.
else.
ls_jselect-from_time2(2) = ls_jselect-to_time2(2) - 30.
concatenate ls_jselect-to_time+0(2)
ls_jselect-from_time+2(2)
ls_jselect-to_time+4(2)
into lv_from_time .
ls_jselect-from_time = lv_from_time.
endif.
**************************************************************************
Thanks
2007 Nov 29 1:38 PM
hi,
it cannot calculate circular at least this way), change it:
if ls_jselect-to_time+2(2) <= '30'.
ls_jselect-from_time0(2) = ls_jselect-to_time0(2) - 1.
ls_jselect-from_time2(2) = ls_jselect-to_time2(2) <b>+</b> 30.
hope this helps
ec
2007 Nov 29 1:42 PM
Sudheer,
Use this,
REPORT ZTEST_TEST.
DATA : time type sy-uzeit.
data : time1(2) type c.
break akumar.
time = sy-uzeit.
time1 = time+2(2) - 30.
write : time.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = time1
IMPORTING
OUTPUT = time1
.
CONCATENATE time+0(2) time1 time+4(2) into time.
WRITE / time.Regards
Aneesh.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |