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

num ranges in module pool prog

Former Member
0 Likes
849

Hi all,

i want to maintain a number range for my custom screen.

whenever i enter data in to the custom screen and press SAVE,it should create a automatic number and tht should b saved in the concern ZTABLE.

this screen belongs to Production Planning.

am maintaining this generated number as primary key in the ZTABLE.

any help will b rewarded with maximum points...

thanQ

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
681

First Read the Rules of Engagement.

Second:

Maintain a Number range Object for the field using the transaction SNRO.

Once it is done use the Number range object in your program.

How you will use..?

Call the Function NUMBER_GET_NEXT to generate the number, For this function you need to use the number range object created using SNRO,

Hi all,

i want to maintain a number range for my custom screen.

whenever i enter data in to the custom screen and press SAVE,it should create a automatic number and tht should b saved in the concern ZTABLE.

this screen belongs to Production Planning.

am maintaining this generated number as primary key in the ZTABLE.

any help will b rewarded with maximum points...

thanQ

3 REPLIES 3
Read only

Former Member
0 Likes
682

First Read the Rules of Engagement.

Second:

Maintain a Number range Object for the field using the transaction SNRO.

Once it is done use the Number range object in your program.

How you will use..?

Call the Function NUMBER_GET_NEXT to generate the number, For this function you need to use the number range object created using SNRO,

Read only

Former Member
Read only

Former Member
0 Likes
681

Hello,

(a) We need to create number ranges in transaction SNRO

(b) Enter the number range object name and press CREATE.

(c) Enter the description, Long text and Number Length domain andWarning %(when you are about to expire the number range a warning must be given eg:if the range is 1 to 100 and 90 is created we need to be notified that 90 is over and only 10 are remaining ..accordingly we should reset the number range or do other necessary actions..eg:10% => when it reaches 90 in number range of 1 to 100 message is displayed)

enter Number length domain..which is the length of the range eg:if we put "NUM10" as the domain(check in se11->domain->num10) we can declare an interval with 1 to maximum of 9999999999 or less than that according to our requirement

(d) Press SAVE

(e)Now click on u201CNumber Rangesu201D button on the application toolbar

(f) Click on u201CChange Intervalsu201D.

(g) Click on u201CInsert Intervalu201D.

(h) enter the range which needs to be created eg:1 to 100

Click u201CInsertu201D and then SAVE. The number range object is generated

in the program we can use the function module, NUMBER_GET_NEXT, to get the next number of any number range object.

Also keep in mind that number range NUMBER_GET_NEXT be called on the click of that 'SAVE' button just before updating the Ztable .incase we have any errors in the module pool we need not worry about accidently creating numbers... if the code is wriiten in 'SAVE' action after complete requirement checks the issue will no occur

Regards

Byju