Created by Jerry Wang, last modified on Oct 03, 2016
Technically it is possible to create your own search scenario, filter class and search tool, and put your custom search logic there. Then write another report to trigger search implemented by your own search scenario:
(1) Create your filter class with interface IF_COM_PRSEARCHFILTER.
Put your own filter logic in method FILTER. It will be called by your own search tool. Define which search criteria will be relevant for your filter. In my example since I need to re-implement search by object description, so I make short text set type as relevant criteria.
(2) Create your own search tool with interface IF_COM_PRSEARCHTOOL.
Implement method RELEVANT_CRITERIA which has the same logic as your own filter class.
Implement method GETLIST_ACTIVE. Put your optimized solution in this method.
(3) Create your search scenario class with super class CL_COM_PRSEARCHSCENARIO_BASE. Redefine DETERMINE_STANDARD_TOOL. Just specify your own search tool and filter class in this method.
CREATE OBJECT lr_tool TYPE ZCL_NEW_SEARCH_TOOL_AFTER_OPT.
ei_tool = lr_tool.
CREATE OBJECT lr_filter TYPE ZCL_NEW_FILTER_AFTER_OPT.
INSERT lr_filter INTO TABLE et_filter.
(4) [Optional] integrate your own search in PREPARE_DB_RANGE_SEARCH ( standard code change necessary )
(5) Since currently we do not need to integrate the new search via end-to-end way, we simply write a report to trigger search which will use our own search: This FM will not be used by UI search, so when you are comparing your search performance with standard search, please also trigger standard search via this report, too.
ls_option-frgtype_id = 'COMM_PR_SHTEXT'.
ls_option-attribute = 'SHORT_TEXT'.
ls_option-sign = 'I'.
ls_option-option = 'EQ'.
ls_option-low = 'object mass created of 200124'.
ls_option-high = space.
INSERT ls_option INTO TABLE lt_option.
CALL FUNCTION 'COM_PRODUCT_GETLIST_API'
EXPORTING
it_gen_sel_options = lt_option
iv_scenario = 'ZCL_NEW_SCENARIO_AFTER_OPT'
IMPORTING
et_product = lt_product
et_bapireturn = lt_return
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关推荐
SAP NW PI 7.1 Scenario at Swiss Post.pdf
SAP PI RFC-to-Web Service Scenario场景,同步
SAP HANA System Replication Scale-Up - Performance Optimized Scenario
With SAP S/4HANA Cloud 2008, Electronic Payment Integration for China (EPIC) provides the SAP_COM_0554 integration scenario to enable transfer of messages from SAP system to the communication client ...
SAP Process Orchestration The Comprehensive Guide, 2nd Edition SAP流程编制综合指南 1 Introduction to SAP Process Orchestration 1.1 Historical Overview and Evolution 1.1.1 SAP Process Integration ...
1. SLD(System landscape directory)中创建software component 2. ESR(Enterprise service repository)中创建software component version 3. 创建namespace 4. 创建folder 4. 创建date type DT 并激活 5. 创建...
Implementing a Distributed Two-Phase-Commit Scenario with Web Services and SAP NetWeaver PI 7.1.pdf
Step-by-Step guide to develop Outbound ABAP Proxy from SAP with PDF attachment
Useful information regarding SAP XI,包括XI各种适配器的应用实例,Receiver File adapter,designing a BPM,file to RFC,IDoc to IDoc Scenario,File-to-File Scenario等等。很实用的
Using a real-world business scenario as a running example, SAP® BW presents a comprehensive view of the technology, from underlying concepts and basic techniques through its most sophisticated ...
Transportation Management-Overview Transportation Management-Package Building and Load Planning Transportation Management-Package Units ...Transportation Management-Update Handler Scenario Builder
4.1.1.11 Packet Tracer - Configuring Extended ACLs Scenario 2.pka
SOA Design Scenario Case Study with IBM products
林肯实验室darpa数据集_2000年(Lincoln Laboratory Scenario (DD0S) 2.0.2)
在ESR中创建Process Integration Scenario并在ID自动生成配置
为研究随机环境下的生产能力扩张问题,采用Scenario方法,建立了市场需求量和产品价格为随机变量的多计划期能力规划决策模型.其中考虑了两种情况:一是能力投资方案不随...
ESSE是一种灵活,高效且易于使用的搜索引擎,用于在环境数据档案中进行数据挖掘。 即使您不确切知道要查找的内容,ESSE也会帮助您找到有用的数据。
Scenario Manager 允许用户设置 Witness 仿真模型中各元素相关参数的取值范围,在这些参数的各种配置中对模型运行仿真试验,並將每种配置下的试验统计数据保存到数据库中。 Scenario Manager 的主要功能包括: 1. ...
资源分类:Python库 所属语言:Python 资源全名:scenario-1.2.3.dev85.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059