2008 Aug 04 4:17 PM
hi,
i need sequence numbers for a field. there r two ways i can do this...
create an object in SNRO and use
CALL FUNCTION 'NUMBER_GET_NEXT'
or
creat a custom table where i maintain the current number and the next number.
which is a better approach ? does any have adv/disadv over the other ?
thks
2008 Aug 04 4:21 PM
The first is the best way to do it, why? Becasue that is how SAP does it. Most every genreated number in R/3 uses the number range object approach. It supports buffering, and locking automatically so you don't have to worry about this in your custom table. Use the number range object and the function.
Regards,
Rich Heilman
The first is the best way to do it, why? Becasue that is how SAP does it. Most every genreated number in R/3 uses the number range object approach. It supports buffering, and locking automatically so you don't have to worry about this in your custom table. Use the number range object and the function.
Regards,
Rich Heilman
2008 Aug 04 4:21 PM
The first is the best way to do it, why? Becasue that is how SAP does it. Most every genreated number in R/3 uses the number range object approach. It supports buffering, and locking automatically so you don't have to worry about this in your custom table. Use the number range object and the function.
Regards,
Rich Heilman
2008 Aug 04 4:21 PM
Just use the standard way SAP Provides using SNRO. Advantage is the fact that you don't have to create custom development objects and SAP provides all the standard functionality like number range buffering, different ranges to be maintained, standard FM like (NUMBER_GET_NEXT).
2008 Aug 04 4:22 PM
create an object in SNRO and use
CALL FUNCTION 'NUMBER_GET_NEXT'
is used by standard programs.
so when ever you want to update new number you need to call the Function using the Object created in SNRO.
creat a custom table where i maintain the current number and the next number.
But for Normal Table appraoch is exactly the same as SNRO and NUMBER_GET_NEXT function behaves. so you are replicating the whole process.
instead you can reuse the Standard Functionality
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |