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: 

How to create a sequence in ABAP?

Former Member
0 Kudos

Hi guys,

we have a requirement to create some data in a FM and every document must have a unique sequential number. How to achieve this?

Numbering should be in a format 0009561544 (so 10 chars) and should start from 0001000000.

One option would be to create a table with one value and read and increase it's value each time it is called.

Is there any other option how to achieve it?

Thank you,

Olian

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Number ranges - transaction SNRO.

Rob

4 REPLIES 4

Former Member
0 Kudos

Number ranges - transaction SNRO.

Rob

0 Kudos

Hi Rob,

thank you for the answer.

Can you please tell me more details about it? When I create a number range object, how can I retrieve a current value and increase it from a FM?

Thanks,

Olian

0 Kudos

Look [here.|http://help.sap.com/saphelp_47x200/helpdata/EN/2a/f9ff44493111d182b70000e829fbfe/frameset.htm]

Rob

Former Member
0 Kudos

Create a number range object using transaction code SNRO.

Then in the program use function module NUMBER_GET_NEXT to get the next number by passing the above created number range object.

Regards,

Kiran Bobbala