‎2008 Jul 22 8:28 AM
how do i can make field of a ztable to fire automatically with help of number ranges?
‎2008 Jul 22 9:01 AM
Hii!
Check out this link, may be this link will help you out
http://www.sap-img.com/ge003.htm
Regards
Abhijeet
‎2008 Jul 22 12:34 PM
hi,
Refer to this link.
http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa0331493111d182b70000e829fbfe/content.htm
Regards
Sumit AGarwal
‎2008 Jul 22 1:48 PM
Hi,
First create a number range object say ZNUMB with the help of transaction SNRO if you want a number range for your specific requirement. Assign its intervals as you would like it to have.
If the Z table is a transaction table( i.e. populated via a program) then while populating the value for the table use the function module "NUMBER_GET_NEXT" by passing the value of number range object you created( or you might also use the existing).
By calling this FM, each time a next number would be generated which can be used to make the particular field value generated on the fly.
please reward if useful.
rgds
MV
‎2008 Jul 23 11:50 AM
Hi Sourish,
Hope this will help you ,
In the 4.6x environment, SAP have included a number range generation
program just like those used for Purchase Order, Sales Order etc.
*
This SAP number range generation is an include program.
*
INCLUDE ZRANGENO.
*
Always have to be included in the main program data declaration
*
data: wnorange like INRI-NRRANGENR, "number range,
wsubobj like inri-SUBOBJECT, "sub object
wdocno(12).
*
Steps :-
1. Number range Sub Object must be maintain in table ZSGRP
You can used transaction SE16 to create a table entries.
2. Maintain number range and intervals in transaction code SNUM
*
Written by : SAP Basis, ABAP Programming and Other IMG Stuff
*
call function 'NUMBER_RANGE_ENQUEUE'
exporting
object = 'ZOWNNO' "Create with SNUM
exceptions
foreign_lock = 1
object_not_found = 2
system_failure = 3
others = 4.
if sy-subrc ne 0.
message e086 with 'Lock error' sy-subrc.
endif.
call function 'NUMBER_GET_NEXT'
exporting
nr_range_nr = wnorange
object = 'ZOWNNO'
subobject = wsubobj
importing
number = wdocno "Number generated by SAP
exceptions
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
internal_overflow = 6
others = 7.
if sy-subrc ne 0.
message e086 with 'Number Range' sy-subrc.
endif.
call function 'NUMBER_RANGE_DEQUEUE'
exporting
object = 'ZOWNNO'.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Regards,
Sreekar.Kadiri
‎2008 Jul 25 7:06 AM
Hi Sourish,
Check this url.
http://www.anyang-window.com.cn/abap-how-to-use-number-ranges39-function/
Regards,
Muneesh Gitta.
Edited by: Muneesh Gitta on Jul 25, 2008 8:07 AM