Skip to Content
0
Former Member
Nov 28, 2008 at 02:11 PM

Problem with Routine in Transformation

13 Views

I have a routine that uses TIMECALC_DIFF to determine the difference between to date/times held in timestamp format.

All it generates is a duration of zero, no matter what the inputs are.

Value for YDATTIM is 20050812121821 and for YDATTIMF is 20050813121821 and the answer given is zero, when it should be 86400.

CONSTANTS: gc_timezone_system TYPE timezone VALUE 'MSTNO'.

DATA: t_first(14) TYPE c,

t_last(14) TYPE c,

/BIC/YDATTIM TYPE timestamp,

/BIC/YDATTIMF TYPE timestamp,

/BIC/YDATDUR TYPE i.

CALL FUNCTION 'TIMECALC_DIFF'

EXPORTING

timestamp1 = /BIC/YDATTIM

timestamp2 = /BIC/YDATTIMF

timezone = gc_timezone_system

IMPORTING

difference = /BIC/YDATDUR.

RESULT = /BIC/YDATDUR.

Thanks

Steve