Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

To Convert TCURR-GDATU to normal date format

Hi All,

In TCURR table GDATU (Date As of Which the Exchange Rate Is Effective) field is in inverted date format. I want to convert it to normal date format and use it in an BI end routine.

Can you please check the code below and let me know if there are any errors.

TABLES: TCURR.

DATA: tcurr_tab TYPE TABLE OF tcurr.

FIELD-SYMBOLS

<tcurr_wa> TYPE tcurr.

SELECT gdatu FROM tcurr INTO TABLE tcurr_tab.

SORT tcurr_tab BY gdatu.

LOOP AT tcurr_tab ASSIGNING <tcurr_wa>.

CONVERT INVERTED-DATE <tcurr_wa>-gdatu

INTO DATE <tcurr_wa>-gdatu.

ENDLOOP.

Thanks,

Sri Arun Prian

Tags:
replied

one more correction

REPORT  ZTEST.

TABLES: TCURR.

DATA: tcurr_tab TYPE TABLE OF tcurr.
data: date_normal type sy-datum.
FIELD-SYMBOLS
<tcurr_wa> TYPE tcurr.

SELECT gdatu FROM tcurr INTO corresponding fields of

TABLE tcurr_tab.

SORT tcurr_tab BY gdatu.

LOOP AT tcurr_tab ASSIGNING <tcurr_wa>.
break-point.
CONVERT INVERTED-DATE <tcurr_wa>-gdatu
INTO DATE date_normal.  "you need to move that to normal date field
write:/ date_normal.      "you need to take a normal date field

ENDLOOP.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question