Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Number range generation

Former Member
0 Kudos

Hi All,

I want to use number range generation (tcode: SNRO) for generating numbers for my custom database primary key purpose.

Can anybody give me clear idea about number generation.

Please help its urgent. .........

Thanks in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

FM NUMBER_GET_NEXT will be useful.

cheers,

7 REPLIES 7

Former Member
0 Kudos

Hi,

Create a serial number range object in SNRO transaction(give 01 in starting number) and every time you want a new number you can call the <b>NUMBER_GET_NEXT</b> function.

CALL FUNCTION 'NUMBER_GET_NEXT'

EXPORTING

nr_range_nr = '01' (or pass the Variable)

object = 'ObjectName'

IMPORTING

number = number.

http://www.erpgenie.com/sap/abap/code/abap33.htm

Regards

Sudheer

Former Member
0 Kudos

Hi,

This can be done by creating a number range object for the domain/dataelement of the field from SNRO/SNUM transaction, and in the program you have to use FM NUMBER_GET_NEXT to get the next available number,

Rgds,

Former Member
0 Kudos

FM NUMBER_GET_NEXT will be useful.

cheers,

Former Member
0 Kudos

Hi,

by using SNRO you will have 3 options coming to u.

By the 1st option, u can create the new interval range from sya 0... 99999 etc..

Using second option, u can change the existing number range, incase the existing one gets exhausted by usage.

By the trhird option, you can delete the existing number range..

It's upto u you can decicde any number range.. One more point to notice is that you can have External & Internal number rnage assignment.. E.g., in case of MM Module, generally, the PO, RFQS, etc.. are generated by it own (i.e., the no is assigned to it once you save the new PO, RFQ etc...) Or otherwise, incase u assign external number range, the new avaialable number will be taken from the interval and will be provided to the newly created document (E.g., MAterial, PO, RFQ , etc..)

I hope i am clear.

Please provide atmost points.

thanks

rams

Former Member
0 Kudos

Hi,

use SNRO transaction to create number range

object and use Fm number_get_next to get increment value

Regards

amole

Former Member
0 Kudos

check this link for number range creation,getting next no etc.. ways

http://www.sap-img.com/ge003.htm

Regards,

Srikanth

Former Member
0 Kudos

Hi Guru,

U can use this FM-

CALL FUNCTION 'NUMBER_GET_NEXT'

EXPORTING

nr_range_nr = '01'

object = 'AUFTRAG'

IMPORTING

number = number.

Thanks & Regards,

Seema.