Application Development and Automation 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: 
Read only

Generate Next Number

Former Member
0 Likes
1,102

Hello friends,

I have built a custom table and this table has the material number field. CUSTOM field, ZMATNR.

We fill data into this table by a program and this program has to generate a new number next in sequence and insert this number into this table in the field ZMATNR.

I guess I can use the FM - NUMBER_GET_NEXT to generate the next number but am not sure as how would this help me.

ANy suggestions.

Ster

Function module Documentation covers every thing check it once

Edited by: Vijay Babu Dudla on Dec 3, 2008 10:24 PM

Hello friends,

I have built a custom table and this table has the material number field. CUSTOM field, ZMATNR.

We fill data into this table by a program and this program has to generate a new number next in sequence and insert this number into this table in the field ZMATNR.

I guess I can use the FM - NUMBER_GET_NEXT to generate the next number but am not sure as how would this help me.

ANy suggestions.

Ster

Function module Documentation covers every thing check it once

Edited by: Vijay Babu Dudla on Dec 3, 2008 10:24 PM

3 REPLIES 3
Read only

Former Member
0 Likes
803

I guess you could start by reading the FM documentation. It's pretty good.

Rob

Read only

0 Likes
803

HI,

for this u need to create an entry in SNRO transaction with the field of the ztable and maintain a number range there and call the above Fm.it works.

Read only

Former Member
0 Likes
803

Hi,

I think you can generate next number without using FM.

first, you need to select the max material number in the table and then add 1 to it, last you can save it in the table.

You can have a try if you are not familar with that FM.

Regards,

Chris Gu