Data source is not a transactional CDS view [OData Exposure]

简介: Data source is not a transactional CDS view [OData Exposure]

一个朋友遇到问题:给 ABAP CDS view 添加 OData.publish: true 注解激活之后,期望自动生成 OData 服务,但是遇到错误消息:


Data source is not a transactional CDS view [OData Exposure]

7542d75f21101ae6ef85a8fec1840559_9f041f9f45123d88ca9eb998e41853d5.png

b8092773886dfa1c150cd78669d5a4a3_2c721469a7e33f60b36f8fd1770fa4ca.png

53ee0c834e4321bc9ab15ce2728d83fd_3bf7225c58f0adffd9ca910721a32726.png

SAP 社区上有人问类似的问题:https://answers.sap.com/questions/78804/cds-view-annotation-.html


可以尝试去后台使用事务码 /IWFND/MAINT_SERVICE, 对 OData 服务 ZFLIGHT_COM_CDS 手动激活。


如果后台激活 OData 服务后,回到 ABAP Development Tool 里激活 CDS view,还是遇到 Data source is not a transactional CDS view [OData Exposure] 的错误消息,那么参照这个帖子:

https://www.michaelmanagement.com/sap-error-messages/en/sadl_gw_dt_cds/sadl_gw_dt_cds004


Either add the annotation ‘@ObjectModel.transactionalProcessingEnabled:

true’ to the underlying CDS view or remove the annotation

‘@ObjectModel.transactionalProcessingDelegated’ from the consumption

view.

意思是要么zspfli_root 这个 underlying CDS view 里添加 @ObjectModel.transactionalProcessingEnabled 注解,要么从 consumption view zflight_com 里移除 @ObjectModel.transactionalProcessingDelegated.


背景知识


什么是 SAP core data service consumption view?


参考这篇博客,consumption view 是在 composite view 之上创建的,这意味着消费视图不与 DDIC 表/视图或基本视图交互。 消费视图写在提供事实数据和多维数据集数据的复合视图之上。 此视图用于将数据公开给不同的分析工具(例如 HTML、SAP BusinessObjects、Analysis for Excel、SAP Lumira 等),这有助于创建报告和不同的可视化来呈现业务数据。


什么是 SAP core data service composite view?


复合视图是在基本视图之上创建的,这意味着复合视图不直接与数据库进行数据交互,而是通过基本视图的维度结果集进行交互。 多个基本视图可以与连接/关联一起使用,以获取数据并对检索到的数据进行计算(例如:使用内置表达式和函数),以使用消费视图在不同的分析工具中消费。


如果想进行某种事务处理,需要使用 @ObjectModel.transactionalProcessingEnabled 来修饰 CDS view.


如果只有分析场景或用例,或者只想读取数据,则不需要 ObjectModel 注释,因为在这些情况下不需Business Object 或 BOPF 框架。


相关文章
|
2月前
|
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
|
9月前
|
数据建模 数据库
什么是 SAP CDS view 中的 Exposed Association with filter 技术
什么是 SAP CDS view 中的 Exposed Association with filter 技术
|
9月前
|
开发者
什么是 CDS view 的注解 @Metadata.allowExtensionstrue
什么是 CDS view 的注解 @Metadata.allowExtensionstrue
什么是 SAP CDS view 的 supplementary filter
什么是 SAP CDS view 的 supplementary filter
|
9月前
|
SQL 供应链 数据建模
什么是 SAP CDS view 的 Path Expression
什么是 SAP CDS view 的 Path Expression
|
数据可视化 测试技术 数据库
Data source is not a transactional CDS view [OData Exposure]
Data source is not a transactional CDS view [OData Exposure]
|
XML 数据格式
|
XML 数据格式
SAP Fiori Elements - bindComponent - binding property in XML view will trigger odata request
SAP Fiori Elements - bindComponent - binding property in XML view will trigger odata request
93 0
SAP Fiori Elements - bindComponent - binding property in XML view will trigger odata request
Fiori Launchpad etag retrieve logic - UI5 Repository
Created by Wang, Jerry, last modified on Jan 15, 2015
Fiori Launchpad etag retrieve logic - UI5 Repository
如何使用 SAP CDS view 中的 currency conversion 功能
如何使用 SAP CDS view 中的 currency conversion 功能
如何使用 SAP CDS view 中的 currency conversion 功能