Regarding Secondary Index in a Table

hi
if i create a secondary index in a table is it obligatory or optional to have first field as MANDT (Client field) if the table is client dependent & how many secondary indexes(MAXIMUM) can be created for a table.
Regards

Hi,
Check the below Link
How to transport a secondary index on P master data table?
Hope this helps you.
Regards,
Anki Reddy

Similar Messages

  • Regarding secondary index

    how and when we create secondary indexes and what are the advantages and disadvantages of secondary indexes?

    Hi
    Index: Technical key of a database table.
    Primary index: The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database.
    Secondary index: Additional indexes could be created considering the most frequently accessed dimensions of the table.
    Structure of an Index
    An index can be used to speed up the selection of data records from a table.
    An index can be considered to be a copy of a database table reduced to certain fields. The data is stored in sorted form in this copy. This sorting permits fast access to the records of the table (for example using a binary search). Not all of the fields of the table are contained in the index. The index also contains a pointer from the index entry to the corresponding table entry to permit all the field contents to be read.
    When creating indexes, please note that:
    An index can only be used up to the last specified field in the selection! The fields which are specified in the WHERE clause for a large number of selections should be in the first position.
    Only those fields whose values significantly restrict the amount of data are meaningful in an index.
    When you change a data record of a table, you must adjust the index sorting. Tables whose contents are frequently changed therefore should not have too many indexes.
    Make sure that the indexes on a table are as disjunctive as possible.
    (That is they should contain as few fields in common as possible. If two indexes on a table have a large number of common fields, this could make it more difficult for the optimizer to choose the most selective index.)
    Accessing tables using Indexes
    The database optimizer decides which index on the table should be used by the database to access data records.
    You must distinguish between the primary index and secondary indexes of a table. The primary index contains the key fields of the table. The primary index is automatically created in the database when the table is activated. If a large table is frequently accessed such that it is not possible to apply primary index sorting, you should create secondary indexes for the table.
    The indexes on a table have a three-character index ID. '0' is reserved for the primary index. Customers can create their own indexes on SAP tables; their IDs must begin with Y or Z.
    If the index fields have key function, i.e. they already uniquely identify each record of the table, an index can be called a unique index. This ensures that there are no duplicate index fields in the database.
    When you define a secondary index in the ABAP Dictionary, you can specify whether it should be created on the database when it is activated. Some indexes only result in a gain in performance for certain database systems. You can therefore specify a list of database systems when you define an index. The index is then only created on the specified database systems when activated
    Regards

  • Creation of secondary index on RSPCPROCESSLOG table

    Hello guys,
    We have detected severe performance issues while executing the transaction ST03n in our BW 3.5 System.
    Looking in the OSS notes we found the note "SAP Note 841324 - ST03N: poor performance for process chain profile" where it recommends the creation of a secondary index in the table RSPCPROCESSLOG  with the following features:
    Create another secondary index on the RSPCPROCESSLOG table with the
    following fields:
    - INSTANCE
    - TYPE
    Can you please let us know what is the step by step to proceed with the creation of this secondary index?
    Thanks for your help.
    Kind regards

    Please ask questions about Oracle Text (formerly interMedia text) in the Oracle Text forum. You will get a quicker, more expert answer there.

  • Secondary Index for the table MSEG

    Hi folks,
             One of my report is comparetively very slow when it is executed in the production server. when i chked, a query related to the MSEG table is taking more time to execute. I want to create a secondary index for that table. Could any body tell  me the procedure of creating the seconday index for the table MSEG, as i am not aware of that.
    Thanks in advance,
    Shyam.

    Dear shyam,
    Search SDN before posting any thread their are 10k threads available for your question anyhow for your reference here is one link
    http://help.sap.com/search/highlightContent.jsp
    Cheers
    fareed

  • Use secondary index in internal tables.

    what are the uses of secondary index in internal table?

    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb47446011d189700000e8322d00/content.htm
    Creating Secondary Indexes
    Proceed as follows to create a secondary index on a table:
    In the field maintenance screen for the table, choose Goto --> Indexes.
    1. If you went to the field maintenance screen of the table in display mode, only correct the index (and not the table).
    If indexes already exist on the table, a list of these indexes is displayed. Choose Create. A dialog box appears in which you must enter the three-place index identifier. If there are no indexes, go directly to the dialog box.
    2. Enter the index identifier and choose Continue.
    You will go to the maintenance screen for indexes.
    3. Enter an explanatory short text in the field Short text.
    Choose TabFields.
    4. A list of all the fields of the table is displayed.
    5. Select the fields which you want to copy to the index.
    6. Choose Copy.
    The selected fields are copied to the index.
    7. If the values in the index fields already uniquely identify each record of the table, select Unique index.
    A unique index is automatically created on the database during activation because a unique index also has a functional meaning (prevents double entries of the index fields).
    8. If it is not a unique index, leave Non-unique index selected. In this case you can use the corresponding radio buttons to define whether the index should be created automatically on the database for all database systems, for selected database systems or for no database system.
    9. If you chose For selected database systems, you must specify these systems.
    You have two possibilities here:
    List of inclusions: The index is only created automatically during activation for the database systems specified in the list. The index is not created on the database for the other database systems.
    List of exclusions: The index is not created automatically on the database during activation for the specified database systems. The index is automatically created on the database for the other database systems.
    Click on the arrow symbol behind the radio buttons. A dialog box appears in which you can define up to 4 database systems. Use the corresponding radio buttons to decide whether this list should be treated as a list of inclusions or exclusions.
    10. Activate the index with Index ® Activate. The activation log tells you about the flow of the activation. Call it with Utilities ® Act.log. If an error occurred when activating the secondary index, you will automatically go to this log.
    The secondary index is automatically created on the database during activation if the corresponding table has already been created there and index creation was not excluded for the database system.
    Reward points if useful.

  • Is it worth creating secondary index on BKPF table ?

    Hello,
    One of my clients is using ECC version 5.0. I have a requirement wherein I need to fetch the data from BKPF table based on AWKEY, BUKRS and GJAHR. There is no standard secondary index available.
    I have decided to create a secondary index on these fields in the following order:
    1) MANDT
    2) AWKEY
    3) BUKRS
    4) GJAHR
    I know that creating secondary indexes does improve performance during data retrieval. But when I checked the total number of entries in BKPF table in production system, there are more than 20 lac 2 million records.
    I am worried that creation of secondary index will create another table of such a large size in production that has data sorted on the above fields. Also, the RAM of production system is 6 GB.
    Please suggest if creation of secondary index is a good measure OR should I recommend the client to increase the system RAM?
    Regards,
    Danish.
    Edited by: Thomas Zloch on Oct 3, 2011 3:01 PM

    Hi,
    Secondary Index on BKPF-AWKEY has been successfully created in production. The report which used to timeout in foreground as well as in background is now executing in less than 10 seconds !!
    Client is very much satisfied with this. But, there is one problem that we are facing now is that when the user is changing an existing billing document via VF02, on SAVE, system takes a very long time to save the changes done.
    We monitored the processes via SM50 and found that there was a sequential read on BKPF table.
    Before transporting the index in production, system approximately took not more than 5 seconds to save the Billing Document. But now system takes more than 20 minutes just to save the billing document via VF02.
    I really don't know what has gone wrong. I can't figure out if I have missed any step while creating the index.
    I did the following,
    1) Created a Secondary index on BKPF, saved it in the transport request and activated it. Since the index was not existing in database ORACLE, I activated and adjusted the table via SE14. Now, index exists on database as well. Working perfectly in development.
    2) Imported the transport request to Production. Checked in SE11. Index was existing and active. Also, index existed in database ORACLE.
    Have I missed anything ? Is it required to activate and adjust the database via SE14 in production too ?
    Regards,
    Danish.

  • Secondary index on vbfa table

    I have very expensive statement running against VBFA table. It comes from a customer report and doing SQL:
    SELECT /*+ FIRST_ROWS */ "VBELV"
    FROM "VBFA"
    WHERE "MANDT" = :A0 AND "VBELN" = :A1 AND ROWNUM <= :A2
    It has execution plan:
    SELECT STATEMENT ( Estimated Costs = 96.009 , Estimated #Rows = 41 )
    |
    --- COUNT STOPKEY
    |
    INDEX RANGE SCAN VBFA~0
    As you can see it is very expensive statement because VBFA is huge table and because I have only VBFA~0 index with columns:
    UNIQUE Index VBFA~0
    COLUMN DISTINCT VALUES
    MANDT      1
    VBELV       1.589.207
    POSNV      4.184
    VBELN       3.202.114
    POSNN       58.173
    VBTYP_N    18
    In order to improve performance of this report , would you recomend creating secondary index and would it be on columns: MANDT, VBELN, VBELV
    I have not seen this type of secondary index in SAP community (most of the time I see sec.index on mandt, vbeln and posnn columns) so that is why I want to double check it before I deploy it.
    Regards,
    Andrija

    Hi,
    Indexes speed up access to rows in a table. They can be created for a single column or for a series of columns.
    MANDT AND VBELN does not have index then create indexes on these columns.
    The explain statement can be used to check the effect of creating or deleting indexes (see index) on the choice of search strategy for the specified SQL statement. You can also estimate the time needed by the database system to process the specified SQL statement. The specified QUERY or SINGLE SELECT statement is not executed while the EXPLAIN statement is being executed.
    To be frank to analyze you shd generate trace file and you need to analyze.
    Oracle claims that <b>first_rows_n</b> optimization results in faster response time for certain queries, we must remember that the performance is achieved via a change to the costing.
    Use the FIRST_ROWS hint when you need only the first few hits of a query. When you need the entire result set, do not use this hint as it might result in poorer performance.
    So collect stats,Analyze table create index your query will execute faster.
    Analyze in trace file generated.Want to know indexes are used or not have a look on Explain Plan.
    Regards
    Vinod

  • Secondary index on aggregate table and cube

    Hi to all,
    I have small doubt.
    1. Primary index created in F and E table of CUBE by system.
      then how secondary index in created in F and E table of cube,
      or
    is that B* tree index created as secondary index on F/E table of cube, when we use process type create / deleted index in PC for CUBE
    or if we do manually under performance tab for cube.
    2. Primary index also created on F and E table of aggregate by system.
      then how secondary index in created in F and E table of aggregate,
      or
    is that B* tree index created as secondary index on F/E table of aggregate, when we use process type create / deleted index in PC for CUBE
    or if we do manually under performance tab for aggregate
    Regards
    Pavneet Rana

    Hi,
    Thru process chains you can't handle them.
    You can do it by manual with help basis or ABAP team.
    BW server--> T code  SE11, Select table - Enter table name and display it.
    On next screen on tool bar you can see indexes --> click on it.
    Thanks

  • Can we create secondary index for a cluster table

    hi
    can we create secondary index for a cluster table

    Jyothsna,
    There seems to be some kind of misunderstanding here. You <i>cannot</i> create a secondary index on a cluster table. A cluster table does not exist as a separate physical table in the database; it is part of a "physical cluster". In the case of BSEG for instance, the physical cluster is RFBLG. The only fields of the cluster table that also exist as fields of the physical cluster are the leading fields of the primary key. Taking again BSEG as the example, the primary key includes the fields MANDT, BUKRS, BELNR, GJAHR, BUZEI. If you look at the structure of the RFBLG table, you will see that it has primary key fields MANDT, BUKRS, BELNR, GJAHR, PAGENO. The first four fields are those that all cluster tables inside BSEG have in common. The fifth field, PAGENO, is a "technical" field giving the sequence number of the current record in the series of cluster records sharing the same primary key.
    All the "functional" fields of the cluster table (for BSEG this is field BUZEI and everything beyond that) exist only inside a raw binary object. The database does not know about these fields, it only sees the raw object (the field VARDATA of the physical cluster). Since the field does not exist in the database, it is impossible to create a secondary index on it. If you try to create a secondary index on a cluster table in transaction SE11, you will therefore rightly get the error "Index maintenance only possible for transparent tables".
    Theoretically you could get around this by converting the cluster table to a transparent table. You can do this in the SAP dictionary. However, in practice this is almost never a good solution. The table becomes much larger (clusters are compressed) and you lose the advantage that related records are stored close to each other (the main reason for having cluster tables in the first place). Apart from the performance and disk space hit, converting a big cluster table like BSEG to transparent would take extremely long.
    In cases where "indexing" of fields of a cluster table is worthwhile, SAP has constructed "indexing tables" around the cluster. For example, around BSEG there are transparent tables like BSIS, BSAS, etc. Other clusters normally do not have this, but that simply means there is no reason for having it. I have worked with the SAP dictionary for over 12 years and I have never met a single case where it was necessary to convert a cluster to transparent.
    If you try to select on specific values of a non-transparent field in a cluster without also specifying selections for the primary key, then the database will have to do a serial read of the whole physical cluster (and the ABAP DB interface will have to decompress every single record to extract the fields). The performance of that is monstrous -- maybe that was the reason of your question. However, the solution then is (in the case of BSEG) to query via one of the index tables (where you are free to create secondary indexes since those tables are transparent).
    Hope this clarifies things,
    Mark

  • How many SECONDARY INDEXES are created for CLUSTER TABLES?

    how many SECONDARY INDEXES are created for CLUSTER TABLES?
    please explain.

    There seems to be some kind of misunderstanding here. You cannot create a secondary index on a cluster table. A cluster table does not exist as a separate physical table in the database; it is part of a "physical cluster". In the case of BSEG for instance, the physical cluster is RFBLG. The only fields of the cluster table that also exist as fields of the physical cluster are the leading fields of the primary key. Taking again BSEG as the example, the primary key includes the fields MANDT, BUKRS, BELNR, GJAHR, BUZEI. If you look at the structure of the RFBLG table, you will see that it has primary key fields MANDT, BUKRS, BELNR, GJAHR, PAGENO. The first four fields are those that all cluster tables inside BSEG have in common. The fifth field, PAGENO, is a "technical" field giving the sequence number of the current record in the series of cluster records sharing the same primary key.
    All the "functional" fields of the cluster table (for BSEG this is field BUZEI and everything beyond that) exist only inside a raw binary object. The database does not know about these fields, it only sees the raw object (the field VARDATA of the physical cluster). Since the field does not exist in the database, it is impossible to create a secondary index on it. If you try to create a secondary index on a cluster table in transaction SE11, you will therefore rightly get the error "Index maintenance only possible for transparent tables".
    Theoretically you could get around this by converting the cluster table to a transparent table. You can do this in the SAP dictionary. However, in practice this is almost never a good solution. The table becomes much larger (clusters are compressed) and you lose the advantage that related records are stored close to each other (the main reason for having cluster tables in the first place). Apart from the performance and disk space hit, converting a big cluster table like BSEG to transparent would take extremely long.
    In cases where "indexing" of fields of a cluster table is worthwhile, SAP has constructed "indexing tables" around the cluster. For example, around BSEG there are transparent tables like BSIS, BSAS, etc. Other clusters normally do not have this, but that simply means there is no reason for having it. I have worked with the SAP dictionary for over 12 years and I have never met a single case where it was necessary to convert a cluster to transparent.
    If you try to select on specific values of a non-transparent field in a cluster without also specifying selections for the primary key, then the database will have to do a serial read of the whole physical cluster (and the ABAP DB interface will have to decompress every single record to extract the fields). The performance of that is monstrous -- maybe that was the reason of your question. However, the solution then is (in the case of BSEG) to query via one of the index tables (where you are free to create secondary indexes since those tables are transparent).

  • Secondary Index Select Statement Problem

    Hi friends.
    I have a issue with a select statement using secondary index,
    SELECT SINGLE * FROM VEKP WHERE VEGR4 EQ STAGE_DOCK
                                      AND VEGR5 NE SPACE
                                      AND WERKS EQ PLANT
            %_HINTS ORACLE
            'INDEX("&TABLE&" "VEKP~Z3" "VEKP^Z3" "VEKP_____Z3")'.
    given above statement is taking long time for processing.
    when i check for the same secondary index in vekp table i couldn't see any DB index name with vekp~z3 or vekp^z3 or vekp____z3.
    And the sy-subrc value after select statement is 4. (even though values avaliable in VEKP with given where condition values)
    My question is why my select statement is taking long time and sy-subrc is 4?
    what happens if a secnodary index given in select statement, which is not avaliable in that DB Table?

    Hi,
    > ONe more question: is it possible to give more than one index name in select statement.
    yes you can:
    read the documentation:
    http://download.oracle.com/docs/cd/A97630_01/server.920/a96533/hintsref.htm#5156
    index_hint:
    This hint can optionally specify one or more indexes:
    - If this hint specifies a single available index, then the optimizer performs
    a scan on this index.  The optimizer does not consider a full table scan or
    a scan on another index on the table.
    - If this hint specifies a list of available indexes, then the optimizer
    considers the cost of a scan on each index in the list and then performs
    the index scan with the lowest cost. The optimizer can also choose to
    scan multiple indexes from this list and merge the results, if such an
    access path has the lowest cost. The optimizer does not consider a full
    table scan or a scan on an index not listed in the hint.
    - If this hint specifies no indexes, then the optimizer considers the
    cost of a scan on each available index on the table and then performs
    the index scan with the lowest cost. The optimizer can also choose to
    scan multiple indexes and merge the results, if such an access path
    has the lowest cost. The optimizer does not consider a full table scan.
    Kind regards,
    Hermann

  • Buffering and creation of secondary indexes.

    Hi All,
    I have a table that has more than 6 million records, due to which performance is slow during the transaction search, kindly let me know if Buffering and creation of secondary indexes will help me.
    I am given to understand that creation of seconary indexes and full buffering may not always improve performance. Kindly let me know when it is advised to go for full buffering.
    Regards,
    Thiru

    Hi,
    create  secondary index  for the table
    check below link
    http://help.sap.com/saphelp_nw70/helpdata/en/cf/21eb20446011d189700000e8322d00/content.htm
    Regards,
    Madhu

  • SELECT QUERY  BASED ON SECONDARY INDEX

    Hi all,
    CAN ANYONE TELL ME HOW TO WRITE SELECT QUERY BASED ON SECONDARY INDEX.
    IN WHAT WAY DOES IT IMPROVE PERFORMANCE.
    i KNOW WHEN CREATING SECONDARY INDEX I NEED TO GIVE AN INDEX NO -iT SHOULD BE ANY NUMBER RIGHT?
    I HAVE TO LIST ALL PRIMARY KEYS FIRST AND THEN THE FIELD FOR WHICH I AM CREATING SECONDARY INDEX RIGHT?
    LETS SAY I HAVE 2 PRIMARY KEYS AND I WANT TO CREATE SEONDARY INDEX FOR 2 FIELDS THEN
    I NEED TO CREATE A SEPERTE SECONDARY INDEX FOR EACH ONE OF THOSE FIELDS OR ONE SHOULD BE ENOUGH
    pLS LET ME KNOW IF IAM WRONG

    HI,
    If you cannot use the primary index to determine the result set because, for example, none of the primary index fields occur in the WHERE or HAVINGclauses, the system searches through the entire table (full table scan). For this case, you can create secondary indexes, which can restrict the number of table entries searched to form the result set.
    You create secondary indexes using the ABAP Dictionary. There you can create its columns and define it as UNIQUE. However, you should not create secondary indexes to cover all possible combinations of fields.
    Only create one if you select data by fields that are not contained in another index, and the performance is very poor. Furthermore, you should only create secondary indexes for database tables from which you mainly read, since indexes have to be updated each time the database table is changed. <b>As a rule, secondary indexes should not contain more than four fields</b>, <b>and you should not have more than five indexes for a single database table</b>.
    <b>What to Keep in Mind for Secondary Indexes:</b>
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eb2d446011d189700000e8322d00/content.htm
    http://www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
    Regards
    Sudheer

  • Select query with secondary index

    hi,
    i have a report which is giving performance issues on a perticular select query on KONH table.
    the select query doesnt use the primary key fields and table already has around 19 million entries.So there was a secondary index created for the fields in the table.
    now, KONH is a client specific table, and hence has MANDT as the first field. when the table is not indexed it is sorted according to the order of fields, like first MANDT, then primary key fields and then remaining fields.. (correct me if i am wrong)
    but the secondary index created doesnt has MANDT in it..(yea, a mistake! )...
    but instead of correccting the secondary index, i am told to change the select query..
    so, i used a "client specific" syntax to sort the issue.. but i dont understand whre i should put the "where mandt eq sy-mandt" clause..
    should i put it right after all my secondary index fields are over? or what happens to the order of fields which are not present in the list of secondary index?
    kindaly help.
    thanx.

    Hi chinmay kulkarni,
    its better if you can ask concerned person to add MANDT field in your  index as well....
    Indexes and MANDT
    If a table begins with the mandt field, so should its indexes. If a table begins with mandt and an index doesn't, the optimizer might not use the index.
    Remember, if you will, Open SQL's automatic client handling feature. When select * from ztxlfa1 where land1 = 'US' is executed, the actual SQL sent to the database is select * from ztxlfa1 where mandt = sy-mandt and land1 = 'US'. Sy-mandt contains the current logon client. When you select rows from a table using Open SQL, the system automatically adds sy-mandt to the where clause, which causes only those rows pertaining to the current logon client to be found.
    When you create an index on a table containing mandt, therefore, you should also include mandt in the index. It should come first in the index, because it will always appear first in the generated SQL.
    Index: Technical key of a database table.
    Primary index: The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database.
    Secondary index: Additional indexes could be created considering the most frequently accessed dimensions of the table.
    Structure of an Index
    An index can be used to speed up the selection of data records from a table.
    An index can be considered to be a copy of a database table reduced to certain fields. The data is stored in sorted form in this copy. This sorting permits fast access to the records of the table (for example using a binary search). Not all of the fields of the table are contained in the index. The index also contains a pointer from the index entry to the corresponding table entry to permit all the field contents to be read.
    When creating indexes, please note that:
    An index can only be used up to the last specified field in the selection! The fields which are specified in the WHERE clause for a large number of selections should be in the first position.
    Only those fields whose values significantly restrict the amount of data are meaningful in an index.
    When you change a data record of a table, you must adjust the index sorting. Tables whose contents are frequently changed therefore should not have too many indexes.
    Make sure that the indexes on a table are as disjunctive as possible.
    (That is they should contain as few fields in common as possible. If two indexes on a table have a large number of common fields, this could make it more difficult for the optimizer to choose the most selective index.)
    For Example...
    SELECT KUNNR KUNN2 INTO TABLE T_CUST_TERR
    FROM KNVP CLIENT SPECIFIED
    WHERE MANDT = SY-MANDT " here MANDT shd be first
    AND KUNN2 IN S_TERR
    AND PARVW LIKE 'Z%'.
    Accessing tables using Indexes
    The database optimizer decides which index on the table should be used by the database to access data records.
    You must distinguish between the primary index and secondary indexes of a table. The primary index contains the key fields of the table. The primary index is automatically created in the database when the table is activated. If a large table is frequently accessed such that it is not possible to apply primary index sorting, you should create secondary indexes for the table.
    The indexes on a table have a three-character index ID. '0' is reserved for the primary index. Customers can create their own indexes on SAP tables; their IDs must begin with Y or Z.
    If the index fields have key function, i.e. they already uniquely identify each record of the table, an index can be called a unique index. This ensures that there are no duplicate index fields in the database.
    When you define a secondary index in the ABAP Dictionary, you can specify whether it should be created on the database when it is activated. Some indexes only result in a gain in performance for certain database systems. You can therefore specify a list of database systems when you define an index. The index is then only created on the specified database systems when activated
    Also pls have a look on below link
    http://www.sapfans.com/sapfans/forum/devel/messages/30240.html
    Hope it will solve your problem..
    Reward points if useful...
    Thanks & Regards
    ilesh 24x7

  • Issue with new secondary index

    hi i have created new secondary index in VEPO table.( mandt, werks,lgort, sonum).index is activated. but when i am doing activate and adjacent in database in SE14.it is giving warings and error.
    warning 1:
    Enhancement category 3 possible , but include or subty. not yet classified.
    index VEPO-ZS1 must be created in the database
    test activation of Table VEPO successful.
    Activation and DDL statments for Table VEPO required.
    warning and error:
    Enhancement category 4 possible , but include or subty. not yet classified.
    create UNIQUE INDEX "VEPO~ZS1' ON "VEPO" ("MANDT", "WERKS", "LGORT","SONUM")
    PCTFREE 10
    INITRANS 002
    TABLESPACE PSAPBTABI
    STORAGE ( INITIAL 0000447920 K
    NEXT 0000447920 K
    MINIEXTENTS 0000000001
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0000
    FREELISTS 001)
    ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
    DDL time(___1): ...378,823 milliseconds
    The SQL statement was not executed
    Statements for Table VEPO could not be executed
    Request for VEPO could not be executed
    When i m executing below select staments its taking more time.
    For below Select Statments i m using :
      if not t_vbap[] is initial.
          select venum
                 vbeln
                 unvel
                 vemng
                 matnr
                 lgort
                 sonum
                 werks
          from   vepo
          into   table t_vepo
           for all entries in t_vbap
       where  matnr in s_matnr
        and   werks =  p_werks
        and   lgort in s_lgort
        and   sonum = t_vbap-sonum.
        else.
          select venum
             vbeln
             unvel
             vemng
             matnr
             lgort
             sonum
             werks
      from   vepo
      into   table t_vepo
    where  matnr in s_matnr
    and   werks =  p_werks
    and   lgort in s_lgort.
        endif.

    Oracle give you the answer
    ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
    so you cannot create a unique index with those keys, add another key (or even the whole primary keys) or remove the unique constraint. (of course in some of your environment, e.g. DEV there could be no duplicate entries for those keys, but in at least one of your environment the problem arose)
    Adding an unique constraint on a SAP standard table is not a good idea, if you were successful in a young (go live) system, you could get in trouble if standard reports dump cause of this unexpected constraint. (and they will according to [Murphy's_law|http://en.wikipedia.org/wiki/Murphy%27s_law])
    Regards,
    Raymond

Maybe you are looking for

  • How do i restore iMac from external g-force hard drive

    I took my Imac in for the hard drive recall and i backed up the computer but now I'm not sure how to restore my computer

  • Abobe illustrator images in Dreamweaver?

    Help! I am trying to do a web page using Dreamweaver (which I do not know) for a multimedia design course. My images are in Adobe Illustrator and I cannot get Dreamwever to recognize them. What can I do???? My final project is due in a week and I am

  • 2nd gen shuffle loses music for no apparent reason

    I recently bought a 2nd gen shuffle and I've connected to my pc and uploaded music without any problems. However, while I'm using the shuffle, for some unknown reason - and completely at random, the shuffle seems to lose certain tracks, not all - jus

  • Does WL70 Web Service Support Sessions?

    Does anybody know how to make WL70 Web Service support sessions? The "javax.xml.rpc.session.maintain" property on Stub does not seem to work. Without session support, it is almost no use for us because we have to authenticate the user each time. Than

  • Uninstalled PhotoshopCC now CC won't allow me to download

    PhotoshopCC was corrupt and had to be uninstalled.  Now I cannot download PhotoshopCC because CC thinks it is already installed.  How can I clear the "installed" apps from CC?