2021 Nov 01 10:01 PM
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 ?
2021 Nov 02 6:50 AM
Have you tried CL_ABAP_TSTMP=>MOVE method?
BTW, I found one SAP Note that fix same issue in standard program:
2160267 - hybris call: wrong timestamp rounding
Maybe the correction of this note could give you some hints.
2021 Nov 02 6:50 AM
Have you tried CL_ABAP_TSTMP=>MOVE method?
BTW, I found one SAP Note that fix same issue in standard program:
2160267 - hybris call: wrong timestamp rounding
Maybe the correction of this note could give you some hints.
2021 Nov 02 7:22 AM
Hi tom.wan ,
thanks, that looks very good, as this is also used by CL_ABAP_TSTMP=>MOVE_TO_SHORT .
I just didn't notice this because of the very generic signature...
The correction instruction do a normalize first and then the move, however directly after add/substract this seems unnecessary to me.
Regards,
Wolfgang