Showing results for 
Search instead for 
Did you mean: 

Generate Gate pass number based on Plant number


Hi experts! Here's my scenario.

I've created a module pool screen in which I'll give inputs of materials loaded in the truck which is going from one plant to another. So, after giving inputs I click on save and a gate pass number should be generated based on plant.
Ex: Plant 1001 gate pass number range should be 10000001 to 19999999
Plant 2001 gate pass number range should be 20000001 to 29999999
Please help me with relevant documents or sample codes. Appreciate your help.

Accepted Solutions (1)

Accepted Solutions (1)

Active Contributor


You can create a number range in transaction SNRO with subobject data element WERKS_D.

Example (change number length domain to a domain for your gate pass number):

You can maintain the intervals for each plant:

Maintain a single interval 01 for each plant:

Use function module NUMBER_GET_NEXT to generate the next number in the interval (change object to your number range object and subobject to the plant you want to generate a number for):


Best regards,

Geert-Jan Klaps


Thank you for the response. I've done the same way and it worked. I appreciate it!


Sidda Sairam

Answers (0)