‎2009 Apr 24 1:40 PM
Hi abapers,
I have a column called recording number which is of numeric type.
I want to auto generate values for this column of my table.
How can this be achieved.
Regards,
Aditya
‎2009 Apr 24 2:05 PM
Hi,
Use the FM : NUMBER_GET_NEXT and You can select the relevant object from the table TNRO that has the numeric type(NUMC) with the relevant number of characters(size).
For eg: to get 8 digit number use the object : DARLSICH (make sure that what ever object u use should have a transction code assigned to it in TNRO table)..
Regards
SHiva
‎2009 Apr 24 2:05 PM
Hi,
This is completely depends on the requirement.
Lets say, if you are updating new records through some custom program by building an internal table, then take some initial value to the record number.
Now in the loop increment the record number by one, as long as you append the records, it will be new.
Or else if you need functionality similar to the document number generation in SAP, then go for the function module NUMBER_GET_NEXT functionality. But I don't think you need this...........
Regards,
Santhosh
‎2009 Apr 24 2:05 PM
Hi,
Use the FM : NUMBER_GET_NEXT and You can select the relevant object from the table TNRO that has the numeric type(NUMC) with the relevant number of characters(size).
For eg: to get 8 digit number use the object : DARLSICH (make sure that what ever object u use should have a transction code assigned to it in TNRO table)..
Regards
SHiva