Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

FM to count of numeric and decimal places in float number

satya_devaraju
Explorer
0 Kudos
2,296

hi,

Is there any FM which will give the count of number of numeric and decimal places in a floating point number.

Example:

INPUT:

1,234560000000000E+03

OUTPUT:

Numeric = 4

decimal = 2

regards,

satya

6 REPLIES 6

Former Member
0 Kudos
297

This message was moderated.

0 Kudos
297

Hi Rimpa,

The question is not to chnage its display format but to count the digits, numeric an decimal.

кu03B1ятu03B9к

amit_khare
Active Contributor
0 Kudos
297

Check SAP Help on DESCRIBE statement.

Former Member
0 Kudos
297

Hi Satya,

To count decimals you can use :

DESCRIBE FIELD NUM DECIMALS DEC.

where NUM is the field ..DEC will giv the count for decimals present in number.

Thanks

Former Member
0 Kudos
297

Hi,

Refer below link.

Regards

Md.MahaboobKhan

satya_devaraju
Explorer
0 Kudos
297

thanks.. closing the thread