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 get internal number

Former Member
0 Kudos

Hi all,

Pls tell me how to get internal number in a field defined on the screen.

The screen is a customised screen which opens when we run a Z transaction and the field is also a user defined numeric type.

I want to get a new number each and every time the transaction is run or after an event is fired.

Thank You,

Regards,

4 REPLIES 4

romanweise
Active Contributor
0 Kudos

Hello Vijendra,

for internal number assignment you have to create a number range object. This is done by the transaction SNRO. Creating a number range object offers a lot of options to generate numbers depending on grouping category or depending on the year. But for a first try specifying the Domain for the Nuber range according to the field you want to fill and setting the warning percentage should do it. You can consider the other option later they are only confusing if you are new to the topic.

Next you define a number interval for the number range object. This can also be done in SNRO just use the GoTo Menue.

To get a number in your application you can use function module NUMBER_GET_NEXT. It is getting a new number every time you call it.

Hope that helps.

Rgds.

Roman

Former Member
0 Kudos

learn more about the SAP Internal number range object here:

http://www.saptechnical.com/Tutorials/ABAP/SNRO/SNRO.htm

0 Kudos

I Tried the example..its giving the error as number 01 does not exists

Former Member
0 Kudos

Hi,

Go to,

Screen->Element list->General attributes->remove the Unselect the Input check box.

Now, the user can't enter any values into this filed. And, in the program.

Casy SY-UCOMM.

When 'SAVE'.

<b>WA-Num = Num + 1.</b>

WA-...

Insert ZTAB from WA.

endcase.