Today, we will learn how to get decimal and integer part from a decimal number in ABAP SAP.
you can use standard macros to find the integer part and decimal part from a decimal number.
1. To get interger part use TRUNC( "decimal number" )
2. To get decimal (fractional) part use FRAC( "decimal number" )
Example:
Data: deci_number type P decimal 3.
Data: int_part type i.
Data: deci_part type p decimal 3.
int_part = TRUNC( deci_number ).
deci_part = FRAC( deci_number ).
0 comments:
Post a Comment