‎2009 Oct 02 9:12 AM
Hi,
We have a small problem..
We have a standard class CL_ABAP_TSTMP and it is having a method TSTMP2SECS in it. And now I am finding the value of the parameter TSTMP in the method as 0 which is supposed to be the combination of date and time.
Can anyone suggest me what could be the reason or how to resolve it?
And also does it have any relevance with the SP levels.
Regards,
Narendra.
‎2009 Oct 02 12:28 PM
So how are you calling this method? If I do the below, it just works fine. But you do have to supply the timestamp beforehand yourself.
DATA: rt_tstmp TYPE tzntstmpl.
DATA: timestamp TYPE timestampl,
secs TYPE bgrfc_processing_time VALUE '3600'.
GET TIME STAMP FIELD timestamp.
TRY.
rt_tstmp =
cl_abap_tstmp=>add( tstmp = timestamp
secs = secs ).
CATCH cx_parameter_invalid_range .
CATCH cx_parameter_invalid_type .
ENDTRY.
WRITE:/1 'Timestamp :', rt_tstmp.
‎2009 Oct 02 12:28 PM
So how are you calling this method? If I do the below, it just works fine. But you do have to supply the timestamp beforehand yourself.
DATA: rt_tstmp TYPE tzntstmpl.
DATA: timestamp TYPE timestampl,
secs TYPE bgrfc_processing_time VALUE '3600'.
GET TIME STAMP FIELD timestamp.
TRY.
rt_tstmp =
cl_abap_tstmp=>add( tstmp = timestamp
secs = secs ).
CATCH cx_parameter_invalid_range .
CATCH cx_parameter_invalid_type .
ENDTRY.
WRITE:/1 'Timestamp :', rt_tstmp.