# Get decimal part of KBETR, some FModule?

Hi there ABAP-mates

I've got a small problem. I've got a kbetr number, let's say 421,10 ...

... now I'd like to detect if two of characters after comma are = '00' or not= '00' ...

... I know I can cast it to strings and then check last 2 characters ...

... but maybe there is some other, more professional way to do this? Do You know such FModule which would give me the decimal part of kbetr number?

I'd be thankful for help. Greetings.

##### Former Member replied

Hi,

You can use the function FRAC..

Check this example

DATA: l_input TYPE kbetr. DATA: l_decimals TYPE kbetr. * Get the input l_input = '421.10'. * Get the decimals. l_decimals = FRAC( l_input ). * Check if it is initial. IF l_decimals IS INITIAL. WRITE: / 'No decimal values found'. ELSE. WRITE: / 'Decimal values found', l_decimals. ENDIF.

Thanks

Naren