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

DIVISON

Former Member
0 Likes
1,075

Hi Everybody,

I want to divide the number 10 by 3. so the reminder is one. How can i get this reminder. thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,043

Hi vijay,

chk this DEMO program DEMO_DATA_CALCULATE for all arithmetic calculations

7 REPLIES 7
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
1,043

Hi

10 mod 3 will give remainder as 1.

Regards,

kumar

Read only

Former Member
0 Likes
1,043

Hi,

do this way

v_result = 10 mod 3..

regards,

santosh

Read only

0 Likes
1,043

v_remainder = v_from MOD v_divisor.

Read only

Former Member
0 Likes
1,043

Hi,

use 10 MOD 3.

reward if useful.

Read only

Former Member
0 Likes
1,043

Use arithmetic functions( operators ) like DIV,MOD .to get the remainder and quotient.

+ Addition of operands 1 left to right

- Subtraction of the right from the left operand 1 left to right

  • Multiplication of operands 2 left to right

/ Division of the left by the right operand 2 left to right

DIV Integer portion of the division of the left by the right operand 2 left to right

MOD Integer remainder of the division of the left by the right operand 2 left to right

    • Exponentiation of the left with the right operand 3 right to left

Please reward if useful.

Read only

Former Member
0 Likes
1,044

Hi vijay,

chk this DEMO program DEMO_DATA_CALCULATE for all arithmetic calculations

Read only

Former Member
0 Likes
1,043
DATA: pack TYPE p,
      n TYPE f VALUE '10',
      m TYPE f VALUE '3.
pack = n MOD m.
WRITE / pack.

ULINE.

hope this helps.