Skip to Content
0
Nov 01, 2021 at 10:01 PM

Invalid values can result when rounding from "TZNTSTMPL" to "TIMESTAMP": what to do in 750?

162 Views

In S/4HANA I get a warning when eg assigning the result of cl_abap_tstmp=>add to a timestamp typed variable: "Invalid values can result when rounding from type "TZNTSTMPL" to type "TIMESTAMP"

The longtext of the warning suggests to use CL_ABAP_TSTMP=>MOVE_TO_SHORT or CL_ABAP_TSTMP=>ADD_TO_SHORT which are not available in in NetWeaver 7.50 .

Any suggestions what to do best in NetWeaver 7.50 to avoid the mentioned possible problems (eg 20001231235959.7500000 getting rounded to 20001231235960 which is not a valid timestamp)? Something involving ROUND with mode=ROUND_DOWN ?