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 stamp

Former Member
0 Likes
1,024

hi,

is there a sy- field to get the timstamp(date+time).

1 ACCEPTED SOLUTION
Read only

former_member181966
Active Contributor
0 Likes
976

You can concatenate Sy-uzeit and Sy-datum ...

Also check out Sy-TZONE, Sy-DAYST ,Sy-DATLO

Sy-TIMLO,Sy-ZONLO.

There`s No field ( SY-TSTLO ) .. 4.7

I code the Field and also check it in SYST ...

USE the FM "CACS_DATE_GET_TIMESTAMP"

BWFIT_UPDATE_TIMESTAMPS

BWOMT_UPDATE_TIMESTAMPS

CACS_DATE_GET_TIMESTAMP

CFM_TR_BIW_UPDATE_TIMESTAMPS

FRE_CONVERT_DATE_TO_TIMESTMP Convert Date to Timestamp

PPELIHDR_UPDATE_TIMESTAMP

Thanks

Message was edited by: Saquib Khan

8 REPLIES 8
Read only

Former Member
0 Likes
976

SY-TSTLO

Message was edited by: chandrasekhar jagarlamudi

Read only

0 Likes
976

hi,

there is no such field in syst table.

Read only

0 Likes
976

How did u check out in SYST , it is a structure

u can try like this...

DATA: l_datum LIKE sy-datum, " Date

l_uzeit TYPE t, " Time

l_ctime LIKE sy-uzeit, " Current time

l_tstmp TYPE timestamp, " Time Stamp

CONVERT DATE l_datum

TIME l_ctime

INTO TIME STAMP l_tstmp TIME ZONE sy-zonlo.

Message was edited by: chandrasekhar jagarlamudi

Message was edited by: chandrasekhar jagarlamudi

Read only

0 Likes
976

Hi,

You can try this if u hate to concatenate sy-datum & sy-uzeit..


report  zptest21                                .



data:
  s_tst type timestamp,
  l_tst type timestampl,
  tzone type timezone.

get time stamp field s_tst.    "short form
get time stamp field l_tst.    "long form
tzone = 'UTC   '.                   "time zone

write: / s_tst time zone tzone,
       / l_tst time zone tzone.

Regards,

Suresh Datti

Read only

0 Likes
976

thanks.

my task was to subtract x number of minutes

from sy-uzeit by still keeping the correct date.

thanks

Read only

0 Likes
976

and for that i was doing like:

v_t = sy-uzeit - x.

if v_t gt sy-uzeit.

v_d = sy-datum + 1.

endif.

select * from x

where date eq v_d

and time ge v_t.

***

and i wanted to eliminate this if i had a better option...

Read only

0 Likes
976

as X is in minutes , ucannot directly subtract it from sy-uzeit , convert it to seconds and subtract

<b>x = x * 60.</b>
v_t = sy-uzeit - x.
if v_t gt sy-uzeit.
v_d = sy-datum + 1.
endif.

Read only

former_member181966
Active Contributor
0 Likes
977

You can concatenate Sy-uzeit and Sy-datum ...

Also check out Sy-TZONE, Sy-DAYST ,Sy-DATLO

Sy-TIMLO,Sy-ZONLO.

There`s No field ( SY-TSTLO ) .. 4.7

I code the Field and also check it in SYST ...

USE the FM "CACS_DATE_GET_TIMESTAMP"

BWFIT_UPDATE_TIMESTAMPS

BWOMT_UPDATE_TIMESTAMPS

CACS_DATE_GET_TIMESTAMP

CFM_TR_BIW_UPDATE_TIMESTAMPS

FRE_CONVERT_DATE_TO_TIMESTMP Convert Date to Timestamp

PPELIHDR_UPDATE_TIMESTAMP

Thanks

Message was edited by: Saquib Khan