SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
Cannot Convert Dates
An error message occurs in ABAP Objects if the following syntax is used:
CONVERT DATE f1 INTO INVERTED-DATE f2.
CONVERT INVERTED-DATE f2 INTO DATE f1.
Correct syntax:
CONSTANTS comp_nine(20) TYPE c VALUE '09182736455463728190'.
f2 = f1.
TRANSLATE f2 USING comp_nine.
f1 = f2.
TRANSLATE f1 USING comp_nine.
Reason:
Date conversions are used mainly to influence the sort direction in internal tables.
This function can be replaced by the additions ASCENDING or DESCENDING
of the statement SORT. If required, you can easily program the nines complement yourself using TRANSLATE.