Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

time

Former Member
0 Likes
429

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

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
402

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

2 REPLIES 2
Read only

JozsefSzikszai
Active Contributor
0 Likes
403

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

Read only

Former Member
0 Likes
402

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.