How to resolve ASSERTION_FAILED error when you register the odata service expose

简介: How to resolve ASSERTION_FAILED error when you register the odata service expose

Description

When you try to register an Odata service exposed by a CDS view in tcode /IWFND/MAINT_SERVICE, you meet with runtime error ASSERTION_FAILED as displayed in picture below.

image.png


Keywords

ASSERTION_FAILED, @OData.publish


Root cause

If you debug in the backend, you can find the exception is raised in line 9.

image.png


The field causing this exception, “STAT”, does not come from the consumption view itself but from the foreign view zorder_sys_status.

When we comment out line 22~24, the service registration could successfully be done.


Solution

在当前view上重新创建一个新的consumption view.

image.png


这样做的目的是确保最后用于生成odata service的consumption view A, 其字段全部来自 view B.

比较correction之前的实现: consumption view A,其字段部分来自view B, 部分来自view C, 这种scenario并不被SADL 框架支持。

original view:


image.png

new created consumption view:


image.png

After correction it works with the following url:

https://jerry:44354/sap/opu/odata/sap/Z_C_SERVICE_ORDER_VIEW_CDS/Z_C_Service_Order_View(order_guid=guid’00163EA7-2000-1ED2-85EF-EFADF195A1B2’)

image.png

相关文章
|
2月前
Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
49 0
|
7月前
|
人工智能 自然语言处理 小程序
cloud function service error code -501000, error message 找不到对应的FunctionName.; at cloud.callFunction
cloud function service error code -501000, error message 找不到对应的FunctionName.; at cloud.callFunction
45 0
|
12月前
Error: undefined method `launchd_service_path‘ for xxx
使用brew命令进行启动就报错。
200 0
|
网络协议 网络安全 Docker
Docker Swarm 解决报错Error response from daemon: rpc error: code = Unavailable desc = connection error:
本文是博主学习docker swarm遇到的问题记录,希望对大家有所帮助。
1224 0
Docker Swarm 解决报错Error response from daemon: rpc error: code = Unavailable desc = connection error:
|
12月前
|
网络协议
Job for named.service failed because the control process exited with error code.
Job for named.service failed because the control process exited with error code.
522 0
|
关系型数据库 MySQL Java
解决方案 --Failed to initialize JPA EntityManagerFactory: Unable to create requested service
解决方案 --Failed to initialize JPA EntityManagerFactory: Unable to create requested service
解决方案 --Failed to initialize JPA EntityManagerFactory: Unable to create requested service
|
Android开发
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
347 0
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
|
网络协议
Job for named.service failed because the control process exited with error code.怎么解决
本篇内容记录了如何解决Job for named.service failed because the control process exited with error code.的问题。
3103 0
Job for named.service failed because the control process exited with error code.怎么解决
处理SAP gateway service使用过程中遇到的400 error - Malformed URI literal syntax
Created by Jerry Wang on Nov 18, 2014 通过Active Source找到抛error message的代码的具体位置:
348 0
处理SAP gateway service使用过程中遇到的400 error - Malformed URI literal syntax