2007 Oct 16 10:53 AM
hi,
there are five fields in a table and i want to introduce a field index in the table which will be primary key and will uniquely identify a record and it will go on incrementing as and when the recoed is added to the table...
earlier fields of table are
ship_to all these three are primary keys
ship_to_name
email_id
now i am having problem with updating the database with primary key so will introduce a new field as index and go on adding it so it wil uniquely identify a single record
but my problme is how to incement the index when user enters a entry in the table maintiances screen and save it....
please suggest how to do it....
i want to use a unique field index and it goes on adding as user enters the data and this index to be inserted in the table
regards
Nishant
hi,
there are five fields in a table and i want to introduce a field index in the table which will be primary key and will uniquely identify a record and it will go on incrementing as and when the recoed is added to the table...
earlier fields of table are
ship_to all these three are primary keys
ship_to_name
email_id
now i am having problem with updating the database with primary key so will introduce a new field as index and go on adding it so it wil uniquely identify a single record
but my problme is how to incement the index when user enters a entry in the table maintiances screen and save it....
please suggest how to do it....
i want to use a unique field index and it goes on adding as user enters the data and this index to be inserted in the table
regards
Nishant
2007 Oct 19 11:11 PM
You can create a number range object using SNRO and then call the FM NUMBER_GET_NEXT to get the next number.
2007 Oct 21 10:43 AM
Hello,
For Data creation as per the requirements,pls go through the following........
<u><i>how to</i></u> :
we can write coding in the PBO of the screen for table maintainance to fetch the largest available number and increment it by 1 before updating in z-table.The field which contains the number can be given as a display only field in the screen of maintainance(using screen painter itself)
<u><i>disadvantage</i></u> :
a) whenever the maintainance is regenerated or changed&activated the code in
PBO is overwritten
b)works better with 2step maintainance
Pls check revert and reward if helpful
Regards
Byju
2007 Oct 21 12:28 PM
hello Arora,
in addition to creating/using a number range object to get your index value. you could also use a GUID if the key is not supposed to be displayed for a user or for sorting purposes. If you just need an unique value for technical reasons you can create GUIDs by using GUID_CREATE function module.
Rgds.
Roman
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |