‎2010 May 24 11:53 PM
Hi Gurus,
Is there a way to get the multiples for a number? Any FM?
For example:
For number 12, multiples would be: 12, 24, 36, 48, 60, etc.
I have been looking what found nothing.
Hope you can help me.
J. Garibaldi
‎2010 May 25 10:41 AM
Hi!
try something like this
DATA: aux TYPE i,
num type i.
aux = 2.
num = 0.
DO 10 TIMES.
num = num + aux.
ENDDO.
‎2010 May 25 12:19 AM
Hi,
It´s impossible. The multiples of a number are infinite.
(may you are talking about the divisors of a number?)
Best regards,
Leandro Mengue
‎2010 May 25 10:41 AM
Hi!
try something like this
DATA: aux TYPE i,
num type i.
aux = 2.
num = 0.
DO 10 TIMES.
num = num + aux.
ENDDO.
‎2010 May 27 12:34 AM
Thanks for your replys, but I get a way to confirm if a number is multiple of other one.
First divide this two number (number i want to know if is mutiple / base number). Then check if the result is an integer..if it is, then I can say, the number is multiple of base number 😃
Weird...but my way. 😃
‎2022 Oct 05 5:36 PM
Hi,
You can try something like this:
CONSTANTS: lv_base TYPE i VALUE 12.