09-24-2008 11:40 AM
09-24-2008 11:43 AM
use d = 5 mod 2 now d will hold the value 1
data : d type i.
d = 5 mod 2.
write: d.
Edited by: Ashish Paliwal on Sep 24, 2008 4:14 PM
09-24-2008 11:43 AM
use d = 5 mod 2 now d will hold the value 1
data : d type i.
d = 5 mod 2.
write: d.
Edited by: Ashish Paliwal on Sep 24, 2008 4:14 PM
09-24-2008 11:43 AM
Use function MOD.
Data: nmod type i.
nmod = n1 MOD n2.
n1 and n2 are numbers.
09-24-2008 11:44 AM
Anjali
Use the MOD keyword.
ie REM = ITAB-LFIMG MOD L_SCMNG.
K.Kiran.
09-24-2008 11:45 AM
Hi,
Try this.
Make use of 'MOD' operator.
rem = 5 mod 2.
you will get the remainder in the variable rem.
Sharin.
09-24-2008 11:50 AM
Try this code
DATA : i TYPE i VALUE 5,
j TYPE i VALUE 2,
k TYPE i.
j = 5 MOD 2.
write 😕 J.
09-24-2008 11:55 AM
09-24-2008 11:57 AM
Rainer Hübenthal
write:/ 'the remainder of 5 divided by 2 is 1'.
Good one.
cheers : - )
09-24-2008 12:07 PM
09-24-2008 12:33 PM
Its working for me try as follows,
DATA : x TYPE n,
y TYPE n,
z TYPE n,
msg(50) TYPE c.
y = 5.
z = 2.
x = y MOD z.
CONCATENATE 'Remainder of' y 'Divided by' z 'is' x into msg SEPARATED BY space.
WRITE msg.
Regards
Karthik D