cancel
Showing results for 
Search instead for 
Did you mean: 

Create /Edit button are missing in Fiori Elements App based on CAP service / SAP Odata-V2-Service

0 Kudos

I am trying to create a Fiori Elements app basing on a CAP service, which is using an external OData service, which is created in a SAP 740 system.

This is working for reading data.
Unfortunately create and edit are always missing.

Which annotations are needed to make them visible?

The underlaying odata service supports create, update and delete. Batch mode is supported too.

Is there a problem with mixing the different OData versions?
Thanks for any help!

--------------------------

Here is the EDMX of the servivce from the SAP-system

<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/Protocols/SAPData" Version="1.0">

<edmx:DataServices m:DataServiceVersion="2.0">

<Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="ZAS_OEM_PRODUCT_SRV" xml:lang="de" sap:schema-version="1">

<EntityType Name="Product" sap:content-version="1">

<Key>

<PropertyRef Name="Serialnumber"/>

</Key>

<Property Name="OemId" Type="Edm.String" Nullable="false" MaxLength="10" sap:unicode="false" sap:label="OEM-ID" sap:sortable="false" sap:filterable="false"/>

<Property Name="Material" Type="Edm.String" Nullable="false" MaxLength="18" sap:unicode="false" sap:label="Konfig.Material" sap:sortable="false" sap:filterable="false"/>

<Property Name="Serialnumber" Type="Edm.String" Nullable="false" MaxLength="18" sap:unicode="false" sap:label="Serialnummer" sap:sortable="false" sap:filterable="false"/>

<Property Name="Description" Type="Edm.String" Nullable="false" MaxLength="40" sap:unicode="false" sap:label="Bezeichnung" sap:sortable="false" sap:filterable="false"/>

<Property Name="DateOfConstruction" Type="Edm.DateTime" Precision="7" sap:unicode="false" sap:label="Mont.-Start" sap:sortable="false" sap:filterable="false"/>

<NavigationProperty Name="BillOfMaterialSet" Relationship="ZAS_OEM_PRODUCT_SRV.BoMOfProduct" FromRole="FromRole_BoMOfProduct" ToRole="ToRole_BoMOfProduct"/>

</EntityType>

<EntityType Name="BillOfMaterial" sap:content-version="1">

<Key>

<PropertyRef Name="Material"/>

</Key>

<Property Name="Serialnumber" Type="Edm.String" Nullable="false" MaxLength="18" sap:unicode="false" sap:label="Seriennummer" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>

<Property Name="Material" Type="Edm.String" Nullable="false" MaxLength="18" sap:unicode="false" sap:label="Material" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>

<Property Name="Amount" Type="Edm.Decimal" Nullable="false" Precision="13" Scale="3" sap:unicode="false" sap:label="Menge" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>

<Property Name="Unit" Type="Edm.String" Nullable="false" MaxLength="3" sap:unicode="false" sap:label="KompMengEinh." sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" sap:semantics="unit-of-measure"/>

</EntityType>

<Association Name="BoMOfProduct" sap:content-version="1">

<End Type="ZAS_OEM_PRODUCT_SRV.Product" Multiplicity="1" Role="FromRole_BoMOfProduct"/>

<End Type="ZAS_OEM_PRODUCT_SRV.BillOfMaterial" Multiplicity="*" Role="ToRole_BoMOfProduct"/>

<ReferentialConstraint>

<Principal Role="FromRole_BoMOfProduct">

<PropertyRef Name="Serialnumber"/>

</Principal>

<Dependent Role="ToRole_BoMOfProduct">

<PropertyRef Name="Serialnumber"/>

</Dependent>

</ReferentialConstraint>

</Association>

<EntityContainer Name="ZAS_OEM_PRODUCT_SRV_Entities" m:IsDefaultEntityContainer="true" sap:supported-formats="atom json xlsx">

<EntitySet Name="ProductSet" EntityType="ZAS_OEM_PRODUCT_SRV.Product" sap:pageable="false" sap:content-version="1"/>

<EntitySet Name="BillOfMaterialSet" EntityType="ZAS_OEM_PRODUCT_SRV.BillOfMaterial" sap:pageable="false" sap:content-version="1"/>

<AssociationSet Name="BoMOfProductSet" Association="ZAS_OEM_PRODUCT_SRV.BoMOfProduct" sap:content-version="1">

<End EntitySet="ProductSet" Role="FromRole_BoMOfProduct"/>

<End EntitySet="BillOfMaterialSet" Role="ToRole_BoMOfProduct"/>

</AssociationSet>

</EntityContainer>

<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="self" href="http://sap1-vajeezi.business.jungheinrich.com:8000/sap/opu/odata/sap/ZAS_OEM_PRODUCT_SRV/$metadata"/>

<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="latest-version" href="http://sap1-vajeezi.business.jungheinrich.com:8000/sap/opu/odata/sap/ZAS_OEM_PRODUCT_SRV/$metadata"/>

</Schema>

</edmx:DataServices>

</edmx:Edmx>

View Entire Topic
rohith_deraje
Advisor
Advisor
0 Kudos

Hi andygraeber,

I think you are trying to build an Fiori Elements Odata V2 app with CAP.

If you want to build an app using CAP and SAP Fiori elements, you need to create an OData V4 CAP service. OData V2 CAP service is currently not supported.

Please refer to the "Note" here in the pre-requisite section of Fiori elements docu.

Hope this info helps you.


Regards,

Rohith

0 Kudos

Hi,

thanks for your reply. I thought of different OData Versions, too.

--------------------------------------------------------------------------------------------------------------------------------------------

The OData service from our SAP R/3 system is ODatav2. This is an excerpt from the metadata from the SAP service.

<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/Protocols/SAPData" Version="1.0"><edmx:DataServices m:DataServiceVersion="2.0"><Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="ZAS_OEM_PRODUCT_SRV" xml:lang="de" sap:schema-version="1"><EntityType Name="Product" sap:content-version="1"><Key>

--------------------------------------------------------------------------------------------------------------------------------------------

The CAP service using this external service is ODataV4. This is an excerpt from the metadata from the CAP service

<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">

<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml">
<edmx:Include Alias="Common" Namespace="com.sap.vocabularies.Common.v1"/>
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1"/>
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml">
<edmx:Include Alias="UI" Namespace="com.sap.vocabularies.UI.v1"/>
</edmx:Reference> <edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="ProductService">
<EntityContainer Name="EntityContainer">
<EntitySet Name="Products" EntityType="ProductService.Products"/>
</EntityContainer><EntityType Name="Products">

--------------------------------------------------------------------------------------------------------------------------------------------

I want to use the CAP service as base for the FIORI elements UI and I assumed this would be possible as the CAP service is V4.

Where is my thinking error?

Thanx and best regards

Andreas