最近我们从1709升级到1809。我们用自定义CDS视图构建了自定义Fiori APP,在1709可以正常工作。但是系统升级后出现错误:
assert-dbg.js:34 断言失败:属性“FilterRestrictions”定义了两次;源 = 元数据文档,注释目标 = z********_CDS.ZFDC_MY_DEFAULTS_CDS_Entities/Z_PROJECT_CREW,术语 = Capabilities.NavigationRestrictions
元数据如下:
-<Annotation Term="Capabilities.NavigationRestrictions">
-<Record>
-<PropertyValue Property="RestrictedProperties">
-<Collection>
-<Record>
<PropertyValue Property="NavigationProperty" NavigationPropertyPath="Parameters"/>
-<PropertyValue Property="FilterRestrictions">
-<Record>
<PropertyValue Bool="false" Property="Filterable"/>
</Record>
</PropertyValue>
-<PropertyValue Property="FilterRestrictions">
-<Record>
<PropertyValue Bool="false" Property="Filterable"/>
</Record>
</PropertyValue>
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
CDS 视图如下:
@AbapCatalog.sqlViewName: 'Z_PROJ_CREW'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Project maping to Crew'
define view Z_PROJECT_CREW
with parameters
p_projectId: ps_pspid,
p_userName: xubname
as select from zdef_employ {
key zdef_employ.pernr as PersonnelNo,
key zdef_employ.pspid as ProjectID,
key zdef_employ.uname as UserName,
zdef_employ.cname as PersonnelName,
zdef_employ.post1 as ProjectName,
zdef_employ.deleted as Deleted,
zdef_employ.erdat as CreatedOn,
zdef_employ.ernam as CreatedBy,
zdef_employ.aedat as ChangedOn,
zdef_employ.aenam as ChangedBy
} where zdef_employ.pspid = $parameters.p_projectId
and zdef_employ.uname = $parameters.p_userName
and zdef_employ.deleted = 'N'
由于元数据是自动生成的,不知道如何修复它。我们还不想在这个阶段尝试修改注释。有人有这个问题吗?或专家的任何建议?
我确实找到了一个 sap 注释:2804095 - OData 元数据:缺少导航限制的功能注释。由于受支持的 SP,它不适用于我们的系统。
任何答案或建议?非常感激!