cancel
Showing results for 
Search instead for 
Did you mean: 

Currency field format in tableview

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Friend,

Search this forum.You can find lot of information relevant to your requirement.

[link1|;

[link2|;

[link3|;

[link4|;

With Regards,

SHARMILA BRINDHA.M

Former Member
0 Kudos

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.

former_member184111
Active Contributor
0 Kudos

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

Former Member
0 Kudos

This is not a problem of decimal format but a problem of different mask depending on currencies.

As I said display is ok in ECC so there is nothing to do in su01.

Replacing , by . is not sufficient. It depends on the edit mask of the currency. (see my exemple)

Former Member
0 Kudos

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

athavanraja
Active Contributor
0 Kudos

in my opinion the problem is stated very well. (by the way KRW is South Korean won ).

Regards

Raja