on 03-23-2009 2:00 PM
Hi all,
I'm surprised to see that when displaying a currency field (with ref to a currency key) in a tableview, the format is not respected. This is a big problem for me because when I want to display the number 100.000 in KRW for exemple, it gives 1.000,00 instead of 100.000. Like if it was dollars.
When displaying this number in ECC I've the good formatting.
Do you know how to make the display stick to the currency format in sap ?
Sylvain
Hello Sylvain,
Yes you are right in your observation.
Normally SAP displays the amount field with respect of currency field. We pass the Amount field with the reference Currency field for respective amount conversion. In ALV output also it works in same way.
But in HTMLB: Tableview does not have any parameter for the currency as a reference field so that it can convert the currency field automatically.
I think we can use 'BAPI_CURRENCY_CONV_TO_EXTERNAL' for the currency conversion of amount field in the program then pass it to the HTMLB: Tableview for display.
Thanks,
Ashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
simple solution would be get the decimal places from TCURX for the currency & then....
data: total(20),
lc_tot_0 TYPE p DECIMALS 0,
lc_tot_2 TYPE p DECIMALS 2,
lc_tot_3 TYPE p DECIMALS 3.
WHEN 0 decimal .
lc_tot_0 = total1 * 100.
CLEAR: total.
WRITE lc_tot_0 TO total.
WHEN 2 decimal .
CLEAR: total.
lc_tot_2 = total1.
WRITE: lc_tot_2 TO total.
WHEN 3 decimal .
lc_tot_3 = total1 .
lc_tot_3 = lc_tot_3 / 10.
CLEAR: total.
WRITE: lc_tot_3 TO total.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
link1 is about configuring currency display in sap -> no use for me such it is already ok in ECC
link2 is about system settings and currency display -> no link with my question
link3 is about changing datatype for displaying currency in wdp java -> no link with my question
link4 is about ouput of currencies in abap program -> no link with my question
Have you read my question ?
If you have no idea how to do it please do not answer the question.
Hi Sylvain,
In SU01 , you can maintain the Decimal Notation field under defaults tab for the format of currency display , for your internet user.
Also you can replace the , with a . or vicevresa to display data in required format .
For eg.
replace ',' with '.' into ls_fields_row-value.
Regards,
Anubhav
Dear Sylvain,
Whatever your requirement may be, we can give general solution and maximum possibility to resolve the issue in a general way. What Anubhav and Sharmila mentioned is a general thing which suits to a Common server or client (ECC). You have represented something called KRW, whats that? Is that your server working on?
Whenever you post a query in SDN, you should be specific with your requirements like the version you are using, as SAP comes up with notes for each upgrade.
I do see some relevance on the links provided by Sharmila. The same issue happen to me and followed the same concept and it has been resolved. Whether your operating your display value (Currency) anywhere else? If yes change your code as mentioned by Anubhav. Based on your example only Anubhav has mentioned your code.
Regards,
Gokul.N
User | Count |
---|---|
86 | |
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.