SAP CRM Application Extension Tool(AET)扩展字段的渲染原理
Recently I am doing an S4 project and I have to figure out how extension fields created by S4 extension tool is rendered in Fiori UI. It turns out that when end users add extension field in S4 Fiori UI, the UI itself is not changed at all.
Instead the detail information regarding this extension field ( label, data type, in which UI it is put etc ) are recorded into a repository in the backend server. In the runtime when the UI with extension field is rendered, this detail information is retrieved from backend repository to dynamically render the extension field in Fiori UI. This merge process is done every time the UI is displayed.
Naturally I begin to think how extension field created by CRM Application Extension Tool is rendered in Web Client UI.
In order to figure it out, first I create an extension field in CRM Product overview page:
Then I click F2 to find out its technical name and UI context ID.
Open UI Component workbench, the layout of view PRDHS/Header comes purely from configuration data. So just debug line 11 to check where this configuration xml data is stored.
The answer is from table BSPC_DL_XMLSTRX2.
This could be confirmed by checking it with context id we find via F2.
From the row read from this table, I can find the corresponding entry for extension field.
Based on this XML, Web Client UI framework now has enough information to render html page.
Just as introduced in this blog that for UI5, each kinds of UI control has its specific render which is responsible to convert UI5 control instance to native HTML source code, here CRM Web Client UI has similar logic.
In this class in line 114 below, the XML data is converted to final native HTML source code
Go deep into this method, the logic is the XML data is parsed and corresponding UI element instance is created based on settings in XML data.
All created element instances are stored in an internal table LT_RENDERER for later conversion.
The highlighted entry in below screenshot represents the UI element for extension field I created.
Then the internal table LT_RENDERER is LOOPED, render class for each UI element is called to generate HTML source code.
Below screenshot is the result HTML source code generated for the extension field:
<span class="th-tx th-tx-value th-tx-nowrap" style="width:100%; " title="test by IMS2 ffff fdggfdg ttt" id="C30_W112_V113_product_ext.zzbfld0000nx">test by IMS2 ffff fdggfdg ttt
Once all conversion are done, check the content in variable lv_html in HTML view in debugger, the extension field is already there. This is also end user will see in browser finally.
- 遇见requestAnimationFrame
- 认识createDocumentFragment
- 点击穿透原理及解决
- 如何使用Intellij搭建Spark开发环境
- 如何重置Cloudera Manager的admin密码
- 如何在CDH集群安装Anaconda&搭建Python私有源
- 如何使用Python Impyla客户端连接Hive和Impala
- 如何在Windows Server2008搭建DNS服务并配置泛域名解析
- 如何通过CM API优雅的获取元数据库密码
- CM启动报InnoDB engine not found分析
- 如何在Hue中使用Sentry
- 如何在Redhat中配置R环境
- 如何在Redhat中安装R的包及搭建R的私有源
- 什么是sparklyr
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- 【大家的项目】Rust Base62 库学习和分析
- ES2020 中 Javascript 10 个你应该知道的新功能
- Webpack5 跨应用代码共享 - Module Federation
- 【Rust日报】2020-09-16 - Rust 2021 规划
- 精讲响应式WebClient第3篇-POST、DELETE、PUT方法使用
- C++的黑魔法: 用四种方式实现add!
- 精讲响应式WebClient第2篇-GET请求阻塞与非阻塞调用方法详解
- 算法篇:位运算异或的使用(一)
- 精讲响应式webclient第1篇-响应式非阻塞IO与基础用法
- k8s 二进制集群平滑升级 1.15.2升级至1.16.4
- 使用Java API进行tar.gz文件及文件夹压缩解压缩
- 动画 | 一文掌握 Flex 布局
- 精讲响应式WebClient第6篇-请求失败自动重试机制
- 算法篇:位运算基本操作
- Vue 项目中各种痛点问题及方案