on 09-30-2008 10:57 AM
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?
Regards,
Priyanka Joshi
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'.
Regards,
Marc
SAP NetWeaver RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marc :
I have quick question for you. We have connected the Shopping Cart cube in BW to Tableau using the Tableau connector. The date is stored as a Key figure in the cube. In Tableau I see the date January, 17, 2014 as 735,251 as it is stored in the cube. How do I convert it back into a date format outside of SAP ? I need the logic so that I can do the same in SQL within Tableau.
For example: How do I convert 735,251 to 20140117 (January 17,2014) ?
Your help is greatly appreciated.
Best,
Jay
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.