How to create Full Text Index in ABAP for SAP HANA DB

0
4965

Dear SAPLearners, in this blog post, we will learn how to create a Full Text Index in ABAP for the SAP HANA database.

What is Full Text Index?

The SAP HANA database supports a full-text index as a secondary table index. A full text index creates an additional invisible column on the database.

As a result, the column’s content for a full text index will be saved to this additional column with appropriate formatting and is evaluated when the relevant data is accessed.

Also Read: 4 New Features in ABAP Dictionary for HANA databases.

Most importantly, to create a full-text index following conditions should be met:

  • A full text index can only be created for the SAP HANA database and for tables with the storage type column store.
  • A full text index can only be created for precisely one column in a database table whose predefined data type is CHAR, SHORTSTRING, STRING, or RAWSTRING.
  • The database table must have a column for the text language.

A full text index is always non-unique.

Now let’s see the steps to create a Full-Text Index in ABAP. In this demo example, I am creating Full-Text Index for a particular column, “NAME,” in the database table “SCUSTOM.”

Step-by-Step Procedure

1. Navigate to SE11 transaction and choose the table “SCUSTOM.” Then, click on Indexes to display the available indices for the table.

Full Text Index in ABAP

2. In the Indices for Table SCUTOM dialog window, click on create button and choose to Create Index from the context menu.
Provide Index Name and hit the Ok button like below.

Full Text Index in ABAP

3. Next, provide Short Description and add/choose the column “NAME” in the Index fields table like below

Full Text Index in ABAP
Full Text Index is only supported for SAP HANA databases, we have to provide some database-specific settings. 

4. After that, select the radio button For Selected database Systems and hit the button right next to it. Provide following details like mentioned below on Database-specific Index dialog

5. Now, choose the Goto option in the menu bar and choose Full Text Index from the context menu below.

Full Text Index in ABAP

6. Finally, tick the Full Text Index check-box and hit the Copy button.

Full Text Index in ABAP

7. Save and activate the index. Upon successful activation full-text index is created successfully in ABAP for HANA databases.

Conclusion

Congrats!! You have successfully learned the steps on how to create a Full Text Index in ABAP for SAP HANA DB. If you liked it, please share it! Thanks!

Please feel free to comment and let us know your feedback. Subscribe for more updates