在SAP WebIDE里使用Fiori Elements快速开发SAP UI5应用
(1) Create CDS view based on sample database table spfli and scarr
Create two CDS views in ABAP development studio. The source code for both are listed below. You just need to copy them into studio and click activate button.
@AbapCatalog.sqlViewName: 'zjerrySQL0309'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'test 20160309'
@ObjectModel: {
createEnabled,
deleteEnabled,
updateEnabled
}
define view Zjerrytest20160309
as select from spfli association [0..1] to scarr as _scarr
on _scarr.carrid = spfli.carrid {
key spfli.carrid,
key _scarr.carrname,
key spfli.connid,
spfli.cityfrom,
spfli.cityto
}
@AbapCatalog.sqlViewName: 'z20160316'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'test odata publish '
@OData.publish: true
@ObjectModel: {
type: #CONSUMPTION,
compositionRoot,
semanticKey: ['Actor'],
createEnabled,
deleteEnabled,
updateEnabled
}
define view Zjerrytest20160316 as select from Zjerrytest20160309 {
@UI.lineItem : [{position:10}]
key Zjerrytest20160309.carrid as Jerryid,
@UI.lineItem : [{position:20}]
key Zjerrytest20160309.carrname as name,
@UI.lineItem : [{position:30}]
key Zjerrytest20160309.cityfrom as startLocation,
@UI.lineItem : [{position:40}]
key Zjerrytest20160309.cityto as target,
@UI.lineItem : [{position:50}]
key Zjerrytest20160309.connid
}
Once activated, there is a hint in studio to tell you the automatically published OData service name, and then tcode for service registration.
(2) Use tcode /IWFND/MAINT_SERVICE to finish OData service registration
Specify System Alias = LOCAL and search using the CDS name you get from step1, select the search result and click “Add Selected Services”:
Once added, click “SAP Gateway Client” to test whether the OData service works:
Make sure the metadata request returns 200 success code.
(3) Create UI5 application using Wizard in WebIDE
Open WebIDE, File->New->Project from Template, choose Smart Template Application and next:
Select the destination for your backend where CDS view is created, and locate your OData service created just now:
The annotation file is automatically identified, just click Next button:
Choose OData Collection from drop down list and click Finish button:
Once created, the project looks like below. Choose Component.js and click Run button in WebIDE Toolbar:
From rendered application you could see the table is now filled with data fetched from CDS view:
Build a Productive Fiori application in CRM Service area
Would you like to use the introduced technology to build a more complicated and productive Fiori application in CRM Service area? Then follow the steps in this blog Create a CRM Service Order Fiori application within a couple of minutes.
- ZZCMS v8.2 最新版SQL注入漏洞
- 一款轻量级Web漏洞教学演示系统(DSVW)
- 使用Burpsuite代理和pypcap抓包进行抢红包的尝试
- 基于WAVSEP的靶场搭建指南
- 【干货】大数据量下,58同城mysql实践!
- 如何预先处理电影评论数据以进行情感分析
- 如何在Python中从零开始实现随机森林
- 教程从头开始在Python中实现k最近邻居
- 建立安全的 AI
- Python NLTK 自然语言处理入门与例程
- 漏洞预警 | Apache Struts2 曝任意代码执行漏洞 (S2-045,CVE-2017-5638)
- 详解OSSIM-OSSEC WIN 4771案例
- JSShell:一个基于python的交互式Shell
- golang中操作excel
- 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 数组属性和方法
- codeforces 1342C(前缀和)
- leetcode-寻找两个正序数组的中位数
- Shell脚本常用命令一览
- 深入学习 React 合成事件
- 关于fixture.debugElement.query(By.css)这个方法的一个疑问
- codeforces 1334C(前缀和)
- Angular通过依赖注入机制注入一个对象的例子
- 简易数据分析(七):Web Scraper 抓取表格、分页器翻页数据
- codeforces 1327C(构造)
- zabbix分布式及高可用
- Angular单元测试的spyOn使用一例
- SQL-JOIN全解析
- Node.js上传单文件和多文件的一些示例博客和源代码
- ES6中的箭头函数=>
- 22 个让 React 开发更高效更有趣的工具