Skip to end of metadata
Go to start of metadata

Overview

Types

There are 2 types of OData Queries:

The transient analytic query generation and the OData service generation is executed automatically, so one can use the service almost(apart from releasing the service in /IWFND/MAINT_SERVICE → package assignment)  without additional manual steps.

Transactions
  • /IWFND/GW_CLIENT  -  for testing the service
  • /IWFND/MAINT_SERVICE  -  list of all released services
  • /IWFND/APPS_LOG  -    SAP Gateway Application Log Viewer
  • /IWFND/CACHE_CLEANUP  -  Cleanup of GW Model Cache
  • /IWFND/CACHE_REBUILD  -   Rebuild Gateway Model Cache
  • /IWFND/ERROR_LOG    -   SAP Gateway Error Log
  • /IWFND/TRACES  -  SAP Gateway Tracing Tools
Most important URI parameters 
ParameterDescriptionExample

$metadata

get e.g. name of fields(infoobjects) and variablesExample III
../AdditionalMetadataget queryname, query definition timestamp, data refreshtimestampExample
../QuerynameResults   resultset without variables  for BEx QueriesExample II
../viewnameresultset without view parameters  for CDS based QueriesExample I
../QuerynameResults?$inlinecount=allpagesresultset with linecount (number of rows returned by the query)Example IV
../Queryname(var1=value,var2=value,...)/Resultsresultset with variables (single selection)

Example III (OData EasyQuery)

Example VII (OData CDSQuery)

../Queryname(var1=datetime'YYYY-MM-DDT00:00:00')/Results

../Queryname(var1=time'PT<hh>H<mm>M<ss>S')/Results

resultset with date / time variables

datetime'2019-06-16T00:00:00' = June 16th 2019

time'PT19H05M05S' = 19:05:05

../QuerynameResults?$select=char1,char2,keyf4...reduced resultset output size via fieldselection

Example

Hierarchies: Example with $select=CHAR_N

../QuerynameResults?$filter=char1 eq 'value'reduced resultset output size via filter

Example V (OData EasyQuery)

Example VII (OData CDSQuery)

Example IX (OData EasyQuery)

 $order_by=char desc/ascsorting of values works similar to BW queries, see exampleExample VIII(OData CDSquery)
Important Points
  1. OData EasyQuery: all variables have to be specified in the URI, even when they should be left empty, see Example III and ODATA query with variables
  2. parameter $select: it defines the drilldown; if not specified, all InfoObjects/Fields(including free characteristics) and key figures are put into the drilldown!
  3. the URI parameters are case sensitive! See e.g. ODATA query with variables.
  4. OData CDS Query: the order of the infoobjects in the drilldown is defined in the CDS view, the order in the URI is irrelevant.
  5. OData Easy Query: the order of the infoobjects in the drilldown is defined in the Query(free characteristics are not taken into account), the order in the URI is irrelevant
  6. OData CDS Query: parameters are always mandatory and hence have to be filled by the URI: see Example VI.
  7. Analytical OData V4 services are not supported at the moment. It will be only available for OData CDS Query in the future S/4 releases.
Topics

Examples

  • Example I: Simple CDS based OData Query 
  • Example II: Simple BexQuery with active OData flag (OData EasyQuery)
  • Example III: OData EasyQuery with Variables
  • Example VI: OData CDS query with paramters and filters
  • Example VII OData CDSQuery with paramters and filters (Interval, Range)

  • Example VIII  OData Call using $select to select Query Structure Elements
  • OData Query with Hierarchy: Example I

Important Current Coding Corrections

  • 2534501 OQ: collectiv fix and features for ODataQuery 201709
  • 2517187 OQ: collectiv fix and features for ODataQuery 201707
  • 2495278 OQ: collectiv fix and features for ODataQuery 201706
  • 2483260 OQ: collectiv fix and features for ODataQuery - roundup 2476352
  • 2476352 OQ: collectiv fix and features for ODataQuery
  • 2455883 OQ: collectiv note for ODataQuery

SAP Consulting Notes

  • 2367553  ODataQuery features and limitation
  • 2512407  Common Issues when using ODATA Queries
  • 2505265  Odata - EasyQuery service not available after transport
  • 2498513  How to input variable values in URI for an Easy Query
  • 2257830  OQ: OData query with tracing
  • 1944258  Easy Query EQ and oData: Easy Setup Report 
  • 1906173  ODataQuery: Features and Limitations for SP05
  • 1941751  ODataQuery: Features and Limitations for SP06
  • 2387550  Unable to activate the OData service for a Fiori Analytic App on S4HANA

SAP Online Documenation




  • No labels