We have a requirement from the customer as below-
BDENR field in the BLPK table get updated every time the production posting happens. The problem here is that if multiple users are accessing the same transaction at the same time, the BDENR number gets duplicated as currently we are using "last entry+1" logic in the z-program which is incorrect.
The requirement now is to use the SAP number range object to achieve the locking mechanism to avoid the duplication.
Now our problem is how the newly created number range should be in sync with the existing numbers in the production as the numbers gets updated on daily basis.
For eg. New number range will be from 1000 to 9999
The latest BDENR in production is for eg. 5000
Using this number range, next number to be updated in BDENR should be 5001 after moving changes to production.