使用SAP Analytics Path Framework通过图表和表格方式展示CDS view数据
In Fiori we can easily generate Chart and Table representation with the help of Analytics Path Framework.
It is only necessary for application developer to prepare data source for the visualization, that is, the CDS view development. The left rendering work is done by APF.
In some of my previous blog I have already introduced the step how you can build a Fiori application with the help of Smart Template + CDS view within a couple of minutes. In this blog the CDS view is again leverage to render some fancy chart.
Step1 create necessary CDS view and automatically generate OData service
To make concept easily understood, I have created a simple ABAP database table:
It has only two entries which will be rendered as column chart by APF later. Then I have created a cube view by pasting the following source code:
@EndUserText.label: 'Jerry cube view'
@Analytics.dataCategory: #CUBE
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck:#CHECK
@AbapCatalog.sqlViewName: 'zprdcube'
define view Z_C_Prod_Cube as select from zprd_query{
key zprd_query.prod_id,
zprd_query.prod_text,
@DefaultAggregation: #MAX
zprd_query.quantity
}
And then create a query view ( annotation @Analytics.query: true ) and automatically publish it as OData service ( annotation @OData.publish: true)
@EndUserText.label: 'Jerry query verification'
@VDM.viewType: #CONSUMPTION
@Analytics.query: true
@AccessControl.authorizationCheck:#NOT_ALLOWED
@AbapCatalog.sqlViewName: 'zprdquery'
@OData.publish: true
define view Z_C_Product as select from Z_C_Prod_Cube {
key Z_C_Prod_Cube.prod_id,
Z_C_Prod_Cube.prod_text,
@DefaultAggregation: #MAX
Z_C_Prod_Cube.quantity
}
Step2 Modelling in APF Modeler
Now go to APF configuration Modeler:
create a new application with Semantic Object with default value “FioriApplication”:
Create a new configuration:
For Smart Filter Bar, specify the OData service published by CDS view we just create:
Then create a new category, which will be used by end user as a entry point to use APF:
Select the created category and create a new step based on it:
Choose a meaningful name for the step, and specify properties which will be used to render the chart.
The last step is to create a Column chart as representation for the step just created.
And then create a table representation which acts as drill down display, that is, when I click a certain product in column chart, I would like to have its detail information displayed by this table chart. Once saved, click Execute button to load the created application.
Step3 analysis in APF
From launched application url we can find that the application is loaded based on the configuration we created in step 2. click button “Add Analysis Step”
Choose created category:
and choose step:
then choose column presentation:
Then column chart is rendered based on the content in query view. Hover mouse on chart and detail information is displayed via tooltip.
Now click the chart part for Z02,
This time choose “Table Representation”:
then the detail information for Z02 is displayed in table style:
Other types of Chart
Line Chart:
Bar Chart:
Pie Chart:
- 数控机床数控系统选择4大关键要素
- Python快速入门
- Jquer学习之jQuery(function(){})与(function(){})(jQuery)之间的区别
- 服务端常见性能隐患分享
- ExtJs学习笔记(19)_复杂Form示例
- Linux快速入门01-基础概念
- SQL学习之Insert的特殊用法(插入检索出的数据,表之间的数据复制)
- 对php多态的理解
- JavaScript值延迟脚本和异步脚本
- JavaScript之arguments.callee
- JavaScript之面向对象学九(原型式继承和寄生式继承)
- ExtJs学习笔记(18)_ExtJs嵌入FCK示例
- Html与CSS快速入门01-基础概念
- 利用Fck的javascript-API创建fck编辑器
- 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 数组属性和方法
- 在CentOS上安装搭建PHP+Apache+Mysql的服务器环境
- Centos7.4服务器安装apache及安装过程出现的问题解决方法
- ubuntu系统修改时区和时间的方法
- CentOS7 LNMP+phpmyadmin环境搭建 第一篇虚拟机及centos7安装
- flutter 输入框组件TextField的实现代码
- Mac通过不同终端SSH连接远程服务器的讲解
- Linux关于透明大页的使用与禁用介绍
- linux中使用grep命令详解
- linux下使用cmake编译安装mysql的详细教程
- Linux CentOS 7.0中java安装与配置环境变量的步骤详解
- Linux下进程数量的限制pid_max的配置方法
- linux 进程数最大值修改方法
- Linux通过设备号找到设备的方法
- linux环境下安装 openOffice 并启动服务 的方法
- Linux下如何查杀stopped进程详解