Application Development and Automation 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: 
Read only

How to rounding the integer value

Former Member
0 Likes
467

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
Read only

former_member188827
Active Contributor
0 Likes
438

try CEIL or FLOOR function

Read only

Former Member
0 Likes
438

define it as integer length 16th

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

Read only

former_member188827
Active Contributor
0 Likes
438

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.