Ansicht
Dokumentation

HRPAO_SHLP_SEARCH_ES_ATTR_VALS - F4 Help for Embedded Search Attributes

HRPAO_SHLP_SEARCH_ES_ATTR_VALS - F4 Help for Embedded Search Attributes

BAL_S_LOG - Application Log: Log header data   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Description

This function module is designed to be used as a search help exit within search help definitions in the ABAP dictionary (transaction SE11).

The function module incorporates a generic integration of the Search Engine Service (SES) into the F4 search help concept. Thus the F4 search help integration for TREX-based searching can be done just by declaration alone, without further programming.

Functionality

The main function is to map the parameters from the elementary search help definition to the attributes used in the search engine query. Additionally, it maps the result list from the search engine (name/value pairs) back to table RECORD_TAB of the search help exit interface afterwards. All this is done without having to define an extra object-specific data structure (type) in the ABAP dictionary.

Features in detail:

  • Full text search with optional fuzzy mode. Full-text search includes searching for all indexed attributes, short texts, and long texts.
  • Efficient attribute search, especially when using wildcards on large data volumes
  • Case-insensitive search
  • Search across all maintained languages simultaneously
  • Search for multiple business-object types simultaneously
  • Key-date search on validity periods (time ranges)
  • Support for the standard Multiple selection (SELECT-OPTIONS) in the F4 selection screen. Multiple selection is automatically disabled for search parameters where it is not appropriate.
  • Search by relation. This means, for example, search for customer with attributes or full text of the related material. The customer attributes appear in the results list. The attributes of the material are used for the search.

Example

The standard shipment contains the collective search help SFLIGHT_SES, which includes the elementary search helps SFLIGHT_SES_QUICK, SFLIGHT_SES_ADVANCED, and SFLIGHT_SES_ADVANCED_REL. You can use these as a template and for testing the behavior of this function module. To test a search help, choose Test... (F8) on the main screen. If you have not already done so, you can use the programSAPBC_DATA_GENERATOR to generate test data.

Use

The examples given above may serve as a reference for most of the following information.

  • If this search help exit is assigned to a collective search help and no search engine is connected or the required indexes have not been created yet, the affected elementary search helps are automatically suppressed on the user interface.
  • On the definition tab of your collective and elementary search help, this function module must be assigned as a search help exit.
  • The list of search help parameters should contain the following fixed parameters:
  • S/RP/SEARCH_TERM - for full text search

  • The optional parameter S/RP/MODE_FUZZY should be provided in the advanced search selection screen. It activates the fuzzy mode for the full-text search. On the quick search selection screen, the parameter should be omitted. Then this search help exit automatically activates the fuzzy mode, if no objects can be found without it.
  • The optional parameter OBJECT_TYPE should be provided if you use it in your implementation. For example, if you use it to represent the category of an equipment master, you should offer it and assign the appropriate data element. In the Equipment master example, this is EQTYP.
  • The list of search help parameters should contain the following parameters for searching by relation:
  • S/RP/REL_TYPE_ID # relation type ID between the two business objects

  • The search help parameter of the relation object attributes should begin with #S/RT/#, for example, S/RT/CITYFROM.

  • The optional parameter S/RP/SEARCH_TERM_REL_OBJ should be provided for the relation search. It is the input field for the full-text search of the relation object. You can use the data element COM_SEARCH_TV_SEARCH_TERM_F4_R.
  • The advanced search selection screen usually contains object-specific search parameters. Note that the parameter names must exactly match the attribute names that you use in your implementation of GET_ATTRIBUTE_NAME_LIST. You can easily view the attribute list for the current object type by replacing the program flag LV_DEBUG to 'x' in debug mode.
  • If you want to provide a key-date search on validity periods, the describing attributes must obey a certain naming rule: The validity period must begin with a validfrom attribute and must end with a validuntil attribute. Then the key-date parameter in the search help definition must be named S/KD/.
Example:
The validity period begins with validfrom_date and ends with validuntil_date. In this case, you need to name the key-date parameter S/KD/_DATE. Then this function module automatically creates the following selection:
S/KD/_DATE >= validfrom_date AND S/KD/_DATE <= validuntil_date

Notes

  • If you leave the parameter BUSINESS_OBJECT open for a selection, it can be used for a multiple selection (SELECT-OPTIONS). This allows searches for multiple business objects simultaneously. For example: Material, equipment, and functional locations. Unfortunately, the definition screen for search helps allows only one default value per parameter. So if you want to default a fixed list of business objects, you need to write a wrapper function module around this one, in which you can fill the sub-table SELOPT for the interface parameter SHLP with a hard-coded range of business objects.
  • The prerequisite for using SES to search business objects is that they have been indexed using SES beforehand. Therefore, the interface IF_COM_SE_BUSOBJ must be implemented for each business object. You can use transaction SES_ADMIN to customize and monitor the ongoing indexing process.
  • The prerequisite for using search by relation is the implementation of the interface IF_COM_SE_BUSOBJ_REL. You can use transaction SES_ADMIN to customize and monitor the ongoing indexing process.
  • The value of the search help parameter BUSINESS_OBJECT is always the business object for which attributes will be listed as a result.
  • Attributes of the relation object should not be displayed in the results list. The position of this parameter in the hit list should be set to 0. In addition, you cannot export this value.
  • If there are no hits in the relation object, the results list is empty.

Further information





Parameters

CALLCONTROL
RECORD_TAB
SHLP
SHLP_TAB

Exceptions

Function Group

HRPAO_SHLP_EXITS

ROGBILLS - Synchronize billing plans   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 8683 Date: 20240523 Time: 112642     sap01-206 ( 138 ms )