‎2007 Nov 20 5:54 AM
Hi guys,
I have a requirement wherein i need to create an index on table for a given field.
For eg. I need to create an index on table BKPF for field mandt.
How do i do this??
Please help me out on this.
Thanks and regards,
Frank.
‎2007 Nov 20 5:56 AM
copying table and then on the screen change table/structure u have button indexes
i think u can create using them
‎2007 Nov 20 5:57 AM
See the link below it gives the details for creating secondary index on the table
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eb47446011d189700000e8322d00/frameset.htm
‎2007 Nov 20 5:58 AM
Hi
Primary index : Its the index which is automatically created for the PRIMARY KEY FIELD(S) of the table.
The primary index is always created automatically in the R/3 System. It consists of the primary key fields of the database table. This means that for each combination of fields in the index, there is a maximum of one line in the table. This kind of index is also known as UNIQUE.
Secondary index : Its created as and when required,
based upon other field(s) of the table,
on which search criteria is used in sqls.
Secondary indexes should contain columns that you use frequently in a selection, and that are as highly selective as possible. The fewer table entries that can be selected by a certain column, the higher that columns selectivity. Place the most selective fields at the beginning of the index. Your secondary index should be so selective that each index entry corresponds to at most five percent of the table entries. If this is not the case, it is not worth creating the index. You should also avoid creating indexes for fields that are not always filled, where their value is initial for most entries in the table.
CREATION
go to SE11
enter table name
press display
from menu GOTO-> indexes
press create button
enter the fields for which you need the index
save and activate
use those fields in the Where condition of the select statement and see
Regards
Anji
‎2007 Nov 20 5:58 AM
Hello,
1,In SE11 Transaction display your table.
2.press button index... in tool bar, it will ask you
to create a new one.
3.give the index name
4. give short text description
5. in bottom table give the field name on which
you want index.
6. save and activate.
‎2007 Nov 20 6:03 AM
Hi
loop at itab.
if sy-tabix eq 5.
do.
if sy-index eq 6.
assign component sy-index of structure itab to <FS>.
if sy-subrc eq 0.
exit.
endif.
endif.
enddo.
endif.
endloop.
‎2007 Nov 20 6:04 AM
Hi,
Goto SE11 display table BKPF click on Indexes and create index.
Regards,
Prashant