‎2008 Apr 16 10:25 AM
All experts:
are there an automatic increase field in Transp. Table?
I need a field that can automatic save the record index when I insert record in customized table.
Thanks in advance.
‎2008 Apr 18 1:23 AM
You need to create a new number range object (Tcode SNRO). Then get the next sequential number using function module NUMBER_GET_NEXT in your ABAP code and insert in DB table.
‎2008 Apr 16 12:15 PM
Hi,
Use sy-tabix and sy-index , this shows how many times the loop get
executed and current position of loop
Sy-TABIX - gives the line number
SY-index - gives the current position.
sy-dbcnt - gives how many records get stored to or retrived from database
‎2008 Apr 16 2:57 PM
Hi,
The indexes are activated along with the table and are created automatically with it in the database.
Regards,
Muneesh Gitta.
‎2008 Apr 16 9:12 PM
Hi,
You mean to say that you have to maintain a field which autoincrements its value whenever a record is inserted.
Suppose the field is STUDENT_ID.
Whenever you are using LOOP ..ENDLOOP stmts and inserting the records, then You can pass SY-TABIX to the field STUDENT_ID. if you use DO..ENDO then go for SY-INDEX.
This is the case if you inert record by record, but if you want to insert multiple records using directly the internal table then you have to explicitly fill the column in the internal table and insert .
Reward points if helpful.
Thanks and regards.
‎2008 Apr 18 1:23 AM
You need to create a new number range object (Tcode SNRO). Then get the next sequential number using function module NUMBER_GET_NEXT in your ABAP code and insert in DB table.
‎2008 Apr 18 1:40 AM