Skip to Content

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

How to convert DEC value to Date

Hello experts,

In BPS, I wanted to accept Date value with Layout settings 'From Transaction Data' so I created one 'Key figure - ZPOSTDT' of type 'DATE' with DEC as Data type.

When user enters value, ZPOSTDT field accepts it as a Date and stores in the Transactional cube as DECIMAL value.

But I want to use ZPOSTDT value as Date in my report.

I have searched in Forum to convert Decimal to Date but no direct CODE SNIPPET or FUNCTION MODULE is available.

I tried to convert DEC to STRING and then to DATE but it is also not giving me desired result.

Please tell me how to do it in ABAP code?


Priyanka Joshi

Former Member

Hi Priyanka,

it's simpler than you think.

data: l_date_dec(9) type p decimals 2, l_date type d.
l_date_dec = '733373.00'.
l_date = l_date_dec. 
* now l_date = '20081126'.



SAP NetWeaver RIG

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