‎2008 May 26 9:53 AM
Hey all ,
I am using below FM to get the timestamp,
CALL FUNCTION 'RKE_TIMESTAMP_CONVERT_INPUT'
EXPORTING
i_date = sy-datum
i_dayst = sy-dayst
i_time = sy-uzeit
i_tzone = sy-tzone
IMPORTING
e_timestmp = l_timestamp
EXCEPTIONS
date_invalid = 1
OTHERS = 2.
Now i want to add 30 mins more to the timestamp and need to change the date accordingly. Can anyone help me out in this.Thank yiou for your reply. Points will be rewarded.
l_timestamp + 30 will not work . Can anyone suggest me the method for this.
‎2008 May 26 9:56 AM
HI
RKE_TIMESTAMP_CONVERT_INPUT-E_TIMESTMP means seconds since 1/1/1970. so try to add 30*60 = 1800 seconds to it instead of only 30.
Regards
Aditya
‎2008 May 26 10:55 AM
Hey i tried to change this by using seconds but it wont work.Can give me better idea how can i increase this.
‎2008 May 26 9:57 AM
Hi,
Use class CL_ABAP_TSTMP.
DATA : l_tstamp TYPE timestamp,
l_tstamp_out TYPE timestamp.
GET TIME STAMP FIELD l_tstamp.
TRY.
CALL METHOD cl_abap_tstmp=>add
EXPORTING
tstmp = l_tstamp
secs = 3600 <<<===--- 1 hour = 3600 seconds
RECEIVING
r_tstmp = l_tstamp_out.
CATCH cx_parameter_invalid_range .
WRITE 'invalid range'.
EXIT.
CATCH cx_parameter_invalid_type .
WRITE 'invalid type'.
EXIT.
ENDTRY.
WRITE l_tstamp time zone 'UTC '.
SKIP.
WRITE l_tstamp_out time zone 'UTC '.Regards
Kannaiah
‎2008 May 26 11:09 AM
Hi Kannaiah Kavuri ,
I am using this but it is giving me the exception invalid range.. I dont understand what is going wrong.
‎2008 Jul 22 8:34 AM