Hi all,

Can u please help me in solving the problem,

i have a value called 5987.45

and decimal places are 45 that is 2 numbers

2) 765.987

number of digits in decimals are 3.

3) 67543.1

number of digits in decimals are 1.

for this i need a coding

thanks.

Hi,

While printing your text element give as;

&wa_tab-dec_value(.2C)&

This will always print everything with 2 decimals.

Regards

Karthik D

You already have an active moderator alert for this content.

Use the FM SWA_DETERMINE_DECIMALS.

regards,

Ankur Parab

HI,

split your value at '.' into two variables and find the number of characters of the decimal part.

eg.

if value = '123.567'.

split value at '.' into integer_part decimal_part.

no_of_decimals = numofchar( decimal_part.) .

Use FM SWA_DETERMINE_DECIMALS to calculate the decimal count value.

Hope this may be useful..

Regards,

Prashant

## Add comment