10-04-2008 5:53 AM
Hi all...
Suppose i am creating Z-table of and suppose emp_number is primery key.... If i want to create employee no which is not there in table....is there any inbuilt function to generate unique no to insert into the table as primery key?
..Thanks..
..Ashish
10-04-2008 9:55 AM
Define a number range and use that to supply unique numbers.
Have a look at transaction SNR0
10-04-2008 2:29 PM
Hi,
The Following Link shows how to create Number range:
http://www.saptechnical.com/Tutorials/ABAP/SNRO/SNRO.htm
Thanks,
Sree.
Edited by: t sree on Oct 4, 2008 3:32 PM
10-04-2008 4:13 PM
Hi,
On one way you can create unique number by selecting the maximum employee number before creation of a record and then increment one to assign to the new record.
The other way you can create a number range in tcode SNRO and use FM NUMBER_GET_NEXT to get the next number from the number range.
Search SDN with NUMBER_GET_NEXT, you will get example codes.
Regards
Karthik D
08-08-2009 10:48 AM