2007 Jan 24 7:27 AM
how to use number_get_next using snro .can u tell me briefly
thanks in advance
1) Goto Tcode SNRO
2) select ur concerned OBJECT there.
3) Click on Number Ranges Push Button.
4) then click on Display Interval Button over there.
2007 Jan 24 7:30 AM
2007 Jan 24 7:31 AM
1) Goto Tcode SNRO
2) select ur concerned OBJECT there.
3) Click on Number Ranges Push Button.
4) then click on Display Interval Button over there.
2007 Jan 24 7:32 AM
2007 Jan 24 7:33 AM
Hi,
Create a Number range object in SNRO and assign the number ranges.
While saving the custom module pool program, call the FM Number_Get_Next and pass the parameter number range object and number range NR.
number range NR is nothing but the number , that you have given for the range of numbers.
Regards,
2007 Jan 24 7:39 AM
Hi ajay,
Create number range object using OYSN.
Then call the following function modules.
FORM get_next_id CHANGING p_discrep.
DATA: last_id LIKE zrecaudit-discrep,
quant LIKE inri-quantity, "dummy
code LIKE inri-returncode. "returncode
CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'
EXPORTING
object = 'ZRECAUDIT'
EXCEPTIONS
foreign_lock = 1
object_not_found = 2
system_failure = 3
OTHERS = 4.
IF sy-subrc = 0.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'ZRECAUDIT'
IMPORTING
number = last_id
quantity = quant
returncode = code
EXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8.
CALL FUNCTION 'NUMBER_RANGE_DEQUEUE'
EXPORTING
object = 'ZRECAUDIT'
EXCEPTIONS
object_not_found = 1
OTHERS = 2.
ENDIF.
ENDFORM. " get_next_id
2007 Jan 24 8:08 AM
Hi,
Let me tell you in brief how to use number_get_next.Pls copy the below code
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = gc_nr
object = gc_nr_obj
IMPORTING
number = lv_obj_id
EXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8.
Before using this code dont forget to declare gc_nr and gc_nr_obj.Now go to snro transaction and create a number range object and specify the intervals.Now onwards every time you invoke the function module the value gets incremented by 1 and will be stored in the variable lv_obj_id.Let me know if you still have doubts.
Pls reward points if found useful.
Thanks
Shyam
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |