Requirement: Generate serial numbers, used for the purpose of identification of a specific line item/custom field in a table (enhanced or created) and so on. I do not seek to elaborate on where serial numbering can be of use, only because doing it would project a wrong impression of gross under-usage.
Tables Affected: NRIV (Number Range Intervals)
Running the above transaction, takes us to the below screen.
I have created a data element in DDIC. This would be the object name for which the number generation happens. (It can also be the field of a table. The data element here is purely for the purpose of illustration).
The next screen requires us to enter the short text, long text, number length domain and warning percentage under specifications for customization. (Typically 10%). We might be inclined to enter the data element's name for which the Number Range Object is being created.
However, if the domain of the data element, does not have a value table, it is bound to give a message "Domain XYZ of Data Element ABC does not have value table". The best thing here is to leave the field "Subobject Data Element" BLANK.
Defining the Number Range.
SAP's documentation of an object for serial number maintenance goes like this "A number range object defines the characteristic attributes of commercially-related number range intervals, e.g. the length of the numbers, the division in subobjects, etc. A number range object is uniquely identified by its name. For example : MATERIALNR is the name of the number range object which defines the attributes of the material master number range interval".
Transactions: SNROTables Affected: NRIV (Number Range Intervals)
Running the above transaction, takes us to the below screen.
I have created a data element in DDIC. This would be the object name for which the number generation happens. (It can also be the field of a table. The data element here is purely for the purpose of illustration).
The next screen requires us to enter the short text, long text, number length domain and warning percentage under specifications for customization. (Typically 10%). We might be inclined to enter the data element's name for which the Number Range Object is being created.
However, if the domain of the data element, does not have a value table, it is bound to give a message "Domain XYZ of Data Element ABC does not have value table". The best thing here is to leave the field "Subobject Data Element" BLANK.
Defining the Number Range.
Click on Edit Intervals to maintain the range.
Choosing the checkbox makes it external numbering. "The number range intervals are not included in automatic recording of customizing changes. Transport of all the changes made within number range interval maintenance must be triggered manually."
The current number at any point can be reset as shown below.
Function Modules to determine the serial number:
- CVFA_NUMBER_DRAW_FROM_NUMRANGE
- NUMBER_GET_NEXT