使用Fiori Elements创建的SAP UI5应用,如何支持编辑功能
In previous blog Create a CRM Service Order Fiori application within a couple of minutes I introduced the approach to generate a Fiori application which supports search and display on Service Order within just a few minutes.
In this blog, I will use one field in Service Order header level to demonstrate how to enable Service order change and save function.
After finished, the Fiori application has the following feature:
When you click edit button:
The fields in UI will become editable:
Change the posting date via Date picker controller and click save button, the change is successfully saved to backend:
Implementation detail
(1) Most of CDS entities described in previous blog remain unchanged, only a small adaptation is needed, as highlighted below:
The reason is, since we need to support update scenario, we have to explicitly tell framework about this fact via annotation “transactionalProcessingDelegated“. Meanwhile, the automatically generated service provider class by annotation @OData.publish: true could not fulfill the update scenario – we have to create a new SEGW project via tcode SEGW manually, so we have to mark this flag as false to suppress the service automatically generation.
Finish the change and re-activate the consumption view.
(2) tcode SEGW, create a new SEGW project and choose Reference->Data Source from context menu, load the CDS view you change in previous step.
Once done, you should have the following hierarchy displayed. Generate Runtime Objects by clicking the button in toolbar.
(3) Redefine three methods of automatically generated data provider class:
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关文章
- 106. 如何提高 SAP UI5 应用路由 url 的可读性
- 54. 如何将本地 SAP UI5 应用配置到本地 Fiori Launchpad
- 50. 如何使用 Cordova 将 SAP UI5 应用生成一个能在 Android 手机上安装的混合应用
- SAP UI5 应用如何采取 JavaScript 代码调用 OData API 读取满足过滤条件的业务数据($filter 操作)试读版
- SAP UI5 应用开发教程之七十八 - 如何通过 url 保持 SAP UI5 搜索的状态,让其支持书签功能试读版
- 对 SAP UI5 应用使用 uiveri5 执行测试的 ERR_CONNECTION_REFUSED 错误
- SAP WebIDE里本地运行Fiori应用后,会自动生成一个新的Destination
- 如何将自定义XML视图注入SAP Fiori Elements应用
- SAP CRM Fiori 应用如何启用 Sales Office 和 Sales Group 两个字段
- RxJs 操作符 withLatestFrom 在 SAP 电商云 Spartacus UI 中的应用
- SAP Fiori应用里出现http request错误的原因分析
- SAP UI5 应用在 Business Application Studio 里的构建单步分析
- 使用 cf push 部署应用到 SAP BTP 后启动失败 start unsuccessful 该如何处理
- 一步步把 SAP UI5 应用部署到 SAP BTP Kyma 运行环境中去
- 如何使用SAP云平台的Notification服务给Android应用推送通知消息
- JDBC + SAP云平台 = 运行在云端的数据库应用
- 如何上传HTML5应用到SAP云平台的Cloud Foundry环境下
- 用 React 结合 SAP UI5 Web Components 来开发 SAP Fiori 应用
- SAP UI5 应用开发教程之八十四 - 如何指定 SAP UI5 应用程序基于某个特定的版本运行试读版
- SAP UI5 应用开发教程之五十 - 如何使用 Cordova 将 SAP UI5 应用生成一个能在 Android 手机上安装的混合应用试读版
- SAP UI5 应用开发教程之四十九 - 如何在桌面电脑端调试运行在手机上的 SAP UI5 应用试读版
- SAP UI5 应用开发教程之六十九 - 如何从 SAP UI5 Not Found 页面跳转回到正常的应用页面试读版
- SAP Fiori应用Footerbar区域按钮的高亮显示逻辑
- 本地开发好的 SAP Fiori Elements 应用,如何部署到 ABAP 服务器上?
- 如何定制化SAP Fiori标准应用里UI字段的标签
- 如何操作SAP UI5应用Footer区域工具栏按钮的背景颜色
- 在Kubernetes上运行SAP UI5应用