Hi folks,
I have some value in a field 'count'. I want to check if the value in that field is even or not. I need to put a IF loop saying that if the value in 'count' is even then execute the loop. How can I do this.
I appreciate the efficient method to check this. Thanks
Waiting.............
hi
try using the below logic..
data even type i.
even = count mod 2.
if even eq 0.
<execute your loop here>.
endif.
Cheers,
Abdul Hakim
hi
has your problem solved??
Cheers,
Abdul Hakim
You can do something like this.
report zrich_0002 . data: i type i value 48. data: remainder type i. remainder = i mod 2. if remainder = 0. write:/ 'This is an even number'. else. write:/ 'This is an odd number'. endif.
Ooops, Abdul beat me to it.
Regards,
Rich Heilman
Message was edited by: Rich Heilman
Add a comment