美文网首页SAP 修行SAP
SAP CDS view源代码行数统计工具

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

作者: _扫地僧_ | 来源:发表于2020-11-11 09:59 被阅读0次

    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

    相关文章

      网友评论

        本文标题:SAP CDS view源代码行数统计工具

        本文链接:https://www.haomeiwen.com/subject/lbtssktx.html