Sunday, August 31, 2025

DTP runtime:739444Days 12H 59m 29s?

Recently I encountered a strange DTP runtime figure. The runtime value was displayed in the DTP monitor screen and when I saw it, I rolled up my eyes. The duration of the DTP runtime was 739444Days 12H 59m 29s.

That looked really strange to me. When I debug it I saw that the duration is calculated by FM RSSM_SUBSTRACT_TIMESTAMPS. The FM is called by a method TSTMPS_TO_DURATION in ABAP class CL_RSDSO_MNG_TSN_UTIL.

What the FM is using is to provide a values of the duration in days/hours/minutes/seconds. How it calculates it is basically just a subtraction from the two timestamps: the starting and finishing one. There is one more FM involved in this calculation - RSSM_CONVERT_TIMESTAMP2DAYSEC. That one is counting with a date that is equal to '00010101'. This date is basically the first January of the year 0001 (year one).

What could happen in my case is that for my request the starting timestamp was not available for the calculation for whatever reason. Thus, the BW system based duration’s calculation starting at time the vey morning ('000000') of the first January of the year 0001 ('00010101'):

 

  DATAl_c_datum TYPE d VALUE '00010101'

        l_c_time TYPE t VALUE '000000'.

 

As I ran the DTP on 13th of June 2025, the difference between that data and date year one is 739444Days. Plus, there were some hours/minutes/seconds added.