`
JerryWang_SAP
  • 浏览: 1030617 次
  • 性别: Icon_minigender_1
  • 来自: 成都
文章分类
社区版块
存档分类
最新评论

SAP CDS view自学教程之十:SAP CDS view扩展性(Extensibility)实现原理

阅读更多

目录

There is a good blog regarding key user extensibility tool in S4 written by Thomas Schneider.

One of supported feature is customer can easily add new fields to extensible CDS view without knowing technical detail.

For example, if a given CDS view is marked as “UI Reports” extensible in extensibility registration tcode SCFD_REGISTRY,

 

 

it means this CDS view would be visible in key user extensibility tool in S4, in tab “UIs and Reports”, so that end user can simply click “Enable Usage” button to add extension field to the view. In the screenshot below, it shows my Extension field “JDK Minimum version” has already been extended to view I_PRODUCTWD.

 

 

Now, just use the single line below, and you can read all fields of this view, standard fields and extension fields:

SELECT SINGLE * INTO @DATA(ls_data) FROM i_productwd WHERE
product = 'JAVA'.

 

 

So this CDS view extensibility is really easy to use for application developer.

However, how all these whole scenario work under the hood?

When trying to search the source code of extended CDS view by fragment of extension field name JDK, nothing found. This makes sense since none of SAP extensibility tool will directly MODIFY standard object.

 

 

Hover the mouse to this small icon in CDS view and you can see lots of extension view, which holds extension fields created by key user tool.

However how could I quickly locate which extension view holds my extension field “JDK Minimum Version”?

 

 

Open the SQL view of CDS view I_PRODUCTWD, it is IPRODUCTWD in SE11. Search by keyword JDK and I find the extension field is added to this SQL view via append ZZ1_2CC44DDD3F1C.

 

 

Double click this append, then you can find the name of CDS extension view which holds this extension field: ZZ1_PRE47GXHDI6P2ZLO3ADGY4HHFE

 

 

Now go back to ABAP studio, locate CDS extension view ZZ1_PRE47GXHDI6P2ZLO3ADGY4HHFE and open it:

 

 

Here you can see that in this automatically generated CDS extension view, my extension field are there.

The standard view I_PRODUCTWD is extended by extension view ZZ1_PRE47GXHDI6P2ZLO3ADGY4HHFE via key word “extend view”, as a result the extension field ZZ1_JDKMinimumversion_PRD in ZZ1_PRE47GXHDI6P2ZLO3ADGY4HHFE will also be visible in view ZZ1_PRE47GXHDI6P2ZLO3ADGY4HHFE.

 

 

Last question, how and when the extension view ZZ1_PRE47GXHDI6P2ZLO3ADGY4HHFE is generated? We can simply do testing by disable the usage of my extension field on view I_PRODUCTWD by click button “Disable Usage”.

 

 

Once done, the extension field disappears from view I_PRODUCTWD,

 

 

This observation proves that the extension view will only be generated after we click “Enable Usage” and publish the change. When we click publish button, there are totally 10 enhancements to be generated for my extension field:

 

 

The first three rows are CDS extension view to be generated. Double click each and write down detail:

 

 

And extension view ZZ1_PRE47GXHDI6P2ZLO3ADGY4HHFE will be generated to extend I_PRODUCTWD:

 

 

The left code is responsible to generate extension view which I am not intrested in. What I am curious about is how the internal table mt_enhancements of CL_CFD_ENHANCEMENT_ITERATOR is filled. It is filled in method determine_generation_scope:

 

 

In this method, the task to generate CDS extension view for view I_PRODUCTWD is added to enhancement scope, which will be executed later.

 

 

All these ten instances will be generated, to make the whole CDS view extensibility work.

 

 

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

0
1
分享到:
评论

相关推荐

    SAP B1 9.0 NEW

    12. 扩展性(Extensibility):在自定义和扩展性方面,SAP可能提供了一些新的接口和工具,使得用户能够更容易地根据自身特定需求来定制系统。 13. 软件开发工具包(Software Development Kit, SDK)增强:开发人员...

    2.3 SHC EX Extensibility.pdf

    为了适应不断变化的业务需求和增强系统的可扩展性,SAP不断推出新的扩展概念和工具,以帮助用户和合作伙伴在不影响核心系统稳定性的同时,对S/4HANA进行个性化和定制化开发。 在S/4HANA的扩展概念中,存在两个主要...

    Android-自定义RadiusView包含常用的Layout和View方便扩展

    在Android开发中,自定义视图(View)和布局(Layout)是提升应用独特性和功能扩展性的重要手段。本主题“Android-自定义RadiusView包含常用的Layout和View方便扩展”聚焦于创建一个自定义的RadiusView,它不仅具有...

    MEF(Managed Extensibility Framework)入门教程

    MEF(Managed Extensibility Framework)是微软.NET框架下的一个受管理扩展性框架,主要用于提高应用程序和组件的复用程度。它最初是作为.NET Framework 4.0的一部分推出的,但由于其强大功能,在.NET 3.5版本中也...

    Extensibility:WixToolset.Extensibility-用于扩展WiX工具集的接口

    5. **Tutorials and Samples**: "Extensibility-master"压缩包很可能包含了关于如何创建和使用这些扩展的教程和示例代码。通过学习这些示例,开发者可以快速上手并了解WiX工具集的扩展机制。 在实际开发中,理解...

    SAP S/4HANA and SAP S/4HANA Cloud Extensibility for Customers and Partners

    SAP S/4HANA and SAP S/4HANA Cloud Extensibility for Customers and Partners September 2018 The experience gained from various customer and partner projects has made one thing very clear: Most SAP S/4...

    SAP Fiori Launchpad - Development and Extensibility.zip

    sap press doc 解压密码:abap_developer

    ASP.NET 4.0 Cache Extensibility

    此外,计划中还包含了将现有的ASP.NET内存缓存作为一个默认实现整合到新的扩展性API中的设计。本文档将详细介绍这一草案设计以及如何通过新的缓存API进行扩展。 #### 二、总体设计 新缓存API的核心基于以下几个...

    使用Managed Extensibility Framework方便的扩展应用程序

    使用Managed Extensibility Framework方便的扩展应用程序

    QTP WEB Extensibility的视频教程.rar

    10. **自动化框架设计**:最后,我们将讨论如何结合WEB Extensibility构建一个强大的自动化测试框架,实现测试的模块化和可复用性。 通过这个详尽的视频教程,你将不仅能够掌握QTP WEB Extensibility的基本使用,还...

    仿淘宝头条View垂直滚动

    6. **扩展性(Extensibility)**:设计自定义View时,应考虑其可扩展性。例如,添加接口供外部控制滚动速度,或者支持不同的布局方式(如网格布局)。 7. **注释(Commenting)**:清晰的注释可以帮助其他开发者理解和...

    Professional Visual Studio Extensibility

    《Professional Visual Studio Extensibility》是一本专注于Visual Studio扩展开发的专业书籍,对于想要深入学习如何构建Visual Studio插件的开发者来说,它是一个宝贵的资源。这本书详细介绍了如何利用Visual ...

    QTP9.5 Web Extensibility WebEvent视频教程截图.rar

    【QTP9.5 Web Extensibility WebEvent视频教程截图.rar】这个压缩包文件主要涵盖了QuickTest Professional(QTP)9.5版本中Web Extensibility和WebEvent的相关知识。QTP,现已被命名为UFT(Unified Functional ...

    Orc.Extensibility:使用此存储库轻松实现插件和扩展

    Orc.Extensibility 是一个专门为C#开发人员设计的开源库,它简化了在应用程序中实现插件和扩展的过程。这个库的目标是帮助开发者创建能够动态加载、发现和管理插件的系统,从而增强应用程序的功能。 Orc....

    Awesome-VS-Extensibility:Visual Studio可扩展性资源的很棒列表

    很棒的Visual Studio可扩展性 Visual Studio可扩展性资源真棒列表。 扩展名 在开发VS扩展时特别有用的VS扩展: —帮助最小化内存流量(又称GC压力)。 较小扩展名的通用礼节,较大扩展名的必要性。 指导方针和出版 ...

    JMP Extensibility Synergy with MATLAB JMP 可扩展性与 MATLAB 的协同作用.pdf

    ### JMP 可扩展性与 MATLAB 的协同作用 #### 摘要 JMP 是一款集统计分析、数据可视化和预测模型于一体的强大软件平台。自 JMP 11 版本起,用户可以无缝集成 JMP 与 MATLAB,从而进一步扩展其功能。通过 JMP 脚本...

    扩展性MEF.rar111

    MEF(Managed Extensibility Framework,托管可扩展性框架)是.NET Framework的一个组件,由微软开发,主要用于构建可扩展的应用程序。它提供了一种方式来发现、加载和组合应用程序中的模块,使得开发者能够轻松地...

Global site tag (gtag.js) - Google Analytics