I use the issue in this blog to demonstrate the usage of this small repository parse tool: We need to know under which enhancement set the component usage “ZCUSTOM” is added to UI component BT116H_SRVO.
This customizing activity could allow us to compare the runtime repository between the original UI component and the enhanced one:
However, if there are too many enhancement sets in the system, it could be very inefficient for manual comparison.
Fortunately the comparison could be done by code below.
The report is quite simple: (1) in line 9, get all enhancement sets list under which the UI component is enhanced. (2) get the enhanced BSP application name and page name in line 11 and 12, then get the component usage information for each enhanced BSP application via repository tool, then filter it by usage name “ZCUSTOM”.
REPORT zbsp.
CONSTANTS: cv_host TYPE o2applname VALUE 'BT116H_SRVO'.
DATA: lt_enh_sets TYPE bsp_dlct_ehset,
ls_enh_set LIKE LINE OF lt_enh_sets,
lt_extension TYPE STANDARD TABLE OF bspwd_comp_ext,
ls_extension LIKE LINE OF lt_extension,
lt_usages TYPE bsp_wd_cmp_usage_descr_tab,
ls_usage LIKE LINE OF lt_usages.
lt_enh_sets = cl_bsp_dlc_config_util=>get_eh_sets_of_comp( iv_comp_name = cv_host ).
CHECK lt_enh_sets IS NOT INITIAL.
SELECT * INTO TABLE lt_extension FROM bspwd_comp_ext FOR ALL ENTRIES IN lt_enh_sets WHERE
enhancement_set = lt_enh_sets-enhancement_set AND comp_name = cv_host.
LOOP AT lt_enh_sets INTO ls_enh_set.
READ TABLE lt_extension INTO ls_extension WITH KEY enhancement_set = ls_enh_set-enhancement_set comp_name = cv_host.
IF sy-subrc = 0.
CLEAR: lt_usages.
CALL METHOD zcl_view_repo_tool=>get_repo_metadata(
EXPORTING
iv_comp_name = ls_extension-bsp_appl
iv_page_name = ls_extension-rt_rep_page
IMPORTING
et_usages = lt_usages ).
READ TABLE lt_usages WITH KEY usage_name = 'ZCUSTOM' INTO ls_usage.
IF sy-subrc = 0.
WRITE: / 'EnhancementSet: ', ls_enh_set-enhancement_set,
' defines component usage to component: ', ls_usage-child_cmp_type.
ENDIF.
ENDIF.
ENDLOOP.
The small parse tool zcl_view_repo_tool just parse the repository xml from database table and convert it to two internal tables which contains the view information and component usage information. Its source code could be found in attachment.
We can compare the report execution result and the manual check via customizing activity: they are exactly the same.
Update on 2017-06-02 14:45PM
It seems the source code in attachment is lost after SCN is migrated to SAP community. Please use the following report instead:
REPORT tool_bsp_metadata.
PARAMETERS: name TYPE o2applname DEFAULT 'SMCHS'.
TYPES ltype_viewline TYPE cl_bsp_wd_rep_view=>gtype_viewline .
TYPES:
BEGIN OF gtype_op_mapping,
name TYPE string,
op_plug TYPE string,
switch_id TYPE sfw_switch_id,
reaction TYPE sfw_showhide,
END OF gtype_op_mapping .
TYPES:
BEGIN OF gtype_ip_follow_up,
name TYPE string,
navlink TYPE string,
switch_id TYPE sfw_switch_id,
reaction TYPE sfw_showhide,
END OF gtype_ip_follow_up .
TYPES:
BEGIN OF gtype_navlink,
name TYPE string,
targets_done TYPE flag,
targets TYPE tbsp_wd_rep_navigation_targets,
sfw_data TYPE bsp_wd_sfw_data BOXED,
END OF gtype_navlink .
TYPES:
BEGIN OF gtype_viewline,
view TYPE string,
active TYPE abap_bool,
view_id TYPE n LENGTH 4,
parent_viewset TYPE string,
parent_viewarea TYPE string,
parent TYPE REF TO cl_bsp_wd_rep_view,
initials TYPE tbsp_wd_rep_viewarea_assigns,
initials_done TYPE abap_bool,
navlinks TYPE SORTED TABLE OF gtype_navlink
WITH NON-UNIQUE KEY name
INITIAL SIZE 0,
rep_view TYPE REF TO cl_bsp_wd_rep_view,
is_window TYPE abap_bool,
is_intf_view TYPE abap_bool,
is_default_window TYPE abap_bool,
ip_follow_ups TYPE HASHED TABLE OF gtype_ip_follow_up
WITH UNIQUE KEY name
INITIAL SIZE 0,
op_mappings TYPE HASHED TABLE OF gtype_op_mapping
WITH UNIQUE KEY name
INITIAL SIZE 0,
sfw_data TYPE bsp_wd_sfw_data BOXED,
END OF gtype_viewline .
TYPES:
ltype_view_tab TYPE HASHED TABLE OF ltype_viewline
WITH UNIQUE KEY view active
INITIAL SIZE 0 .
DATA: lv_loader TYPE REF TO cl_bsp_wd_stream_loader,
lv_xml TYPE string,
lv_root TYPE string.
CREATE OBJECT lv_loader.
lv_xml = lv_loader->load_from_bsp_page( iv_bsp_appl = name
iv_bsp_page = 'Repository.xml' ). "#EC NOTEXT
DATA: lt_views TYPE ltype_view_tab,
lt_usages TYPE bsp_wd_cmp_usage_descr_tab,
result TYPE REF TO cl_bsp_wd_repository.
* "parse" repository xml data directly into memory
CALL TRANSFORMATION bsp_wd_rt_rep_runtime
SOURCE XML lv_xml
RESULT views = lt_views
rootview = lv_root
usages = lt_usages.
BREAK-POINT.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关推荐
在SAP CRM 7.0版本中,WebClient UI配置是一项关键任务,它涉及到了用户界面的定制和优化,以提升用户体验和业务效率。WebClient UI是SAP CRM的一个核心组件,提供了一个基于Web的交互界面,使得用户能够访问和操作...
这是cross component navigation在起作用。 Result list是model在ICQR里面,如果点service,会navigate到service detail page,这个service detail page是做在PRD02OV上,所以这个navigation是cross component ...
WebClient类提供了DownloadData、DownloadFile等方法来下载数据或文件。例如,下载文件到指定路径可以使用以下代码: ```csharp using (WebClient client = new WebClient()) { client.DownloadFile(...
首先,让我们来看看SAP CRM WebClient UI的发展历程。从最初的GUI界面,到PCUI,再到IC WebClient,最终发展到目前最新的WebClient UI,这一过程中,用户界面不断优化,以适应不同设备和用户的使用需求。在CRM 7.0...
`DownloadProcessForm.Designer.cs`和`DownloadProcessForm.cs`组合起来构成了一个显示下载进度的窗体,其中Designer.cs文件包含窗体设计的元数据,而cs文件包含窗体的逻辑代码,如事件处理和用户交互。 `...
SAP CRM的基础知识通常包括对于其核心组件的理解,包括主数据(如账户、组织模型、产品等),交易处理、定价、开票、CRM中间件以及CRM WebClient UI。CRM中间件主要负责不同系统组件之间的信息交换,而CRM WebClient...
在SAP CRM基础培训中,WebClient UI(Web客户端用户界面)是一个重要的学习焦点,它是用户与系统交互的主要界面。下面我们将深入探讨WebClient UI的相关知识点。 WebClient UI的发展历程是从GUI(图形用户界面)...
Sent: Thursday, May 9, 2013 6:30 PM Subject: ON_NEW_FOCUS的用途 ROOT ———————————— Product ID PRODshortText ———————————— Product Description Genil Model hierarchy
在SAP CRM WebUI中创建下拉列表是一个关键任务,特别是在设计用户界面以提供更高效、用户友好的交互时。本教程将引导你通过一系列步骤来实现这一目标,特别是针对SEX(性别)属性创建一个下拉框。 首先,你需要获取...
总结,`WebClient`是.NET开发中一个强大且实用的工具,它简化了向IIS服务器上传数据的过程。理解其工作原理和最佳实践,可以帮助开发者构建高效、安全的网络应用程序。在实际项目中,根据需求可能会涉及到更多细节,...
### C# WebClient 上传文件知识点解析 #### 一、引言 在开发过程中,经常会遇到需要将客户端的文件上传到服务器的需求。C#语言提供了多种方法来实现这一功能,其中`WebClient`类就是一种非常简便的方式。本文将详细...
UI Guidelines for CRM WebClient User Interface
在C#编程中,WebClient类提供了一种简单的方式来实现文件下载。WebClient是一个高度封装的网络通信类,主要用于HTTP协议交互,包括上传和下载数据。以下是对标题和描述中涉及知识点的详细解释: 1. **WebClient下载...
为了实现数据的上传和下载,可以使用.NET Framework中提供的WebClient类。本文将详细介绍如何在Silverlight中利用WebClient类上传和下载流数据。Silverlight是一个用于开发和运行丰富的互联网应用程序(RIA)的平台,...
WebClient上传下载源码 我们先在IIS网站中建立一个文件夹,此处为"Mp3",并设置此文件夹相关读写权限。 例1:使用WebClient中的UploadFile方法上传文件。代码如下。使用此方法需要将上传的文件夹权限设置为 IIS来宾...
在C#编程中,WebClient类是一个非常实用的工具,它提供了向网络资源发送和接收数据的能力。在某些场景下,我们需要使用POST方法来传递数据,比如提交表单或者与Web服务进行交互。POST方法相比于GET方法的优势在于它...
WebClient安装文件。 在Java世界中,有许多用于发送HTTP请求的库。比较三种流行的HTTP客户端:WebClient,HttpClient和OkHttp。WebClient是Spring 5中引入的非阻塞,反应式的Web客户端。它是在Project Reactor和...
在Silverlight应用中,我们同样可以使用WebClient进行POST请求,但必须确保遵循Silverlight的安全模型。例如,跨域请求需要服务器端提供适当的跨域策略文件。以下是在Silverlight中使用WebClient的示例: ```csharp...
`WebClient`对象可以自动解析URL,因此可以在下载过程中将URL从相对地址转换为绝对地址。 #### 二、创建`WebClient`实例 创建`WebClient`实例非常简单: ```csharp using (WebClient client = new WebClient()) {...
在C#编程中,WebClient类是一个非常实用的工具,用于执行HTTP协议的基本操作,如下载、上传数据等。在本教程中,我们将深入探讨如何使用WebClient类来实现一个功能完善的网络资源下载器,包括实时显示下载速度和进度...