Create Secondary Index on SAP Table

Why We need to create Secondary Index : 

    Secondary Index is the one which we create separately for the speed access
   of a database table.

Procedure Sequences are given below :

To create a secondary index on SAP table, display the table in ABAP dictionary (Tcode : SE11)


Follow the screenshot


Write the index name :


Add filed name for secondary index :


Finally save and activate. Some It may occurs warning. 
So  goto Tcode : SE14
and activate and adjust database.

If you query by using secondary index : 

Query  may like as :

 SELECT SINGLE xblnr INTO t_xblnr FROM bkpf
     WHERE xblnr = trcode
    %_HINTS ORACLE 'INDEX("bkpf" "bkpf~ZRF")'.

I have shown this query only for Oracle database. Also don't need by following
this query. You can write Normal Query by using Secondary index. It will be called automatically.

Note :   You can create Secondary index for ZTABLE and Standard Table.






Comments

Popular posts from this blog

Create BP and Customer Using ABAP in SAP

Create/Edit/Delete Attachments using GOS in Sap ABAP