dat2 = dat1.
TRANSLATE dat2 USING '09182736455463728190'.
Do not mistake the variant of the statement CONVERT DATE shown
here with the statement CONVERT
DATE ... INTO TIME STAMP used for creating time stamps.
Example ABAP Coding The following program section sorts the internal table
sflight_tab in descending order by the fldate column.
DATA sflight_tab TYPE TABLE OF sflight.
FIELD-SYMBOLS <(><<)>sflight_wa> TYPE sflight.
SELECT * FROM sflight INTO TABLE sflight_tab.
LOOP AT sflight_tab ASSIGNING <(><<)>sflight_wa>.
CONVERT DATE <(><<)>sflight_wa>-fldate
INTO INVERTED-DATE <(><<)>sflight_wa>-fldate.
ENDLOOP.
SORT sflight_tab BY fldate.
LOOP AT sflight_tab ASSIGNING <(><<)>sflight_wa>.
CONVERT INVERTED-DATE <(><<)>sflight_wa>-fldate
INTO DATE <(><<)>sflight_wa>-fldate.
ENDLOOP.
The last nine lines can be replaced by a single line:
SORT sflight_tab BY fldate DESCENDING.
Runtime Exceptions
Non-catchable Exceptions
Reason for error: Conversion not possible due to invalid field length
Runtime error: CONVERT_ILLEGAL_CONVERSION
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved