cancel
Showing results for 
Search instead for 
Did you mean: 

WDA -- Numeric field output to 2 decimal places

john_vanheerden2
Discoverer
0 Kudos

Hi,

Can anyone let me know if there is an equivalent in WDA for:

Write:/ ITAB-FIELD decimals 2 OR

Modifying the FIeld-Catalog of an ALV to display 2 decimals.

Any assistance in this regard would be much appreciated.

Regards

John

Accepted Solutions (0)

Answers (2)

Answers (2)

john_vanheerden2
Discoverer
0 Kudos

Thanks for the reply Kris, but I dont want to change the field contents. I only want to display it with two decimal places, even though it is defined with four.

I need the contents of the field to remain the same as it is used in calculation further on in my development.

Regards

John

saravanan_narayanan
Active Contributor
0 Kudos

Hello John,

I dont think that there is a direct possibility in Webdynpro to truncate the decimals and display it. You can achieve this indirectly by creating an intermediate attribute in the context and store the truncated value in this new attribute.

BR, Saravanan

former_member199125
Active Contributor
0 Kudos

then in this case,

use two different attributes to store two values , one is actual value and another one for truncated value for dispaly purpose.

Regards

Srinivas

Former Member
0 Kudos

Hi John,

No need to change your content, use local variable get your content and add decimal places and display it.

Use above FM or Replace logic i think you get desired result. Try once.

Cheers,

Kris.

Former Member
0 Kudos

Hi John,

Try by using.. PP_CATT_CONVERT_DECIMAL_POINT for decimal points . OR

I think by declaring a CHAR data type and REPLACE ALL OCCURRENCES OF statement . try this.

Cheers,

Kris.