我有来自SAP FIORI创建销售订单的OData。有谁知道访问Products Collection实体上的所有数据
<app:collection sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:pageable="false" sap:addressable="false" sap:content-version="1" href="Products">
<atom:title type="text">Products</atom:title>
<sap:member-title>Product</sap:member-title>
</app:collection>
我尝试通过/ sap / opu / odata / sap / SRA017_SALESORDER_CREATE_SRV / Products
访问它但它没有产生任何结果。
提前致谢
答案 0 :(得分:0)
元数据如下所示:
<EntityType Name="Product" sap:content-version="1">
<Key>
<PropertyRef Name="SalesOrganization" />
<PropertyRef Name="DistributionChannel" />
<PropertyRef Name="Division" />
<PropertyRef Name="ProductID" />
<PropertyRef Name="CustomerNo" />
</Key>
<Property Name="SalesOrganization" Type="Edm.String" Nullable="false" MaxLength="4" sap:label="Sales Organization" sap:creatable="false" sap:updatable="false" sap:sortable="false" />
<Property Name="DistributionChannel" Type="Edm.String" Nullable="false" MaxLength="2" sap:label="Distribution Channel" sap:creatable="false" sap:updatable="false" sap:sortable="false" />
<Property Name="CustomerProductNo" Type="Edm.String" MaxLength="35" sap:label="Customer Product Number" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />
<Property Name="ProductReferenceNo" Type="Edm.String" MaxLength="18" sap:label="Product Reference Number" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />
<Property Name="ImageFlag" Type="Edm.Boolean" sap:label="Flag for image" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />
<Property Name="Division" Type="Edm.String" Nullable="false" MaxLength="2" sap:label="Division" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />
<Property Name="NetPrice" Type="Edm.Decimal" Precision="23" Scale="2" sap:label="Net Price" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />
<Property Name="ProductID" Type="Edm.String" Nullable="false" MaxLength="18" m:FC_TargetPath="SyndicationTitle" m:FC_KeepInContent="true" sap:label="Product No." sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />
<Property Name="ProductDesc" Type="Edm.String" MaxLength="40" sap:label="Product Descriptiion" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />
<Property Name="CustomerNo" Type="Edm.String" Nullable="false" MaxLength="10" sap:label="Customer Number" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />
<Property Name="Currency" Type="Edm.String" MaxLength="5" sap:label="Currency" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />
<Property Name="UOM" Type="Edm.String" MaxLength="3" sap:label="Unit of Measure" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />
<Property Name="UOMDesc" Type="Edm.String" MaxLength="30" sap:label="Unit of Measure Description" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />
<NavigationProperty Name="ProductAttributes" Relationship="SRA017_SALESORDER_CREATE_SRV.ProductProductAttribute" FromRole="FromRole_ProductProductAttribute" ToRole="ToRole_ProductProductAttribute" />
</EntityType>
如果你在后端,你应该能够获得数据。