2008 Jan 24 1:40 AM
Currently, I am putting the Get_Next_Number function in a loop.
-
LOOP AT DYN_CODE_TABLE INTO wa_lv.
*Store ID
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'ZHERA'
quantity = '1'
IMPORTING
number = l_number.
ENDLOOP.
-
Is it possible for me to set the starting number back to 0 when the loop ends and comes back to the loop again upon execution again?
2008 Jan 24 1:57 AM
Juzme,
This function module assigns the next free numbers of a number range. A number is assigned as a default if no larger number is demanded in the parameter QUANTITY. If more than one number is demanded and not enough numbers are available up to the interval limit, the numbers are only assigned up to the interval limit. If the last number was assigned, the first interval number is provided again during the next call.
If you are restting the number range and set the starting number back to 0 when the loop ends and comes back to the loop again upon execution again, the purpose of using this function module will be defeated.
Looks like your scenario does not need a call to this Function module.
Explain exactly your scenario, we'll try to help you.
Hope this helps
Vinodh Balakrishnan
2008 Jan 24 2:00 AM
Restting the number range only possbile thru tranx SNRO.
I have a question if you need to reset the number after loop then
l_number = 1
LOOP AT DYN_CODE_TABLE INTO wa_lv.
l_number = l_number + 1
ENDLOOP.
clear l_number..
is enough, then why you need number range?
a®