Wht is function of MOD?
Pls. let me know that, Wht is the function of MOD, I got the info from SAP Help, as below, but, I did not understand. pls. let me clarify,
*I hv statemnt like, SUM = SUM MOD 43
DATA: SECONDS TYPE I,
TIME_FROM TYPE T VALUE '200000',
TIME_TO TYPE T VALUE '020000'.
SECONDS = ( TIME_TO - TIME_FROM ) MOD 86400.
SECONDS has the value 21600 (6 hours). The "MOD 86400" operation in this example ensures that the result is not negative, even if the time period spans midnight.
Edited by: Srinivas on Mar 25, 2008 3:45 PM
Ahmed Khan replied
MOD is nothing but ,it gives the value of the reminder. That's it.
Check the code below for better understanding.
When 101 MOD 10 is the stmt it gives the result as 1, because when 101 is divided by 10 it gives reminder as 1.
data: a type i value 101,
b type i.
b = a mod 10.
write : b.
Thanks & Regards,
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Mar 25, 2008 5:10 PM