SAP S/4HANA Customer Management里的页面搜索结果的分页显示原理-阿里云开发者社区

开发者社区> jerrywangsap> 正文

SAP S/4HANA Customer Management里的页面搜索结果的分页显示原理

简介: SAP S/4HANA Customer Management里的页面搜索结果的分页显示原理
+关注继续查看

You might also be interested with this blog Search Paging implementation in S/4HANA and CRM Fiori application.


The search implemented by WebClient UI framework in S/4HANA for Customer Management(called as S4CRM for short) does have paging mechanism with a small difference compared with other SAP products.

Suppose I have specified the following search criteria:


image.png


In my test system I prepares lots of Service Request as test data, so 200 Service Requests found as expected. The results are divided into 10 pages with each page displaying 20 rows by default.


image.png


Two key points for paging implementation in CRM WebClient UI framework:


(1) Business data with number which equals to “max hit” value specified by end user is retrieved from database and held in application memory in ABAP backend server.


In my example above, the number is 200.


(2) As WebClient UI is a server-rendering technology, all html source code are prepared in ABAP server. The browser simply displays those html source code assembled in the backend. ABAP backend only renders source code for records which will be visible in current page.


Take my above example for illustration, after I click search button, 200 Service Requests are fetched and held in the given buffer implemented in Agent search application. WebClient UI framework then prepare html source code for first 20 Service Requests. When I click page index “2”, the source code for 21th~ 40th records are generated.

If you woud like to get these two conclusions by yourself, you can following my research steps below.


(1) You can use ST05 to find out the exact code where the Service Requests are fetched from new CDS view in S4CRM: CRMS4_SERVHSRCH


image.png


Then the last record is discarded:


image.png


Set a breakpoint in view ICCMP_INBOX/INBOXRESULTVIEW.HTM, inspect variable “me” in debugger:


image.png


And use this reference path to find the 200 records held in BOL collection wrapper:

{O:5768*\CLASS-POOL=CL_BSP_WD_COLLECTION_WRAPPER\CLASS=LCL_COLLECTION_REF}-IF_BSP_WD_COLLECTION_REF~COLLECTION


image.png


(2) When I click the page index “2”, the second page is displayed:


image.png


the assembed html source code for these rows with index from 21 to 40 could be observed in Http response sent from ABAP backend:


image.png


How does backend server know it should render rows starting with index 21? This index is passed by frontend via http request parameter ItemTree_visibleFirstRow.

If you still have doubt about the prefix C36_W138_V139_, please refer to my blog WebClient UI element ID generation logic


image.png


Just set breakpoint on method CL_THTMLB_CELLERATOR~GET_REQUEST_PARAMETERS to figure out where the backend interprets this visibleFirstRow:


image.png


In BSP renderer class CL_THTMLB_CELLERATOR, this gv_visible_first_row is used as the starting index of current page – lv_current_row_index:

image.png



Then each rows’ cells are rendered within the loop against 8 columns visible in UI by default:


image.png


Table Columns header information are stored in lt_cellerator_cols:


image.png

For trouble shooting purpose you can inspect the final rendered html source code for current page in variable GT_TABLE_ENTRIES:


image.png


html source code for rows in second page starting from index 21:


image.png


and ends with index 40:


image.png


why gt_table_entries have 168 records?

20 records are displayed in a page by default plus one row for table column display, and in each row 8 columns are displayed with default configuration, as a result: ( 20 + 1 ) * 8 = 168


Further Reading and update for S4CRM

CRM One Order Model Redesign in S/4HANA for Customer Management 1.0 – Part 1 – this blog give you more detail about One Order Model Redesign and how One order readworks under this new adapted model in S/4HANA.


Part 2 – continue with Part 1, focus on write scenario.

Create Mass Products by code in S4HANA for Customer Management – this blog briefly introduces how CRM Product works in S/4HANA for Customer Management and provides the example how to create product using ABAP code.

Create Mass Service document in S4HANA for Customer Management – How to create a huge volume of Service Order, Service Confirmation and Service Request by One Order function module

One order extensibility in S4HANA for Customer Management – explain how to create extension field in S/4HANA for Customer Management using S/4 extension tool instead of Application Enhancement Tool(AET) originally used in SAP CRM

One Order Partner Component model in S/4HANA for Customer Management – it is well known that in service document header and each item, it is possible to maintain multiple partners with different party roles. How is it handled in the new world?

Step by step to create custom partner function in S4HANA for Customer Management

One Order Status Component in S4HANA for Customer Management

Best Practices for SAP S/4HANA for customer managementTwo processes are supported:

(1) Service Order Management


(2) IC Service Request ManagementThe package provides all accelerators needed to set up and test a system with these processes configured and ready to use.


It provides customers, partners and SAP the possibility to explore the solution quickly.


The package is also the basis for a engineered implementation service.


How to create employee in S/4HANA for Customer Management

Paging Implementation in S/4HANA for Customer Management


版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
阿里云服务器怎么设置密码?怎么停机?怎么重启服务器?
如果在创建实例时没有设置密码,或者密码丢失,您可以在控制台上重新设置实例的登录密码。本文仅描述如何在 ECS 管理控制台上修改实例登录密码。
10089 0
恶意程序操纵谷歌搜索引擎结果页面 用户需警惕
【Csdn 5月14日 详讯】最近,谷歌公司因“街景地图(Street Viewmapping)”的隐私安全隐忧和Android开源手机操作系统的商标侵权指控备受关注。然而,就目前来看,“矛头”已指向了谷歌的心脏:谷歌搜索引擎。
658 0
代码评比结果的反思
这次代码重构大赛,我们团队没有上榜。反思:(1)一定要知道验收人的真实需求。表面上是重构代码,实际上做的是需求。业务验收人的依据是,简单好找,具体是:把所有逻辑中与taskName相关的操作都抽出来,做为工厂方法的输出【注意:没有提逻辑结构,没有提抽象层次。
557 0
阿里云服务器端口号设置
阿里云服务器初级使用者可能面临的问题之一. 使用tomcat或者其他服务器软件设置端口号后,比如 一些不是默认的, mysql的 3306, mssql的1433,有时候打不开网页, 原因是没有在ecs安全组去设置这个端口号. 解决: 点击ecs下网络和安全下的安全组 在弹出的安全组中,如果没有就新建安全组,然后点击配置规则 最后如上图点击添加...或快速创建.   have fun!  将编程看作是一门艺术,而不单单是个技术。
10884 0
阿里云服务器如何登录?阿里云服务器的三种登录方法
购买阿里云ECS云服务器后如何登录?场景不同,阿里云优惠总结大概有三种登录方式: 登录到ECS云服务器控制台 在ECS云服务器控制台用户可以更改密码、更换系.
13891 0
将div固定在页面最下面、将百度搜索框嵌入页面
版权声明:转载请注明作者及出处,否则将追究法律责任。 https://blog.csdn.net/q2158798/article/details/79310233 1.
1427 0
+关注
2628
文章
0
问答
来源圈子
更多
+ 订阅
文章排行榜
最热
最新
相关电子书
更多
《2021云上架构与运维峰会演讲合集》
立即下载
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载