How add new field as primary key for existing table

Hi,
There is table with name REVIEWER_REUSE_EFFORT and the table has 8000 rows in it.
Now the enhacement i must do on this table is there is no primary key on this table. so i must create a ID also add values to this table of ID
Table structure is like this
Create table REVIEWER_REUSE_EFFORT
PRO_ID number,
POBJ_ID number,
TASK_ID number,
POTENTIAL_EFFORT number,
COMMENTS varchar2(1200),
CREATED_BY varchar2(100),
CREATION_DATE sysdate
UPDATED_BY varchar2(1200),
UPDATED_DATE sysdate
Please suggest me how to add values in that 8000 rows
Thanks
Sudhir

Hi,
If you want to add a new column and update the new column with sequence of number
alter table REVIEWER_REUSE_EFFORT add (ID number);
update REVIEWER_REUSE_EFFORT  set ID=rownum;Regards,
Prazy
Edited by: Prazy on Jun 21, 2010 3:13 PM

Similar Messages

  • Adding 2 new fields as Primary Key field in a Z Table which is existing PRD

    Hi Friends,
    I have to add two new fields as primary key fields in a Z TABLE, which is existing in Quality and Production Systems with Data.
    If I incorporate these two new fields (Primary Key fields) in development and if the TR is moved to Quality and Production sytems, is there any possibility of loss in data will happen at Quality and Prd systems?
    At present, Table is having 20 fields with 2 primary key fields and i have to add 2 more primary key fields.
    I have checked in SCN and not find relevant threads.
    Please help me out.
    Regards,
    Suresh.

    NO . It wont be a problem .
    For ex :
    If you have VBELN  , POSNR are key fields now , you have an unique reord with that combination .
    If you add one other field in it  fo ex  VKBUR  then records will be like this
    VBELN     POSNR     VKBUR   MATERIAL   QTY
    10020      10                            abcxyz      1
    10020      10            1234        abcxyz     1
    So your previous records before adding new primary keys , will have new fields balnk , and the new records will have data filled up in all primary key fields .
    However , if you try to update the existing records that will be in existing PRIMARYKEY combination only .
    for example if you try update record 1 above with VKBUR value 85858 , it creates a new record , it wont be updated in existing record.
    Hope this helps , Pls let me know if u have any more doubts.

  • How to define Composite primary key for a Table

    Hi ,
    I am basically more into Java Programming , with little bit knowledge on Oracle as DataBase .so please excuse for my silly doubts .
    Can anybody please tell me how to define a Composite Primary Key on a Table .
    Thanks in advance .
    Edited by: user672373773 on Sep 25, 2009 8:54 AM

    Here is an example right out of the Oracle documentation and the syntax for adding PK since you mention adding a composite PK.
    Example creating composite index
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_indexing.htm#sthref594
    Syntax for adding a PK (composite or not)
    alter table oooooooo.tttttttt
    add constraint tttttttt_PK
    primary key (sample_column2,
    sample_column1)
    using index
    tablespace IDXSPC
    pctfree 05
    initrans 04
    maxtrans 08
    storage (initial 16k
    next 16k
    maxextents 32
    pctincrease 0);
    -- dictionary management with restricted storage, change as desired.
    HTH -- Mark D Powell --

  • How Do I add new fields to Repeating Frames in existing Report

    Hi,
    How do I add new fields to Repeating Frames in existing Report. The Report has 2 GRPFR, 1 HDR and 2 Repeating Frames. I would like to add a new field(column) to inner most repeating frame. I added the new golumn to QUERY and GROUPs in Data Model. After adding the new column to inner most Repeating Frame in Layout Model, the Layout model is losing all other frame and it is showing only the modified one.
    How do I add new column to repeating frames without disturbeing other frames.
    Any hellp will be appreciated!!!!!!!!!!!.
    I am using Oracle Reports 6i.
    Thanks,
    Ravi.

    you must work in your layour editor
    expand your repeating frames do it more big
    for add your new items or field. after you inserted or add, can you put more little your repeating.
    too can you to do one copy of one field in your repeating frame and assign it in his source your new item in your data model.
    normally i begin with the principal frame and go one by one internally.

  • How add new field in layout in RDF using XML report definition

    Hi, ALL
    Do you know how add new field in layout of existing report in RDF using XML report definition. If I try change anything in RDF layout, layout which defined in XML override report layout.

    hello,
    in reports 6i we have this limitation, that you can not add a field to a report unless you re-default the whole report, as we do not support positioning-information in the customization file.
    regards,
    the oracle reports team

  • Is it possible to create many primary key for a table?

    hello sir/mam.
    i am selva, i am new to abap,
    is it possible to create many primary key for a table?
    please guide me.

    Hi Selva,
    Many Primary Keys = Composite Key.
    i.e some set of columns will enable you to identify a unique row from a set of rows in the table.
    This can be achieved by checking the primary key check box in se11.
    Hope it helps.
    Regards,
    Maheswaran.B
    Message was edited by: Maheswaran B

  • How many primary keys for one table?can we add more primary keys

    In general Table have one  primary key.is it possible to more than one primary key in a table?(ie is it possible to add more than one pirmary key in a table). Help me out.

    pls do check this link
    [http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm]
    All the key fields of a table must be stored together at the beginning of the table. A non-key field may not occur between two key fields.
    A maximum of 16 key fields per table is permitted. The maximum length of the table key is 255.
    If the key length is greater than 120, there are restrictions when transporting table entries. The key can only be specified up to a maximum of 120 places in a transport. If the key is larger than 120, table entries must be transported generically.

  • How can I obtain the primary key of a table for an entity relation?

    hello everybody
    I am doing a consultation to a table in my data base, good this table has alone two fields, the first one is the code or pk and the second one is the description, to be presisos they are names of city and code.
    From the beginning!!: This method this one in another class that is a Dialog that is going to call to the class SelecPlace ();
      SelecPlace sl = new SelecPlace();
    public void capturarLugar(){  //  Simple void method in the mentioned class
            String place = txtProcedencia.getText() ;  //  a JTextField
            sl.executeStatement(place) ;                  
        }ok, now we see part of the code of the class SelectPlace
    public class SelecPlace extends AbstractTableModel{
        Connection con = null;
        Statement sentencia = null ;
        ResultSet rs = null;
        ResultSetMetaData rsmd = null ;
        String[] nameColum = {} ;
        Vector datos = new Vector() ;
        public SelecPlace() { }
        public void executeStatement(String query){
          try{
             con = DBManager.getConnection() ;
             sentencia = con.createStatement(rs.TYPE_SCROLL_INSENSITIVE,
                                                                          rs.CONCUR_UPDATABLE) ;
             String sql = "select * from Place where descripcion like %"+query+"%'";
              rs = sentencia.executeQuery(sql) ;
              rsmd = rs.getMetaData();
              int nroColumnas = rsmd.getColumnCount() ;
              nameColum = new String[nroColumnas] ;
              //obtengo los nombres de columnas en cache
               for(int colum = 0; colum < nroColumnas; columna++){
                    nameColum[colum] = rsmd.getColumnLabel(columna + 1) ;
               datos = new Vector();
                while(rs.next()){
                    Vector newRow = new Vector();
                    for(int i = 0; i < getColumnCount(); i++){
                    newRow.addElement(rs.getObject("place_ID"));
                    newRow.addElement(rs.getObject("description"));
                    datos.addElement(nuevaFila);
                fireTableChanged(null);
            }catch(SQLException e){
                System.err.println(e);
                e.printStackTrace(System.err);
                System.out.println("error in statement");
            }catch(ClassNotFoundException cnfe){
                System.err.println(cnfe);
        }Ok, this code me works and I obtain in this case the field description of the table Place
    Now my question is, how can I obtain the primary field of my table?
    I need this value of this field that in the base of information in a bigint, and to take it to the first class before mentioned, for that I am working with a data base related

    Certain duffymo and everyone!!, good I give you my scheme:
    And generalizing my question, I want to obtain the value of the primary key of a table in the database, I obtain more values of the same row, but I need the primary key, and you see one with the primary key I want to turn a Long and it to insert with code java in foreign clave in another table of the database
    Good of this form I believe that it would not be breaking the integrity relacional of the tables

  • How to find the right primary key for DSO from Business Content

    According to best practice design, it is reccomended to make a  DSO where all fields from Business COntent Datasources are transferred.
    But, how to find the right primary indeks ?
    Any good suggestions ?
    For many of the Business Content dataflows there are not DSOs present, so ther e is no tip to get from the dokumentations as gfar as I have found.
    best Regards
    Ingrid

    Hi Ingrid,
    Your question will be perfect in case if you are going for a Custom cube.
    You will not have any problem when you create a Datasource in R/3 level even if it is been built on a single table or on view.
    Only point that you want to know how to design my Key fields in ODS.
    This will be purely depends at what level that you want to bring the data.
    Egg:-
    If you run the data source in RSA3 and check for Each GL if you have 10 liine items and you want all the 10 line items to be transfered to BW.
    In this case you need to check what is the unique combination of fields that is making this lineitems to exists as 10.then include all those fields into Your ODS Key Fields.
    This way you can have 10 records for that perticular GL in both sides, by which u will make sure that the data is been completely transfered.
    If in case if you clude your own Key fields then you will get the correct Total in report for each GL but you can't see all those 10 line items.
    For any case you need to figureout how many records that you want to take into BW based on that check the fields that makes it unique and then add them to ODS Keyfields that will solve your requirement.
    I think this will clear your doubt.
    Best Regards,
    VNK.

  • Add new fields to selection screen for standard billing dule list in CRM

    Hi ,
    I have one issue with standard  program ,tcode is /BEA/IPMI01.
    SUB: Adding  few new fields like IP  to selection screen AND few fields to output list.
    As this is a standard program (tcode: /bea/ipmi01) , i searched for BADI,EXITS but couldn't .
    Can any one help me how to handle this with out cloning the standard one.
    I got some information but succeed.
    in SPRO.
    /CRM/BILLING/SYSTEM ENHANCMENTS/access billing  engine navigator. you will find selection design in the path
    /CRMB/OBJECT/DL/REPORT/SELECTION GROPS/DLA/SELECTION FEIDLS.
    we can find selecton at this place but i couldnot find how to add new fieds.
    Note: i found whatever we do ,  it willl reflect once we regenerated the program.

    Hi,
    You may be able to create an append structure to the standard output structure/table. Go to SE11, open the structure and click on append structure.
    Regards
    Prasenjit

  • QM01 - Add new fields under SUBJECTS tab for notification type Q2

    Hi Experts,
    My requirement is to add 2 new fields to the create Quality Notification (QM01) Tcode under SUBJECTS tab for Notification type Q2.
    I followed the following steps to achieve this :
    [ SPRO -> Quality Mnanagement -> Quality Notifications -> Overview Quality Notification Types -> Then I selected Q2 and then selected dcreen structure for extended view -> Double clicked on 10\TAB02 ].
    Now I arrived on the screen where we have to define the custom screen area and  screen number.
    But here in this case (Q2 notification type) all the 5 screen areas are already occupied , so where can I add my custom subscreen ??
    Please refer to below screen shot for better understanding :
    Please help ! Thanks in advance.
    Kind Regards,
    Ashish Goyal

    Dear narendra bora 
    You can enter the more than two persons in but not on header screen. In operation you can make each seperate person responsible for each operation & that can be entered against each operation seperately. Also if operation is carried out by two person then also you can enter that in the form of split. 
    But it is not possible to enter two users in reported by field.
    I hope this will resolve your issue.
    Regards

  • Any easy way to generate unique primary key for database table?

    I'm currently playing with the J2EE reference implementation from Sun which comes with the IBM Cloudscape database. This Cloudscape database supports the use of an AutoIncrement field.
    First question: Can I use CMP and assume that the database will generate a proper key for me? Anyone tried it out successfully before?
    Also, based on what I've heard so far, it seems that generating database primary key is not really well-supported by J2EE using CMP in that a lot of J2EE developers have to resort to workarounds like using a session bean, JDBC and (1) some seed numbers for ID implanted in the database itself (as in the J2EE tutorial DukesBankApp example) or (2) using the SQL MAX aggregation command + 1. Usign seed number is contradictory to good database design and using MAX is dangerous for heavy traffic application if 2 beans try to insert themselves into the database at the same time (synchronizarion problem).
    Anyway I find it dumb that we still have to go back to JDBC and SQL which was the reason why the concept Entity Bean was introduced; to make database persistence transparent! Now it seems that J2EE makes it worse and more troublesome than before.
    Second Question: Is there any easy (hopefully transparent/automatic) way of generating primary key ID?

    if you want to rely on your container or database then go hard, will probably be faster.
    to make a cross container/db soln I used a CMP Entity bean called Sequence with one field for uid
    I use one instance and increment the field each time.
    To do the logic, I have a utils class with static method, no need for session bean overhead
    I reckon this approach is OK considering all things

  • Primary key for active table

    hi
    can anyone tell me step by step to create primarykey for active table of dso that already has data loaded. few requests are activated and few are not activated.
    points for sure.
    regards
    anil

    Anil,
    This is absolutely mandatory to delete the data from any of the table if you want to change the key fields of the table. This is as good as universal law in data base theory
    Now as far as your ODS is concerned, you have to delete the complete data from it and then you can change the key fields of it. Again you just need to change this in the definition of ODS and not in any particular table.
    Just change the definition of ODS in development and transport it to production. Make sure top delete the data before you transport it. If not, transport will fail.
    Hope this info helps you.
    Regards,
    Yogesh

  • Add new field in dynamic selections for transaction FAGLL03

    Hello experts,
    I'm trying to add field CPUDT (Entry Date) from table BKPF in the dynamic selections of logical database SDF.
    In fact, and referring to some hints posted in the forum, I copied the standard selection view 'SAP' to 'CUS' and then added a new functional group and then assign the field CPUDT (table BKPF) to this functional group.
    Even after saving, I couldn't see the new group I created neither the field CPUDT.
    Could you please advice?
    Thanks in advance.

    Hello
    I think you can do it by adding the field into the view (SM30): V_T021S and transport the request.
    Best regards,
    Philippe

  • Add new field in Txn FBL5N

    Hi SAP,
    How to add "new" field eg: object key in customer line item (FBL5N) via config? any menu path?
    I will give points for those who can solve my problem.
    TQ
    Regards,
    Nazrul

    Hi
    The path for adding additional line ittems for display in customer line items is
    IMG>Financial Accounting (New)>Accounts Recievebl & payables>Customer Accounts>Line Items>Display Line Items>Define Additional Fields for Line Items Display
    Thanks & Regards
    Sanil K Bhandari

Maybe you are looking for

  • Transfer of GL a/cs manually from legacy system to SAP

    How do you transfer GL a/cs manually from Legacy system to SAP,  what offset a/c would you use.  Also how would you open AR and AP transactions manually in SAP.  Please help my email id is [email protected] Thanks

  • Error 1935: Microsoft Visual C++ 2008 Redistributable Install

    I was trying to install Visual Studio 2010 and started encountering errors with the C++ distributable package during install, so I decided to install it by itself. Whenever I try and install it, it stops on Feature: FT_VC_Redist_openMP_x86 Enter text

  • Zorder of all controls

    How do you rearrange the zorder of all controls on a form? I once knew but forgot.  This is not the same as changing the Tab Order. Solitaire

  • Providing a unique RemoteObject per user

    I'm trying to setup a simple multi-user client server in BlazeDS and provide each Flex client its own unique RemoteObject. I set up the Java object in remoting-config.xml. But the object is only being created once and every user afterwords has access

  • FHRP Isolation

                       Hi, We have the requirment to implement VPLS between two DC's, which we will use to extend VLAN's between both DC's.If we extend VLAN say 10 , it will be active/standby in DC1 and Listen /Listen in 2nd DC.I know we can  have FHRP i