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: 

How to rounding the integer value

Former Member
0 Kudos

Hi,

How to round the 16 digit value ,for that which function module used please suggest me.

ex:126578678623423.67 =126578678623424

126578678623423.37 =126578678623423

like that.

Thanks,

Hari,

3 REPLIES 3

former_member188827
Active Contributor
0 Kudos

try CEIL or FLOOR function

Former Member
0 Kudos

define it as integer length 16th

or if u use packed decimal data : a type p decimals 0.

former_member188827
Active Contributor
0 Kudos

data zint type p LENGTH 16 DECIMALS 2 value '126578678623423.67'.

data zround TYPE p LENGTH 16 DECIMALS 0.

data zint1 type p LENGTH 16 DECIMALS 2 value '126578678623423.37'.

zround = zint.

WRITE / zround.

zround = zint1.

WRITE / zround.