SAP CDS view源代码行数统计工具

简介: SAP CDS view源代码行数统计工具

Part1 – how to test odata service generated by CDS view

Part2 – what objects are automatically generated after you activate one CDS view

Part3 – how is view source in Eclipse converted to ABAP view in the backend

Part4 – how does annotation @OData.publish work

Part5 – how to create CDS view which supports navigation in OData service

Part6 – consume table function in CDS view

Part7 – unveil the secret of @ObjectModel.readOnly

Part8 – my summary of different approaches for annotation declaration and generation

Part9 – cube view and query view

Part10 – How does CDS view key user extensibility work in S4/HANA

Part11 – CDS view test double framework

Part12 – this blog

Part13 – CDS view authorization


For development complexity and draft effort estimation I need a tool to calculate the total line number of the CDS views belonging to a given package. Currently there is only the counting tool for ABAP source code: An ABAP tool to get ABAP source codes line number.


image.png


However no tool available for CDS view. So I write one.


Execute the public RUN method, specify the package number:


image.png


And it will print the line of source code for each view and the total count per package:


image.png


Two private methods of this tool class:


(1) GET_PACKAGE_LIST: get all subpackage belonging to current input package


(2) FILL_VIEW_NUMBER_PER_PACKAGE: get the view list of a given package, fetch the source code of each view from database table DDDDLSRC ( I have already explained this table in part 2 what objects are automatically generated after you activate one CDS view ) and perform the line number calculation.

If you have further requirement to parse the annotation contained in the view source code, you can refer to two demo reports shipped by SAP standard:


demo_cds_annotation_array

demo_cds_semantics_annotation


相关文章
|
4月前
|
SQL Android开发
创建 SAP ABAP CDS View 保存失败 - Dependencies DDL source - View Entity not written
创建 SAP ABAP CDS View 保存失败 - Dependencies DDL source - View Entity not written
创建 SAP ABAP CDS View 保存失败 - Dependencies DDL source - View Entity not written
|
4月前
|
Web App开发 开发者 存储
介绍一个 webp 格式转 png 格式的软件:XNConvert
介绍一个 webp 格式转 png 格式的软件:XNConvert
介绍一个 webp 格式转 png 格式的软件:XNConvert
|
4月前
|
JavaScript 前端开发
试读版:如何找出 SAP 标准 Fiori 应用某个按钮点击后执行的 JavaScript 源代码
试读版:如何找出 SAP 标准 Fiori 应用某个按钮点击后执行的 JavaScript 源代码
|
4月前
|
BI 网络安全
如何使用 ABAPGit 在 SAP ABAP 系统安装 abap2xlsx 工具试读版
如何使用 ABAPGit 在 SAP ABAP 系统安装 abap2xlsx 工具试读版
|
4月前
|
存储 数据采集 监控
如何在 SAP S4HANA 中使用 Data Volume Management 工具来确定哪些数据需要归档
如何在 SAP S4HANA 中使用 Data Volume Management 工具来确定哪些数据需要归档
|
4月前
|
数据库 存储 BI
SAP ABAP CDS View 源代码存储的数据库表揭秘和其他相关数据库表介绍试读版
SAP ABAP CDS View 源代码存储的数据库表揭秘和其他相关数据库表介绍试读版
SAP ABAP CDS View 源代码存储的数据库表揭秘和其他相关数据库表介绍试读版
|
4月前
|
数据库
SAP S/4HANA 系统的底层基石 - 通过实际的例子,介绍 CDS View 入门级的概念试读版
SAP S/4HANA 系统的底层基石 - 通过实际的例子,介绍 CDS View 入门级的概念试读版
SAP S/4HANA 系统的底层基石 - 通过实际的例子,介绍 CDS View 入门级的概念试读版
|
4月前
|
前端开发 搜索推荐 开发者
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
|
4月前
|
JavaScript 前端开发 开发者
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
|
4月前
|
Web App开发 数据采集 前端开发
纯技术讨论:如何让 SAP UI5 应用无法被别人在浏览器里调试 - 这种做法不推荐试读版
纯技术讨论:如何让 SAP UI5 应用无法被别人在浏览器里调试 - 这种做法不推荐试读版