on 08-01-2011 4:22 PM
I have quite a few elements on a UI ELEMET type : TABLE that have the following attributes:
DataType :DEC
Length :14
Decimal Places :7
This attributes are nessesary to work out percentage and amount for a increase and needs to be 7 decimals to be able to do the calculation from any angle :
Take $12 353.00 with increase of $588.00 then the persentage will be : 4.7599773%
we have to store 4.7599773% on the data base, *but whould only like to display 2 decimals* in WEB DYNPRO
Regards
Thanks for the replies, but let me rephrase my query.
We have a Z-Table with a field that has 6 decimals places. we need this to make sure our calculations are correct. we then want to output this field in webdynpro , but it must only show 2 decimal places.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
G_DECIMAL_PLACES_GET
use above mentioned function module it you need to convert dec to currency then you need to use this function module.
or as per saran said u create the concept in function module then you can use that in Web Dynpro.
Thanks & Regards,
Srini.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I doubt whether webdynpro supports this functionality. But core ABAP does. Before populating the data into the context, you can do the conversion. For this you need to declare a local variable of type "P decimals 2" (data lv_percentage TYPE p DECIMALS 2). then you can assign the DB data into this variable and ABAP will do the implicity data conversion.
data lv_percentage type p decimals 2.
data lv_db_data type DEC.
lv_db_data = 4.7599773.
lv_percentage = lv_db_data.
BR, Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.