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: 

arithmetical expresion.

Former Member
0 Kudos
1,459

Hi all...

I want to round the quantity.. so which arithmetic function should i use??

If I m using "round "

then below error is coming....

" The syntax for a method specification is "objref->method" or

"class=>method". "objref->method" or "class=>method". "

My code is following.,..

REPORT ZTEST1.

DATA N TYPE P DECIMALS 2.

DATA M TYPE P DECIMALS 2 VALUE '5.55'.

N = ROUND( M ). WRITE : / 'ROUND' , N.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
312

Hi Ankita Try this One.

DATA m TYPE p VALUE '5.55'.

CALL FUNCTION 'ROUND'

EXPORTING

decimals = 2

input = m

IMPORTING

output = m.

WRITE m.

<b>Dont Forget to Award points</b>

4 REPLIES 4

former_member194669
Active Contributor
0 Kudos
312

Hi,

check this link

Former Member
0 Kudos
312

REPORT ZTEST1.

DATA N TYPE P DECIMALS 2.

DATA M TYPE P VALUE '5.55' DECIMALS 2.

N = M.

WRITE: / 'ROUND', N ROUND 2.

Regards,

Maha

.

Former Member
0 Kudos
313

Hi Ankita Try this One.

DATA m TYPE p VALUE '5.55'.

CALL FUNCTION 'ROUND'

EXPORTING

decimals = 2

input = m

IMPORTING

output = m.

WRITE m.

<b>Dont Forget to Award points</b>

0 Kudos
312

DATA m TYPE p VALUE '5.55' DECIMALS 2.

DATA N TYPE P.

N = M / 100 * 100.

WRITE N.