-1

我有来自 SAP FIORI Create Sales Orders 的 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 访问它

但它没有产生任何结果。

提前致谢

4

1 回答 1

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>

如果您在后端有数据,您应该能够获取数据。

于 2015-07-10T09:20:03.527 回答