‎2008 Nov 11 4:42 PM
Hi guys,
Is there any Function module which provide us the number range between two numbers?
For Ex:If i give 1 and 10 to FM it must give me 1
2
3
4.....upto 10.
is there any FM for doing this,but i'm not able to find exact Fm for same.
I can write small piece of code for getting number ranges, but if i get FM it could save little work.
‎2008 Nov 11 4:47 PM
[NUMBER_GET_NEXT Get the next unique number in a number range. Use tcode SNRO for maintaining number ranges |http://www.sapdevelopment.co.uk/fmodules/fmssap.htm]
‎2008 Nov 11 4:47 PM
[NUMBER_GET_NEXT Get the next unique number in a number range. Use tcode SNRO for maintaining number ranges |http://www.sapdevelopment.co.uk/fmodules/fmssap.htm]
‎2008 Nov 11 4:59 PM
i don't want to create any object from SNRO.
simply i want to collect all numbers between two integers.
‎2008 Nov 11 5:04 PM
Hi
But why do u need a fm, can't you do it by yourself?
DATA: FROM_NUMBER TYPE I VALUE 1,
TO_NUMBER TYPE I VALUE 15.
DATA: NUMBER TYPE I.
DATA: BEGIN OF T_NUMBER OCCURS 0,
NR TYPE I,
END OF T_NUMBER.
NUMBER = FROM_NUMBER.
DO.
IF NUMBER <= TO_NUMBER.
T_NUMBER-NR = NUMBER.
APPEND T_NUMBER.
ELSE.
EXIT.
ENDIF.
NUMBER = NUMBER + 1.
ENDDO.
LOOP AT T_NUMBER.
WRITE: / T_NUMBER-NR.
ENDLOOP.Max
‎2008 Nov 11 5:09 PM
Max,
Yes I can,but i was looking for FM if there any.
I think i must go with code only.
‎2008 Nov 11 5:24 PM
Okay Guys,
i Guess No FM available for doing same.
Will update the thread if found any.
Right now i created Z function modle with custom code and used in program.
Thank you.
Amit.