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

arithmetical expresion.

Former Member
0 Kudos
2,410

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

Former Member
0 Kudos
1,263

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

former_member194669
Active Contributor
0 Kudos
1,263

Hi,

check this link

Read only

Former Member
0 Kudos
1,263

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

.

Read only

Former Member
0 Kudos
1,264

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>

Read only

0 Kudos
1,263

DATA m TYPE p VALUE '5.55' DECIMALS 2.

DATA N TYPE P.

N = M / 100 * 100.

WRITE N.