This document describes how to configure Fuzzy Search in Search Help using CDS Views for ABAP. This feature is available in SAP NetWeaver 7.4 SP5 and higher.
The objective of this document is show, how easy it is to configure fuzzy search in Search Help ABAP Object with zero coding.
SAP HANA allows fast search access to character based columns. Fuzzy Search is a fast and fault-tolerant search feature for SAP HANA. A fuzzy search returns records even if the search term contains additional or missing characters or other types of spelling errors. That can be very helpful in F4 Search Helps or duplicate checks.
The traditional way of implementing the fuzzy search logic in Search Help mandates implementing a function module and assigning the same as Search Help Exit of the Search Help. The fuzzy search logic of course should then be implemented using Native SQL [ADBC] since it is a HANA specific feature. However, from SAP NetWeaver AS ABAP 7.4 SP05 onwards, Search Help Dictionary Object provides an additional option – Enhanced Options – where you can configure fuzzy search options [like accuracy value, cross column options etc.]. This eliminates the need of implementing function module to achieve in such scenarios.
Search helps can be used to assign an input help (F4 help) to screen fields. The user can display the list of all possible input values for a screen field with the input help.
There are several types of Search help such as:
Core Data Services (CDS) enhanceSQL to allow defining and consuming semantically rich data models, thereby improving consumption, performance and interoperability. CDS simplifies and harmonizes the way you define and consume your data models, regardless of the consumption technology. CDS in ABAP provides you with a data definition language (DDL) for defining semantically rich database tables/views (CDS entities) and user-defined types in the database.
For several years for now, it is possible to define views in the ABAP Dictionary, but these views are quite restricted. For example, you can only define inner join for database views. Outer joins are available only for help and maintenance views. However, it is not possible to perform aggregations in views or define nested views. With ABAP 7.4 SP05, a new editor is available to define views directly in the Eclipse-based ABAP development environment. With this Source-based editor you can define CDS entities, which can be consumed in ABAP programs using Open SQL.
The CDS View building provides another way of code pushdown using features that are similar as in Open SQL. With CDS View building it is possible to define:
Nesting of Views with associations between the View entities (associations can be consumed in the WHERE clause as well as in expression in Open SQL queries).
Before getting started, you must generate data related to Enterprise Procurement Model (EPM). You can use the transaction SEPM_DG_OIA to generate
the data for EPM model. For more information about EPM, see http://scn.sap.com/docs/DOC-31458
For creating search help, use the CDS view SEPM_CDS_OPEN_INVOICE_REDUCED. The ABAP view name of this CDS view is EPMAPPS_CDS_OIR.
This CDS view is part of the package S_EPM_OIA_APPS_PROVIDER. This CDS View fetches all the Open Sales Orders – sales orders whose payment is
yet to be made by the Buyers. Buyer Name, Dunning Level, Overdue Invoice Amount, Currency are some of the details retrieved for each of the Sales Order.
Below is the structure of the CDS view [SEPMAPPS_CDS_OIR].
The steps to implement fuzzy search logic in CDS view [SEPMAPPS_CDS_OIR] using “Enhanced Options“ in Search Help are described below:
Note: Enhanced Options available in Search Help work only with DDIC tables and CDS view. Currently, Enhanced Options does not support the usage of external view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
6 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 | |
2 | |
2 |