如何创建自己的SAP CRM产品主数据search scenario

简介: 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.


image.png

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.


image.png

(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 )

image.png

(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

相关文章
|
14天前
|
人工智能 搜索推荐 Serverless
使用金庸的著作,来测试阿里通义千问最新开放的长文档处理功能
使用金庸的著作,来测试阿里通义千问最新开放的长文档处理功能
35 7
使用金庸的著作,来测试阿里通义千问最新开放的长文档处理功能
|
10天前
|
存储
使用 ABAP 代码打印出 SAP CRM 系统里所有维护了 Sales Area 的 business partner id
使用 ABAP 代码打印出 SAP CRM 系统里所有维护了 Sales Area 的 business partner id
19 0
|
14天前
|
数据库
SAP CRM产品主数据无法根据产品描述字段进行搜索的原因
SAP CRM产品主数据无法根据产品描述字段进行搜索的原因
15 5
|
14天前
|
Web App开发 开发者 存储
介绍一个 webp 格式转 png 格式的软件:XNConvert
介绍一个 webp 格式转 png 格式的软件:XNConvert
19 6
介绍一个 webp 格式转 png 格式的软件:XNConvert
|
14天前
什么是 SAP ABAP 里的 Subscreen
什么是 SAP ABAP 里的 Subscreen
13 1
什么是 SAP ABAP 里的 Subscreen
|
1月前
|
中间件
什么是 SAP CRM 系统里的 Initial Download
什么是 SAP CRM 系统里的 Initial Download
22 0
|
1月前
|
中间件
什么是 SAP CRM Initial Download
什么是 SAP CRM Initial Download
20 0
|
1月前
|
存储 数据管理 数据处理
SAP CRM 里 Attachment 搜索的实现逻辑介绍
SAP CRM 里 Attachment 搜索的实现逻辑介绍
18 0
|
2月前
|
存储 数据库 容器
深入介绍 SAP CRM 附件存储的底层实现机制
深入介绍 SAP CRM 附件存储的底层实现机制
30 0
|
2月前
|
JavaScript 前端开发 数据库
如何在 SAP CRM 里通过 navigation framework 跳转到 ABAP Webdynpro 页面
如何在 SAP CRM 里通过 navigation framework 跳转到 ABAP Webdynpro 页面
21 0