Get Data Back Versi 4.0
References. Note:. Open Catalog Interface 5.0, OCI5, Specification: by Michael Judd (including the link where to find it on SAP Service Market Place) – OCI 5.0 is not an evolution, but more a revolution from OCI 4.0, they can co-exist though. Forum post:GeneralThis document is related to Punchout Catalogs, also known as OCI 4.0. I referenced the OCI 5.0 document as it is more up to date with the latest additions to the OCI 4.0 specification.For a better view of the possibilities of OCI 5.0 the above mentioned document will be of further help.The information is mainly aimed at SRM consultants seeking a better understanding of OCI 4.0, debugging the interface itself and at suppliers wanting to make their catalog OCI 4.0 enabled. SRM 7.0 EhP1 using the inbuilt HTML-NWBC is the SRM server version that is used as reference.I won’t get into any detail regarding the return parameters as they are documented enough in the OCI 5.0 document.The OCI interface is a simple protocol that launches a supplier catalog using a simple HTTP get or post command, also the return from the catalog is a simple post back to SRM.OCI call SRM customizingThe call to the external catalog is maintained in SPRO customizing, from SRM 7.0 onwards you should always use the standard call structure option. You can find it under:SPRO - SAP Supplier Relationship Management - SRM Server - Master Data - Content Management - Define External Web ServiceIn the call structure you define which parameters should be send to the external catalog, the above example (a call to Ariba Procurement Catalog) is one with a lot of variables.
Hi Robin,I have a problem concerning adding an attachment to the shopping cart by using a webdynpro application to fil the HOOK-URL. From the specifications in the OCI document, I understand that you have to fill the newitem-attachment1 and the newitem-attachmenttitle1 in the HOOK-URL with the path and filename of the document and a freely chosen title. I leave the newitem-attacmentpurpose1 initial, so an attachment of type ‘Standaardbijlage’ is chosen. The title is returned in the shopping cart, the type also, but the field Bestandsnaam’ stays empty. When you look at the technical help of the passed url, you can see the correct values in the fields (with the character ‘/’ and ‘ repaced by ‘%5C’, but still it doesn’t work. Maybe there’s another field that must be filled also? Do you have an answer to this problem?With kind regards,Karin Durlinger, abap developer MUMC Maastricht.
NoticesCopyright © OASIS Open 2014. All Rights Reserved.All capitalized terms in the following text have themeanings assigned to them in the OASIS Intellectual Property Rights Policy (the'OASIS IPR Policy'). The full may befound at the OASIS website.This document and translations of it may be copied andfurnished to others, and derivative works that comment on or otherwise explainit or assist in its implementation may be prepared, copied, published, anddistributed, in whole or in part, without restriction of any kind, providedthat the above copyright notice and this section are included on all suchcopies and derivative works. Semantics and operations for querying aggregated data,.
Results format for queries containing aggregated data,. Vocabulary terms to annotate what can be aggregated, and how.1.1TerminologyThe key words 'MUST', 'MUST NOT','REQUIRED', 'SHALL', 'SHALL NOT','SHOULD', 'SHOULD NOT', 'RECOMMENDED','MAY', and 'OPTIONAL' in this document are to beinterpreted as described in. Open Data (OData) services expose a data model thatdescribes the schema of the service in terms of the Entity Data Model (EDM, see OData-CSDL ) and then allowsfor querying data in terms of this model. 3 System Query Option $apply$apply. It takes a sequenceof set transformations, separated by forward slashes to express that they areconsecutively applied, e.g. The result of each transformation is the input tothe next transformation.
This is consistent with the use of service-definedbindable and composable functions in path segments.Unless otherwise noted, each set transformation: preserves the structure of the input type, so the structure ofthe result fits into the data model of the service. Does not necessarily preserve the number of instances in the result,as this will typically differ from the number of instances in the input set. Does not necessarily guarantee that all properties of the result instanceshave a well-defined value.So the actual (or relevant) structure of each intermediaryresult will resemble a projection of the original data model that could alsohave been formed using the standard system query options $expandand $select defined in OData-Protocol , with dynamic properties representing theaggregate values.
The parameters of set transformations allow specifying howthe result instances are constructed from the input instances.The set transformations defined by this extension areService-defined bound functions that take an entity set astheir binding parameter MAY be used as set transformations within $apply if the type of the binding parameter matches thetype of the result set of the preceding transformation. If it returns an entityset, further transformations can follow the bound function. The parametersyntax for bound function segments is identical to the parameter syntax forbound functions in resource path segments or $filterexpressions. See section 7.6 for an example.If a dataservice that supports $apply does not support it onthe collection identified by the request resource path, it MUST fail with and a meaningful human-readable errormessage. 3.1Transformation aggregateThe aggregate transformationtakes one or more aggregate expressions as parameters and returns aresult set with a single instance, representing the aggregated value for all instancesin the input set.An aggregate expression may be: an expression valid in a $filtersystem query option on the input set that results in a simple value, e.g.
Thepath to an aggregatable property, with a specified, a e, any of the above, followed by a expression, any of the above, enclosed in parentheses and prefixed with anavigation path to related entities, the virtual property.Any aggregateexpression that specifies an aggregation method MUST define an for the resulting aggregated value. Theresulting instance contains one dynamic property per parameter representing theaggregated value across all instances within the input set. If paths arepresent, the corresponding navigation properties are implicitly expanded tomake the properties part of the result representation.The aggregatetransformation affects the structure of the result set: An expression resultingin a simple value and a custom aggregate corresponds to a dynamic property in a$select option. If they are preceded by anavigation path, the corresponding $select optionwould be nested in one $expand option for eachnavigation property in the navigation path. 3.1.1 Keyword asAggregate expressions can define an alias using the as keyword, followed by a SimpleIdentifier (see OData-CSDL, section 19.2).The alias will introduce a dynamic property in theaggregated result set.
The introduced dynamic property is added to the type containingthe original expression or custom aggregate. The alias MUST NOT collide withnames of declared properties, custom aggregates, or other aliases in that type.When anis specified, an alias MUST be applied to the expression.Example 5. GET/Sales?$expand=Product($select=Name)&$select=AmountAgroupby transformation affects the structure of theresult set similar to $select where each groupingproperty corresponds to an item in a $select clause.Grouping properties that specify navigation properties are automaticallyexpanded, and the specified properties of that navigation property correspondto properties specified in a $select expand optionon the expanded navigation property. The set transformations specified in thesecond parameter of groupby further affect thestructure as described for each transformation; for example, thetransformation adds properties for each aggregate expression.
3.10.2 rollup and $allThe rollup grouping operator allows requesting additionallevels of aggregation in addition to the most granular level defined by thegrouping properties. It can be used instead of a property path in the firstparameter of groupby.The rollup grouping operator hastwo overloads, depending on the number of parameters.If used with one parameter, the parameter MUST be the valueof the Qualifier attribute of an annotation withtermprefixed with the navigation path leading to the annotated entity type.
Thisnamed hierarchy is used for grouping instances.If used with two or more parameters, it defines an unnamedleveled hierarchy. The first parameter is the root of the hierarchy definingthe coarsest granularity and MUST either be a single-valued property path orthe virtual property $all. The other parametersMUST be singe-valued property paths and define consecutively finer-grainedlevels of the hierarchy. 4 Representationof Aggregated InstancesAggregated instances are based on the structure of theindividual instances from which they have been calculated, so the structure ofthe results fits into the data model of the service.Properties that have been aggregated away are notrepresented at all in the aggregated instances.Dynamic properties introduced through an or with custom aggregates are represented asdefined by the response format.Aggregated instances are logically instances of the declaredtype of the collection identified by the resource path of the request. If theresource path identifies a collection of entities, the aggregated instances arealso entities. These aggregated entities can be transient or persistent.Transient entities don’t possess an edit link or read link, and in the JSONrepresentation are marked with '@odata.id': null.Edit links or read links of persistent entities MUST encode the necessaryinformation to re-retrieve that particular aggregate value.
How the necessaryinformation is exactly encoded is not part of this specification. Only theboundary conditions defined in OData-Protocol ,sections 4.1 and 4.2 MUST be met.Example 32: looking again to the sample request for gettingsales amounts per product and country presented in section 3.10.1 (Example 23). 5 Cross-Joins and AggregationOData supports querying related entities through definingnavigation properties in the data model. These navigation paths help guidesimple consumers in understanding and navigating relationships.In some cases, however, requests need to span entity setswith no predefined associations. Such requests can be sent to the specialresource $crossjoin instead of an individual entityset. The cross join of a list of entity sets is the Cartesian product of thelisted entity sets, represented as a collection of complex type instances thathave a navigation property with cardinality to-one for each participating entityset, and queries across entity sets can be formulated using these navigationproperties. See OData-URL for details.Where useful navigations exist it is beneficial to exposethose as explicit navigation properties in the model, but the ability to posequeries that span entity sets not related by an association provides amechanism for advanced consumers to use more flexible join conditions.Example 33: if Sales had a string property ProductIDinstead of the navigation property Product, a “join” between Sales and Productscould be accessed via the $crossjoin resource.
6 Vocabulary for Data AggregationThe following terms are defined in the vocabulary for dataaggregation 6.1 AggregationCapabilitiesThe term ApplySupported can beapplied to an entity container or to structured types and describes theaggregation capabilities of the entity container or of collections of instancesof the annotated structured types. If present, it implies that instances of theannotated structured type, or of structured types used in the annotated entitycontainer, can contain dynamic properties as an effect of $applyeven if they do not specify the OpenType attribute,see OData-CSDL.
The term has acomplex type with the following properties: The Transformations collection listsall supported set transformations. Allowed values are the names of the standardtransformations,and, or a namespace-qualifiedname identifying a service-defined bindable function.
If Transformationsis omitted the server supports all transformations defined by this specification. The CustomAggregationMethods collectionlists supported custom aggregation methods. Allowed values arenamespace-qualified names identifying service-specific aggregation methods. If omitted,no custom aggregation methods are supported. Rollup specifies whether the servicesupports no rollup, only a single rollup hierarchy, or multiple rolluphierarchies in a groupby transformation. Ifomitted, multiple rollup hierarchies are supported.
PropertyRestrictions specifieswhether all properties can be used in and.If not specified, or specified with a value of false,all properties can be grouped and aggregated. If specified with a value of true clients have to check which properties are tagged asor.All properties of ApplySupportedare optional, so it can be used as a tagging annotation to signal unlimitedsupport of aggregation.Example 35: an entity container supporting everythingdefined in this specification. 6.2 Property Annotations 6.2.1 GroupablePropertiesIf a structured type is annotated withor used within an entity container that is annotated with,and theannotation has a value of true for PropertyRestrictions, only those properties that areannotated with the tagging term Groupable can beused in.
6.2.2Aggregatable PropertiesIf a structured type is annotated withor used within an entity container that is annotated with,and theannotation has a value of true for PropertyRestrictions, only those properties that areannotated with the tagging term Aggregatable can beused in. 6.2.3 Custom AggregatesThe term CustomAggregate allowsdefining dynamic properties that can be used in.No assumptions can be made on how the values of these custom aggregates arecalculated, and which input values are used.When applied to a structured type, the annotation specifiescustom aggregates that are available for collections of instances of thatstructured type. When applied to an entity container, the annotation specifiescustom aggregates whose input set may span multiple entity sets within thecontainer.A custom aggregate is identified by the value of the Qualifier attribute when applying the term.
The value ofthe Qualifier attribute is the name of the dynamicproperty. The name MUST NOT collide with the names of other custom aggregatesof the same model element.The value of the annotation is a string with the qualifiedname of a primitive type or type definition in scope that specifies the typereturned by the custom aggregate.If the custom aggregate is associated with a structured type,the value of the Qualifier attribute MAY beidentical to the name of a declared property of the structured type. In thiscase, the value of the Type property MUST have thesame value as the Type attribute of the declaredproperty. This is typically done when the custom aggregate is used as a defaultaggregate for that property. In this case, the name refers to the customaggregate within an aggregate expression without a clause, and to the propertyin all other cases.If the custom aggregate is associated with an entitycontainer, the value of the Qualifier attributeMUST NOT collide with the names of any entity sets defined in the entitycontainer.Example 36: Sales forecasts are modeled as a customaggregate of the Sales entity type because it belongs there. For the budget,there is no appropriate structured type, so it is modeled as a custom aggregateof the SalesData entity container.
GET/$crossjoin(Time)?$apply=groupby((Time/Year),aggregate(Budget)) 6.2.4 Context-DefiningPropertiesSometimes the value of a property or custom aggregate isonly well-defined within the context given by values of other properties, e.g. Apostal code together with its country, or a monetary amount together with its currencyunit.
These context-defining properties can be listed with the term ContextDefiningProperties whose type is a collection ofproperty paths.If present, the context-defining properties SHOULD be usedas grouping properties when aggregating the annotated property or customaggregate, or alternatively be restricted to a single value by a pre-filteroperation. Services MAY respond with 400 Bad Requestif the context-defining properties are not sufficiently specified forcalculating a meaningful aggregate value.Example 37: This simplified Salesentity type has a single aggregatable property Amountwhose context is defined by the Code property ofthe related Currency, and a custom aggregate Forecast with the same context. The Codeproperty of Currency is groupable.
All otherproperties are neither groupable nor aggregatable. Currency/CodeCurrency/Code 6.3HierarchiesA hierarchy is an arrangement of groupable properties whosevalues are represented as being “above”, “below”, or “at the same level as” oneanother. A hierarchy can be leveled or recursive. Category/NameNameYearQuarterMonthThe recursive hierarchy SalesOrgHierarchycan be used in functions with the $filter systemquery option.Example 39: requesting all organizations below EMEA. GET /Sales?$apply=groupby((Customer))&$expand=Customer($select=Name,ID)Grouping by a navigation property adds the deferredrepresentation of the navigation property to the result structure, which thencan be expanded and projected partially away using the standard query options $expand and $select.Note: the typical representation of a deferred navigationproperty is a URL “relative” to the source entity, e.g.
Get Data Back
/Sales(1)/Customer.This has the benefit that this URL doesn’t change if the sales entity would beassociated to a different customer. For aggregated entities this would actuallybe a drawback, so the representation MUST be the canonical URL of the targetentity, i.e. /Customers('C1') for the first entityin the above result.Example 49: the first question in the motivating example insection 2.4, which customers bought which products, can now be expressed as. The function takes the name of a numeric property as aparameter, retains those entities that topcountalso would retain, and replaces the remaining entities by a single aggregatedentity, where only the numeric property has a defined value being theaggregated value over those remaining entities.