INCLUDE
ARTICLE
Cannot Convert Dates
The statements CONVERT DATE and CONVERT INVERTED DATE are
not allowed.
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 .
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved