前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >SAP CDS view源代码行数统计工具

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

作者头像
Jerry Wang
发布2020-08-31 10:34:06
6470
发布2020-08-31 10:34:06
举报

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.

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

Execute the public RUN method, specify the package number:

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

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
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-08-29 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档