Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
knutheusermann
Product and Topic Expert
Product and Topic Expert
74,027
Using OData APIs for SAP Business ByDesign Analytics you can query and extract SAP Business ByDesign reports and data sources for analytical use cases.

In general SAP Business ByDesign (ByD) offers two REST APIs to extract analytical data:




  • OData for Reports can be used to access ByD reports. The OData API for reports is tailored for remote access to pre-processed analytical data: A remote system extracts formatted analytical data pre-processed by ByD. The remote system may extract a ByD analytical model as a cube incl. semantics like key figures and language-dependent texts, ready to be processed by 3rd-party clients, or the remote system extracts analytics result sets incl. aggregations and key figures, ready to be displayed for users.

  • OData for Data Sources is designed to extract analytical raw data. A remote system extracts ByD analytical raw data in flat tables, free of redundancies from ByD. The analytical raw data is then processed, combined and formatted in the remote system. Typically such remote systems are central business analytics application such as SAP Analytics Cloud.


You find documentations for both OData APIs in the ByD Help Center by searching with the key words "Retrieving Analytics Data Using OData".

Additionally ByD offers Soap services and OData APIs to access ByD business objects, but these APIs return deeply structured data and therefore requires some pre-processing and mapping before the data can be used in data warehouse solutions.


In the following this blog post focuses on OData for Reports.

 

OData for Reports


Using OData for Reports you can query and retrieve characteristics and key figures exposed in ByD analytical reports. This includes

  • standard data sources and reports,

  • data sources and reports created via SAP Cloud Applications Studio,

  • custom reports based on standard or custom data sources, created as key user, and

  • extension fields added by key user tools or SAP Cloud Applications Studio.


As result, ByD OData for Analytics provides you a highly flexible framework to query, read and analyze ByD business data, well-suited to serve your integration scenario.
The ByD OData API enables you to

  1. discover available ByD OData services for your business user,

  2. get metadata incl. technical field names, labels, data types and annotations,

  3. retrieve the data of ByD analytical reports.


You can control the response of your OData request by expanding the OData URI.

Below I will consider ByD OData rather from a business analytics point of view than from a REST point of view. Further information about REST, the OData-protocol in general and OData specifications can be found at http://www.odata.org or http://docs.oasis-open.org/odata.

For a quick start you can use the OData query builder: Open the SAP Business ByDesign work center view Business Analytics - Design Reports, mark the report of interest and click on "Build OData Queries".

 

Discover OData Services and get Metadata


The goal is to get analytical reports that I can access and all meta data (characteristics, key figures, data types, ...) for those reports.

Get OData containers for the logon user, or from a business user point of view: get all available work center for the logon user.
For containers with the following convention analytics data is available: <shortened name of work center>_analytics.svc.

URL pattern: <your system hostname>/sap/byd/odata/

Example: https://my123456.sapbydesign.com/sap/byd/odata/

Get OData entities for the logon user, or get all available analytical reports assigned to the logon user and visible in your Home work center.

URL pattern: <your system hostname>/sap/byd/odata/cc_home_analytics.svc

Example: https://my123456.sapbydesign.com/sap/byd/odata/cc_home_analytics.svc

To retrieve the entity metadata you can expand your OData URI by /$metadata.

Get OData entities for a container, or get all available analytical reports per work center incl. all report meta data like properties (key figures, characteristics), data types, etc..

URL pattern: <your system hostname>/sap/byd/odata/<shortened name of work center>_analytics.svc/$metadata

Example: https://my123456.sapbydesign.com/sap/byd/odata/bpm_businesspartnerdata_analytics.svc/$metadata

Get metadata for a specific entity, or get all metadata for a specific analytical report.

URL pattern: <your system hostname>/sap/byd/odata/<shortened name of work center>_analytics.svc/$metadata?entityset=RP<report ID>QueryResults

Example: https://my123456.sapbydesign.com/sap/byd/odata/cc_home_analytics.svc/$metadata?entityset=RPCRMSLOIB_...

 

Get Data of Analytical Reports


In all further examples I will skip the system host name. Let me list some simple examples before I go through the OData options step by step.

You can fetch entity data by adding the ByD analytics report ID to your OData URL.

URL pattern: <your system hostname>/sap/byd/odata/<shortened name of work center>_analytics.svc/RP<report ID>QueryResults

Example: /sap/byd/odata/cc_home_analytics.svc/RPCRMSLOIB_MQ0001QueryResults
As result the system returns the first 50 entries of report "Sales Order Volume" (50 entries is the default page size).

Some more examples for ByD standard business partner reports:

Account collaboration data: /sap/byd/odata/bpm_businesspartnerdata_analytics.svc/RPBPCSCARB_Q0001QueryResults

Account contacts data: /sap/byd/odata/bpm_businesspartnerdata_analytics.svc/RPBPCSCONTB_Q0001QueryResults

... or little more sophisticated:

Assume you would like to analyze the consumption of customer contracts. For this scenario you create a joined data source with ByD service confirmation items and customer contract items and a ByD report to list and analyze service confirmation items aggregated by customer contract information.
Assume further the custom report has the report ID ZABCDEF12345678ABCDEF.

Get service confirmations for contract CC1001:
/sap/byd/odata/cc_home_analytics.svc/RPZABCDEF12345678ABCDEFQueryResults?
$inlinecount=allpages&$select=FCISL_ACT_QTY_B,FCACCO_IAV_INV_QTY_BU,FCACCO_ITV_REQU_QTY_BU,FCZ0COUNT,CIBR_CUCO_ID,TIBR_CUCO_ID,CIBR_CUCO_I_ID,TIBR_CUCO_I_ID,CCCCO_DPY_MAINBUYERPTY,TCCCO_DPY_MAINBUYERPTY,CACCO_ITM_CREATIONDATE,CACCO_ITM_LASTCHANGEDATE&$filter=CIBR_CUCO_ID eq 'CC1001'

Get service confirmations joined with contract information, filtered by contract ID and contract item last changed date greater than 19th Feb. 2014:
/sap/byd/odata/cc_home_analytics.svc/RPZABCDEF12345678ABCDEFQueryResults?$inlinecount=allpages&$select=FCISL_ACT_QTY_B,FCACCO_IAV_INV_QTY_BU,FCACCO_ITV_REQU_QTY_BU,FCZ0COUNT,CIBR_CUCO_ID,TIBR_CUCO_ID,CIBR_CUCO_I_ID,TIBR_CUCO_I_ID,CCCCO_DPY_MAINBUYERPTY,TCCCO_DPY_MAINBUYERPTY,CACCO_ITM_CREATIONDATE,CACCO_ITM_LASTCHANGEDATE&$filter=CIBR_CUCO_ID eq 'CC1001' and CACCO_ITM_LASTCHANGEDATE ge datetime'2014-02-19T00:00:00'

Get service confirmations joined with contract information, filtered by contract ID and some extension field of type datetime:
/sap/byd/odata/cc_home_analytics.svc/RPZABCDEF12345678ABCDEFQueryResults?$inlinecount=allpages&$select=FCISL_ACT_QTY_B,FCZ0COUNT,CITM_POST_DT,CITM_CREATED_DT,CITM_CHANGED_DT,ZY86ABC123_ABC8D1B123&$filter=CIBR_CUCO_ID eq 'CC1001' and ZY86ABC123_ABC1234567 ge datetime'2014-02-19T00:00:00'

 

OData Parameter


The ByD OData URL consists of 4 components:

  • your system host name,

  • a shortened name of the ByD work center,

  • a report ID, and

  • query options.


URL pattern: https://<your system host name>.com/sap/byd/odata/<shortened name of work center>_analytics.svc/RP<report ID>QueryResults?
<query options>

ByD OData supports the following query options:

  • $select
    Expansion: $select=<one or more specified characteristics separated by commas>

  • $orderby (ascending)
    Expansion: $orderby=<one or more specified characteristics followed by asc, separated by commas>

  • $orderby (descending)
    Expansion: $orderby=<one or more specified characteristics followed by desc, separated by commas>

  • $totals
    Expansion: $totals=<one or more specified characteristics separated by commas>

  • $filter
    Expansion: $filter=<specified characteristic> eq '<filter value>'

  • $top
    Expansion: $top=<specified number>

  • $skip
    Expansion: $skip=<specified number>

  • $count

  • $inlinecount

  • $format


 

Select Option


The select option can be used to choose properties (key figures and characteristics) that shall be returned. Properties are specified using its technical names as provided in the entity meta data (e.g. CACCDOCTYPE for Journal Entry Type ID).

If no select options are specified in the URL, then the system returns all key figures and characteristics of the entity definition (report definition).

Example:

Select multiple characteristics:
&select=CCUSTOMER,TCUSTOMER,CCUCOREF,TCUCOIUUID,CPOSTDATE,CACCDCHUID,CSETOFBKS,CSRCNTHREF,CITM_ID

Please note that key figures are aggregated according the selected characteristics.

Example:

You query sales order items and select the key figures Number of Sales Order Items and Net Value, and the characteristics Product Category:
/sap/byd/odata/cc_home_analytics.svc/RPCRMSLOIB_MQ0001QueryResults?$inlinecount=allpages&$select=FCITEM_COUNT,FCITV_NET_AMT_RC,CIPR_CATCP_N,TIPR_CATCP_N

As result the system returns one entry per product category with aggregated sales order net values and the number of sales order items per product category:                      




























Product category ID: Product category name: Number of sales order items: Net value:
20 IT Equipment 3 5.415,00 EUR
310 Marketing 36 1.509,00 EUR
10-40 Customer Service 57 44.572,00 EUR


 

The OData interface returns at maximum 50 properties (corresponding to a report with 50 columns).

If an entity has more properties defined, then specifying select options in the OData URL is mandatory. However, in this case I would recommend to copy the report and reduce the number of properties to 50.

 

Filter Option



















































Operator: Description: Example:
eq Equal $filter=ServiceCategoryID eq '240-10'
ne Not equal $filter=ServiceCategoryID ne '240-10'
gt Greater than $filter=Quantity gt 15
ge Greater than or equal $filter=PostingDate ge datetime'2014-01-14T00:00:00'
lt Less than $filter=Quantity lt 95
le Less than or equal $filter=Quantity le 95
and Logical and $filter=Quantity le 95 and Quantity gt 15
or Logical or (for numeric characteristics) $filter=KCAMTCOMP le -10000 or KCAMTCOMP gt 10000


 

Filter functions like "startswith" are supported for characteristics that are configured as "Any Selection" in the report. In particular properties that are annotated with "sap:filter-restriction="multi-value"" in the OData metadata do not support functions.

Examples:

  • Filter by customer ID and set of books ID:
    $filter=CCUSTOMER eq '1029754' and CSETOFBKS eq '4010'

  • Filter by posting date (type date time):
    $filter=CPOSTDATE ge datetime'2014-01-14T00:00:00'


Filter by initial values


With ByD 1611 the OData API supports filtering by initial/null values: not assigned/null values has to be passed as filter condition in the format ” “ (double quotes separated by space – passed within single quotes), for example: CCUST_ABC eq ” “.

Examples:

…/sap/byd/odata/cc_home_analytics.svc/RP…QueryResults?$select=CDPY_PROS_CITY&$filter=CDPY_PROS_CITY%20eq%20'"%20"'

…/sap/byd/odata/cc_home_analytics.svc/RP…QueryResults?$select=CDPY_PROS_CITY&$filter=CDPY_PROS_CITY%20ne%20%27%22%20%22%27

 

AND/OR Operators and Intervals


The AND operator is allowed for "between" use cases only like <characteristic> ge <value 1> and <characteristic> le <value 2>.

You can use the OR operator to include two values, for example:
$filter=CACCDOCTYPE eq '1000' or CACCDOCTYPE eq '4000'

Excluding two values using the OR operator (for example: $filter=CACCDOCTYPE ne '1000' or CACCDOCTYPE ne '4000') is not possible.

Combining two different characteristics using the OR operator is not supported.


You can combine multiple intervals by using brackets, for example:
$filter=PARA_COMPANY eq '1000' and PARA_SETOFBKS eq '7000'
and ( PARA_FISCYEARPER ge 52016 and PARA_FISCYEARPER le 72016 )
and ( PARA_POSTDAT ge datetime'2016-06-25T00:00:00' and PARA_POSTDAT le datetime'2016-07-04T00:00:00' )



Boolean values


Example:
$filter=DebtorDoubtfulIndicator eq false
$filter=DebtorDoubtfulIndicator eq true

 

IDs and codes


Example: Filter by token (customer ID and set of books ID):
$filter=CCUSTOMER eq '1029754' and CSETOFBKS eq '4010'

 

Date and Time


Filter by date (OData type Edm.DateTime😞
$filter=CPOSTDATE ge datetime'2014-01-14T00:00:00'

Filter by time:
$filter=CLOGON_TIME ge time'PT00H00M32S'

Note:
You can filter by date-characteristics and time-characteristics only. Filtering by timestamps is not yet supported.
Date characteristics are exposed as OData type Edm.DateTime and require the literal form datetime'yyyy-mm-ddT00:00:00' in filter expressions.
Some date characteristics that correspond to a timestamps in the business object model are converted for usage in ByD analytics: The timestamp is converted to UTC and time is truncated afterwards.

For example:

  1. I create an invoice via UI as an Australian employee in time zone UTC+9.30, which means I see on the UI, that the invoice has been created at 2017-01-31 01:05 (my Australian time zone).

  2. I read the invoice via web service or SAP Cloud Application Studio: The web service returns the CreationDateTime in UTC: 30.01.2017 14:35:46.0000000Z.

  3. I check the invoice via UI using ByD reports: Created On is 2017-01-30 which is the creation date time in UTC with truncated time.

  4. I read the invoice using OData for Analytics: Created On ID (CDOC_CREATED_DT) is 2017-01-30T00:00:00.


Any filtering using OData has to take into account the UTC conversion and time truncation:

  • The OData with filter $filter=CDOC_CREATED_DT ge datetime'2017-01-30T00:00:00' returns the invoice above.

  • The OData with filter $filter=CDOC_CREATED_DT ge datetime'2017-01-31T00:00:00' does not return the invoice, because the filter date is greater than the invoice date in UTC.

  • The OData with filter $filter=CDOC_CREATED_DT ge datetime'2017-01-30T18:45:00' does return the invoice, because the time of the filter parameter is not taken into account.


 

Report Characteristics and Report Selection Parameter


When retrieving OData metadata you may observe that some report characteristics are mentioned twice in the entity metadata:

  • as property referring to a report characteristic (e.g. Property Name="CIP_SALES_UNIT" sap:label="Sales Unit ID") and

  • as property referring to a report selection parameter (e.g. Property Name="PAR_SEL_IP_SALES_UNIT" sap:label="Sales Unit").


The properties referring to report characteristics correspond to the characteristics as defined in the Report Wizard in step "3 - Select Characteristics".

The properties referring to the selection parameters are indicated as sap:selection="true" together with the selection type (for example sap:selection-type="multi-value") in the property attributes. The properties referring to selection parameters correspond to the report characteristics enabled for value selection in the Report Wizard in step "4 - Characteristic Properties".

You can use both type of properties for filtering, but filtering using properties referring to the selection parameters is recommended for the purpose of runtime and memory consumption optimization, because the filter parameter values are applied on the database level always.

Filtering using properties referring to report characteristics might be applied on the selection result only, depending on the overall report setup.

 

Report Initial Selection Default Values


Initial Selection Default Values are default values for selection parameter defined in the Report Wizard step "5 - Define Variables", button Maintain Default Values.

Report Initial Selection Default Values can be used to tailor ByD reports for OData consumption to simplify filtering in OData requests and to optimize runtime and memory consumption. Report Initial Selection Default Values can be overwritten or refined using OData filter parameter. If no corresponding filter parameter are provided in the OData request, then the system applies Initial Selection Default Values as provided in the report wizard.

 

Report Fixed Value Selections


Using the Report Wizard step "4 - Characteristic Properties" you can Set Fixed Value Selections for some characteristics.

Note: Report Fixed Value Selections and Initial View Default Selections are not the same. The Initial View Default Selection can be overrules using OData filter parameter whereas Fixed Value Selections cannot be changed in OData requests.

Therefore report Fixed Value Selections are effective possibilities to restrict access to ByD data using OData for Analytics.

 

Report Default Selection Variants


The Report Default Selection Variant is a report selection variant configured as default by a key user or business user in the report UI.

Report Default Selection Variants as well as all non-default report selection variants are not taken into account by the OData API.

 

Personalized characteristics and selection parameter


Personalized characteristics and Personalized selection parameter are characteristics added by a key user or business user in the report UI using button "Added field".

Personalized characteristics are exposed via OData as filterable characteristic, but not as property referring to the selection parameter (hierarchical parameters and relative selects are not supported as well).

Personalized characteristics that are added as key user using work center Business Analytics are available to all users.

Personalized characteristics that are added as business user (not using work center Business Analytics) can be retrieved by the same user only.

Furthermore these business user characteristics are not exposed if you are using entity set ana_businessanalytics_analytics.svc as well.

 

Filter in financial reports


Most financial reports and data sources have mandatory selection parameters like company and set of book.

In particular all reports based on financial balance data sources (for example report Trial Balance based on data source FINGLAU01) require to set the mandatory default selection values or filter parameters: company (COMPANY), set of books (SETOFBKS), fiscal year (FISCYEAR) and fiscal period (FISCPER). The report returns no data if those selection/filter values are not provided.

 

For further details and examples regarding filter and selection parameter please check my blog post Using Filter and Selection Parameter in ByD OData for Analytics.

 

Order By Option


The options $orderby=<characteristics name> asc or $orderby=<characteristics name> desc enable you to sort your query result ascending or descending with respect to a specific characteristics. You can sort by characteristics, but not by key figures.

Example:

Select sales order net values per product category sorted by the product category ID and the product category name (ok, the example sorting doesn't make much sense, but it shows how it works):
/sap/byd/odata/cc_home_analytics.svc/RPCRMSLOIB_MQ0001QueryResults?$inlinecount=allpages&$select=FCITEM_COUNT,FCITV_NET_AMT_RC,CIPR_CATCP_N,TIPR_CATCP_N&$orderby=CIPR_CATCP_N%20desc,TIPR_CATCP_N%20desc

 

Top, Skip Option (Paging)


The $top option specifies that only the first n records will be returned.

The $skip option specifies that the result shall not include the first n entities.

Both query options together can be used to process a paging through the server side hit list.
If no paging options are specified, ByD returns the first 50 entries due to default page size = 50.

Example:

Select the 3rd page of 10 entries (skip 20 and return 10), sorted by characteristic CIPY_BUY_CNTCD_N:
/sap/byd/odata/cc_home_analytics.svc/RPCRMSLOIB_MQ0001QueryResults?$inlinecount=allpages&$select=CIPY_BUY_CNTCD_N,FCITEM_COUNT,FCITV_NET_AMT_RC,
CIPY_BUYER_PTY,TIPY_BUYER_PTY,CIPR_CATCP_N,TIPR_CATCP_N
&$orderby=CIPY_BUY_CNTCD_N%20asc&$skip=20&$top=10


Totals Option


Using the totals option you can add entries with totals to the OData result.

Example:

The URL

/sap/byd/odata/cc_home_analytics.svc/RPCRMSLOIB_MQ0001QueryResults?$inlinecount=allpages&$select=CIPY_BUY_CNTCD_N,FCITEM_COUNT,FCITV_NET_AMT_RC,
CIPY_BUYER_PTY,TIPY_BUYER_PTY,CIPR_CATCP_N,TIPR_CATCP_N,
TotaledProperties&totals=CIPY_BUY_CNTCD_N,CIPY_BUYER_PTY,CIPY_BUY_CNTCD_N
&$orderby=CIPY_BUY_CNTCD_N%20asc


results in the additional totals entries (marked orange):




























































Product category ID Buyer party ID Buyer country Number of sales order items Net value
320 1000111 IN 1 220.00 USD
50-20 1000111 IN 4 320.00 USD
    IN 5 540.00 USD
10-40 MC4001 US 6 1000.00 USD
40 MC3123 US 8 600.00 USD
    US 14 1600.00 USD
      19 2140.00 USD


 

 

Other Options


Count


Returns the total number of entries.

Example:
/sap/byd/odata/cc_home_analytics.svc/RPCRMSLOIB_MQ0001QueryResults/$count

Inline Count


Returns the number of entries included in the query result.

Example:
/sap/byd/odata/cc_home_analytics.svc/RPCRMSLOIB_MQ0001QueryResults?$inlinecount=allpages&$select=FCITEM_COUNT,FCITV_NET_AMT_RC,CIPY_BUYER_PTY,
TIPY_BUYER_PTY,CIPR_CATCP_N,TIPR_CATCP_N,CIPY_BUY_CNTCD_N

 

Format


Allows you to specify the result format:

  • Atom (default)

  • JSON


Example:
/sap/byd/odata/cc_home_analytics.svc/RPCRMSLOIB_MQ0001QueryResults?$inlinecount=allpages&$select=FCITEM_COUNT,FCITV_NET_AMT_RC,CIPY_BUYER_PTY,
TIPY_BUYER_PTY,CIPR_CATCP_N,TIPR_CATCP_N,CIPY_BUY_CNTCD_N&$format=json

 

ID Access


Access an entry with a specified ID. IDs are provided in query results.

Example:
/sap/byd/odata/pmm_productdata_analytics.svc/RPSERVICE_Q0002QueryResults
('%7CCCHG_DATE%3D03/06/2015%7CCSERV_INT_ID%3DMCD-ICSP-1000%7C')

 

URL encoding for special characters and spaces


Some applications or browsers may require URLs without spaces, unsafe characters and special characters outside the ASCII character-set. In this case replace those characters by the correctsopnding %-syntax. You find more details on HTML URL Encoding Reference.

Example:




















<space> %20
' %27
( %28
) %29


 

Readable version: $filter=CIBR_CUCO_ID eq '1001'

with %-Syntax: $filter=CIBR_CUCO_ID%20eq%20%271001%27

 

How to set the language of the data returned?


Using parameter sap-language you can specify in which language descriptions and texts shall be returned.

Parameter:








sap-language=<language ISO code> Example: sap-language=fr


 

Example:
myXXXXXX.sapbydesign.com/sap/byd/odata/cc_home_analytics.svc/RPBUPCSD_Q0001QueryResults?$select=TMAIN_ADDRESS,CPRJTN_ROLE_CODE,TPRJTN_ROLE_CODE,CSTATUS,TSTATUS,CBP_UUID,CLEGAL_FORM,TLEGAL_FORM&sap-language=fr

 

 

Authorization for OData Access


Similar to the ByD UI every user has access to analytical reports that are assigned to work center views, which are covered by the business user access rights.

Technical users (for example communication users) cannot be used for OData access.

Steps to create a user with OData for Analytics authorization:

  1. Create a ByD analytics report and assign the report to a ByD work center view.

  2. Create a ByD employee or service agent (for service agents additionally request a ByD user).

  3. Assign the work center and work center view which contains the analytical report to the access rights of the employee or service agent.


The business user might get a specific security policy assigned that prevents password aging and hence necessity to change the password periodically.

If SAML SSO is configured on the tenant, and OData shall be accessed using basic authentication, SAML needs to be explicitly disabled for an OData call.

Example:
/sap/byd/odata/srm_supplierbase_analytics.svc/RPBUPSPP_Q0001QueryResults?saml2=disabled

 

High Volume Data Sources


Using ByD OData interfaces means to extract and transfer data via internet and hence every integration architecture should be carefully planned with regards to data volume and message sizes.
Any approach based on a "select-all" will not be a sustainable integration setup and reach memory or timeout boundaries at some point in time. You should make sure that the total amount of data loaded from the ByD database and the size of OData responses (xml or json message sizes) are reasonable sized and remain stable over years, even if the total number of database records may grow fast.

In the following I consider some possibilities to control the data fetched from the database and message sizes.

 

Extract delta data or limit the data extracted to a specific time frame


It is always recommended to fetched data using filters resulting in stable max. volumes. That means instead of reloading all data on every replication event, load missing data by filtering data created or relevant in a specific time period (for example filter by creation date, change date, posting date, fiscal period, or similar).

You can get information about filterable properties from the OData entity metadata, which contains all relevant information to assemble the ByD OData URL incl. property names, labels and filterable properties referring to characteristics and report selection parameter.

Note: Filtering using properties referring to the selection parameters is recommended for the purpose of runtime and memory consumption optimization, because the filter parameter values are applied on the database level always. Filtering using properties referring to report characteristics might be applied on the selection result only, depending on the overall report setup.

Examples:

  • Filter by selection parameter invoice date:
    $filter=PAR_SEL_DOC_INV_DATE ge datetime'2016-12-01T00:00:00'

  • Filter by selection parameter item creation date:
    $filter=PAR_SEL_ITM_CREATED_DT ge datetime'2017-01-04T00:00:00'


Note:
Combined and joined data sources may not contain all business documents due to its join conditions.
Example: When you cancel a time recording, the corresponding record will no longer be returned by the combined data source Employee Times (HCMTLMU01).

 

Pre-filtering using ByD report Fixed Value Selections and Initial Selection Default Values


When creating a custom report using the ByD Report Wizard, you can define Fixed Value Selections and Initial Selection Default Values.

Both filter settings are applied on the database and therefore can be used to optimize runtime and consumption of system resources efficiently. Furthermore Fixed Value Selections and Initial Selection Default Values support relative selects, for example "Current financial period" and "Current Month to Date".

Both settings are well-suited to tailor your ByD report for OData consumption in particular in case of high volume data sources.

 

Extract aggregated data with constant numbers of returned aggregated records


By choosing fields to be selected in the OData request, you implicitly define the level of aggregation in ByD before the data is transferred to the OData consumer. Using this aggregation and choosing the selected fields carefully, you can very efficiently reduce the number of records returned, or even reach constant numbers of records returned for growing data sources.

Basically requesting aggregated data is a possibility to optimize runtime, memory consumption and the size of transferred data volume. In general aggregations are done on database level reducing the impact of growing data source volumes.
However, aggregation still requires to select all entries and hence runtime and memory allocation increases over time.

Please note that restrictions in key figures are applied on OLAP level and hence aggregation might not be possible database level, but lead to an additional aggregation on OLAP level. Therefore using aggregation for the purpose to solve a data volume issue requires a very detailed analysis of the report setup. I would rather recommend to use OData filter and report selection parameter to optimize runtime and memory consumption.

Check calculated and restricted key figures: beyond characteristics listed in the select statement, all characteristics used for calculations and restrictions are loaded as well and significantly reduce the performance of aggregation.

Example:
You query sales order items and select the key figures Number of Sales Order Items and Net Value, and the characteristic Product Category:
/sap/byd/odata/cc_home_analytics.svc/RPCRMSLOIB_MQ0001QueryResults?$inlinecount=allpages&$select=FCITEM_COUNT,FCITV_NET_AMT_RC,CIPR_CATCP_N,TIPR_CATCP_N
As result the system returns one entry per product category with aggregated sales order net values and the number of sales order items per product category


Select required fields (select-parameter)


It is always better to fetch only required characteristics and key figures from the data source. For this purpose you can create custom reports for OData usage with minimum needed fields and characteristics or you can use the OData $select-parameter to specify the fields retrieved from the data source.

It does not make a difference if you apply the $select option on a big standard report with 50+ characteristics and key figures, on a small custom report built on a big standard data source, or on a small custom report build on a small custom data source. The system selects the specified fields from the database only. But: If key figures use additional characteristics, these are selected as well implicitly!

If no OData $select option is provided, then the system returns all key figures and characteristics of the entity definition (report definition); at max. 50 characteristics and key figures.

Example:
Select multiple characteristics: &select=CCUSTOMER,TCUSTOMER,CCUCOREF,TCUCOIUUID,CPOSTDATE,CACCDCHUID,CSETOFBKS,CSRCNTHREF,CITM_ID


 

Paging (top/skip parameters)


“Top” gives that many specific number of records. But this has nothing much to do with performance as this is calculated at runtime after fetching all data and taking into account report calculations, aggregations, etc.

This means paging using top/skip mainly has an effect on the transferred data, but not on the allocated memory and server-side runtime.

 

Performance impact of filter and selection parameter


In general you can change and enhance ByD reports from multiple point of views:

  • Using the Report Wizard in work center Business Analytics you can create or changing the basic report setup. The characteristics and key figures selected in the Report Wizard are called Initial View. The selection parameters and selection parameter values that are configured in the Report Wizard are called Initial Selection and Initial Selection Default Values. Furthermore you can define Fixed Value Selections.

  • If you open a report as key user or business user you have the possibility to add characteristics and key figures, and you can assemble a personalized report view and personalized selection variant. Those added report characteristics and report selection parameter are called Personalized Characteristics and Personalized Selection Parameter.

  • Using the option Edit With Web Browser in work center Business Analytics you have the possibility to add characteristics and key figures, and assemble a report view. Furthermore you can enter selection parameter values and filter values and save them as selection variant. The report view as well as the selection variant can be saved for later reuse by all users. Additionally you can mark report views and selection variants as Report Default View and Report Default Selection Variant.


Please check the following possibilities to setup filter and selection parameter for OData for Analytics requests and take into account its impact to runtime and consumption of system resources:

  1. Fixed Value Selection:

    • Fixed Value Selections are applied on database level.

    • Relative selects are supported.

    • These selection parameter values are applied for all OData requests. Using OData filter parameter you cannot overwrite Fixed Value Selections.



  2. Initial Selection Default Values:

    • Selection parameter values are applied on database level

    • Relative selects are supported

    • These selection parameter values are applied for all OData requests. Using OData filter parameter you can overwrite initial selection default values



  3. Report Selection Variants and Report Default Selection Variants:

    • Selection parameter:

      • Selection parameter values are applied on the DB

      • Relative selects are supported

      • Selection parameter values overwrite initial selection default values (2) if you open the report via UI

      • Default selection variants are not taken into account for OData requests

      • User-specific or non-default selection variants are not taken into account for OData requests



    • Filter parameter:

      • Filter parameter are applied on the selection result (Selection parameter values are first applied on database level. After that, OLAP applies the filter parameter values on the database selection result)

      • Filter parameter values are not taken into account for OData requests





  4. OData Parameter $filter using properties referring to selection parameters (property attribute sap:selection="true"😞

    • Example: Filter by creation date: $filter=PAR_SEL_ITM_CREATED_DT ge datetime'2017-01-04T00:00:00'

    • Filter parameter values referring to selection parameters are applied on the database level

    • These OData filter parameter values for selection parameter can be used to overrule initial selection default values (2). Selection parameters that are not provided as filter parameter in the OData request are still applied using the initial selection default values.

    • Relative selects are not supported



  5. OData Parameter $filter using properties referring to filterable characteristics:

    • Example: Filter by creation date: $filter=CCREATIONDATE eq datetime'2015-06-25T00:00:00'

    • Selection parameter values of (2) and (4) cannot be overruled. Initial selection default values (2) and OData filter referring to selection parameter (4) are applied first on database level. OData filter parameters referring to filterable characteristics (5) might be applied on the database selection result or directly on database level depending on the overall report setup. For runtime and memory consumption optimization it is better to use initial selection default values (2) and OData filter referring to selection parameter (4).

    • Relative selects are not supported



  6. OData Parameter $select for characteristics and key figures:

    • Example: $select=FCDEBIT_CURRCOMP,FCCREDIT_CURRCOMP,FCBALANCE_CURRCOMP

    • The OData select parameter does not reduce the number of records but the number of fields fetched from database

    • $select parameter values are applied on the DB directly. In general fields not listed are not fetched from DB and hence you can use this parameter to reduce memory consumption. However, characteristics used by key figures are selected additionally as well, even if not listed in the OData $select parameter.




For further details and examples regarding filter and selection parameter please check my blog post Using Filter and Selection Parameter in ByD OData for Analytics.

 

 

Some Trouble Shooting...


Error message: “Program error in class CL_RSBOLAP_QV_RESULT_SET method : TOO_MANY_DRILL_DOWN_OBJECTS”

=> You report has too many properties; the report must not have more than 50 properties. Reduce the number of requested properties using parameter $select.

Error message: "Ressource für das Segment 'RP<report ID>QueryResults' nicht gefunden"

=> Logon user does not have authorization to access the report.

Error code: http 404

=> IE Version (better use Firefox) or user/password.

Meta data for report not shown, even if report can be used.

=> (Re-)assign report to work center.

Why does the oData service return 50 entries only?

=> 50 entries is the default if the parameter $top is not specified in the oData URL.Use $top, $skip and $inlinecount=allpages to
specify the number of entries to be returned and for paging.

Why does the oData service return less entries than expected, even if I didn't set any filter?

=> Report default selections cannot be overwritten with oData-based retrieval => Copy report w/o default selections.

MS Internet Explorer renders the OData result as feed:

You can turn off the RSS feed reading view on the internet explorer by the following steps:

  1. Open Internet explorer tools menu > select internet options > go to the content tab

  2. Click on Settings of the "Feeds and Web Slices"-section

  3. Uncheck the check box "Turn on feed reading view"

  4. Click on ok-button and restart the Internet Explorer


Error message 401 Unauthorized using SVC-documents in Microsoft Visual Studio or Excel-PowerPivot:

The OData metadata level service URL call requires  “/” at the end, e.g. https://myXXXXXX.sapbydesign.com/sap/byd/odata/crm_serviceentitlements_analytics.svc/

If not appending “/” after .svc, the system returns an 401 authorization error, since it was not getting the correct path and hence cannot not authenticating the web service call.
183 Comments
knutheusermann
Product and Topic Expert
Product and Topic Expert
Hi Robin,

the OData API for data sources is designed for raw data extraction into external analytics applications. Therefore the OData API supports access using technical users only (the communication user taken form the communication arrangement "Analytics DataSources OData").

The error message requires some analysis - could you please open a ByD incident to report your issue?

Thanks and best regards,
Knut
knutheusermann
Product and Topic Expert
Product and Topic Expert
Amendment: As a quickfix you may delete and recreate the communication arrangement "Analytics DataSources OData".
knutheusermann
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Michael,

the xml-response provided by the endpoint https://{{TenantHostname}}/sap/byd/odata/ returns the enitity sets for the OData API for reports only. It shows the work centers assigned to the logon user with the possibility to access ByD reports assigned to these work centers via OData. 

To make goods movements or create/change sales orders and purchase orders, you would need to use other API types (for example SOAP Web Service APIs or OData APIs for Business Objects).

Please check the ByD API Overview for more details incl. configuration and authorization.

Best regards, Knut 

 
former_member756047
Discoverer
0 Kudos
Hi Knut,

sadly I am still stuck on this one. So I have read your other blog post and I do understand now how the API's are different and what they are intended for. As you stated a Goods Movement should be possible with the OData API for Business Objects. As being said I've managed to get a Sales Order and Purchase Order going (like explained here: https://blogs.sap.com/2019/02/06/iot-made-simple-with-sap-business-one-and-sap-business-bydesign/ ). In your OData Github Repo are examples to import these custom OData definitions with the help of the xml file. In that collection is no example for a GoodsMovement and if I try to create a custom OData service on my own I do lack the business object name which should be selected for a Goods Movement. There is none BO named "Goods Movement". This differs from the Sales Order example as their Business Object Name is literally "Sales Order". Can you provide me a way to check which Business Object is involved in the Goods Movement process when I do it manually or do you may be know it from head?

Sorry if this question is kind of stupid but I am actually quite descent in computer science but not a master in terms of SAP usage. That might explain things...

Many thanks in advance. Very much appreciated!

Best,
Michael
former_member440418
Participant
0 Kudos
Great blog Knut its very helpful, one question though if my report has hierarchy will this OData service work?

 

Thanks

Dinesh
knutheusermann
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Dinesh,

you can access reports with hierarchies using the OData API for reports as well. However, the OData API returns report characteristics and key figures, but not reporting structures such as for example financial reporting structures.

Best regards,
Knut
knutheusermann
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Michael,

I added an OData example for goods movements to the Github repository GitHub - ByD API Samples.

Please note, that beside the approach to use Custom OData services you can use the SOAP web service API InventoryProcessingGoodsAndActivityConfirmationGoodsMovementIn as well.

Best regards,
Knut
former_member756047
Discoverer
0 Kudos
Hi Knut,

I don't know where to begin. Probably as being said earlier thank you so much for providing all the stuff you made. I made the goods movement happen a moment ago and on top of that a fully automized complete purchase order process which will be used in combination with a IoT Dash Button. I'll use it in terms of a research project where we try to automize intra logistic drone delivery with fully automized ERP processes by making use of simplified control units like a Dash Button.

May be it helps if I share some of my experience using these OData service examples to give you at least some sort of constructive feedback regarding my starting problems even though that seems not to be much in return compared to your great work.

Several of my problems where based on User Access problems regarding Workcenter Views and involved restriced/unrestricted access privileges. Also the purchase order is a little bit strict in the way that it is a complex procedure with a lot of REST calls that need to be done fully and in the correct order. Therefore making adjustmens/customization to some parameters and get them working seems to be kind of overwhelming if it fails as it is not easy to understand which miss configuration of which rest call caused the issue. May be a more simplified example e.g. without changes to purchase order attributes (buyer, bill-to, etc.) acknowledgement and invoicing might be more easily understood by odata beginners. To customize and extend a more simplified example might be more intuitive then breaking down a complex one and investigating problems in a much bigger REST call chain.

Again many thanks Knut, making my OData services run already made my weekend.

Cheers and best,
Michael
thomas_hechtel
Explorer
0 Kudos
Any news on that issue?

At the moment im only able to establish a SAC->ByD Connection to a specific OData Service.But for now i understand that adding https://<your system information>.sapbydesign.com/sap/byd/odata/analytics/ds/ as the connection should bring up all odata exposed data sources.

Thanks for the nice blog.

Best regards

Tom
s_kaiser
Explorer
0 Kudos
Thanks a lot for this great post !

 

I would like to know if there is a way to manage Sales Orders "consignment issues" via SOAP or ODATA..

I'm creating the sales orders using SOAP for now, it's ok for consignment fill-up (using ProcessingTypeCode TACF).

But for consignment issue I need to assign the identified stock ID and it seems not possible into the soap service managesalesorderin5..

 

Any idea ? 🙂   Thanks a lot in advance for any hint/help !
knutheusermann
Product and Topic Expert
Product and Topic Expert
Hi Sebastien,

you can assign the identified stock ID using both API types.

OData:

Add the IdentifiedStockID to the item product of your custom OData service, create the sales order for the consignment issue, and patch the item product.

For example:
POST /sap/byd/odata/cust/v1/khsalesorder/SalesOrderCollection HTTP/1.1

{
"ExternalReference": "CONIS-20211021111042",
"Name": "Consignment Issue",
"DataOriginTypeCode": "1",
"DeliveryPriorityCode": "1",
"SalesUnitParty": {
"PartyID": "P1110"
},
"BuyerParty": {
"PartyID": "CP100120"
},
"ProductRecipientParty": {
"PartyID": "CP100120"
},
"Item": [
{
"ID": "10",
"ProcessingTypeCode": "TACI",
"ItemProduct": {
"ProductID": "P100129"
},
"ItemScheduleLine": [
{
"Quantity": "1",
"unitCode": "EA",
"StartDateTime": "2021-10-21T00:00:00Z"
}
],
"ItemShipFromLocation": {
"LocationID": "P1100"
}
}
]
}

PATCH /sap/byd/odata/cust/v1/khsalesorder/ItemProductCollection('00163EC91F901EEC8CCAA461B367CF0A') HTTP/1.1

{
"ObjectID":"00163EC91F901EEC8CCAA461B367CF0A",
"IdentifiedStockID": "100001"
}

SOAP service Manage Sales Orders:

Add the identified stock ID in segment ItemProduct.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:glob1="http://sap.com/xi/AP/Globalization">
<soapenv:Header/>
<soapenv:Body>
<glob:SalesOrderBundleMaintainRequest_sync>
<BasicMessageHeader>
<!-- Enter message header UUID for idem potency! -->
<!-- <UUID>?</UUID> -->
</BasicMessageHeader>
<SalesOrder actionCode="01">
<ObjectNodeSenderTechnicalID>S1</ObjectNodeSenderTechnicalID>
<ChangeStateID></ChangeStateID>
<BuyerID>{{SalesOrderExternalReference}}</BuyerID>
<Name>Consignment Issue</Name>
<!-- DataOriginTypeCode: 4 = Internet order -->
<DataOriginTypeCode>1</DataOriginTypeCode>
<!-- <ReleaseCustomerRequest>true</ReleaseCustomerRequest> -->
<ReleaseAllItemsToExecution>true</ReleaseAllItemsToExecution>
<SalesUnitParty actionCode="04">
<PartyID>{{ConsignorSalesUnitID}}</PartyID>
</SalesUnitParty>
<SalesAndServiceBusinessArea actionCode="04">
<DistributionChannelCode>01</DistributionChannelCode>
</SalesAndServiceBusinessArea>
<AccountParty actionCode="04">
<PartyID>{{ConsigneeAccountID}}</PartyID>
</AccountParty>
<ProductRecipientParty actionCode="04">
<PartyID>{{ConsigneeCustodianID}}</PartyID>
<!-- Document specific address: -->
<!-- <Address>
<Name>
<AddressRepresentationCode>?</AddressRepresentationCode>
<Name>
<FormOfAddressCode>?</FormOfAddressCode>
<FirstLineName>?</FirstLineName>
<SecondLineName>?</SecondLineName>
</Name>
</Name>
<PostalAddress>
<AddressRepresentationCode>?</AddressRepresentationCode>
<CountryCode>?</CountryCode
<CityName>?</CityName>
<StreetPostalCode>?</StreetPostalCode>
<CompanyPostalCode>?</CompanyPostalCode>
<StreetName>?</StreetName>
<HouseID>?</HouseID>
<BuildingID>?</BuildingID>
<RoomID>?</RoomID>
<FloorID>?</FloorID>
<CareOfName>?</CareOfName>
</PostalAddress>
</Address> -->
</ProductRecipientParty>
<DeliveryTerms actionCode="04">
<DeliveryPriorityCode>1</DeliveryPriorityCode>
</DeliveryTerms>
<Item actionCode="01">
<ObjectNodeSenderTechnicalID>S1-I1</ObjectNodeSenderTechnicalID>
<ID>10</ID>
<ProcessingTypeCode>TACI</ProcessingTypeCode>
<ItemProduct actionCode="04">
<ProductInternalID>{{MaterialID}}</ProductInternalID>
<IdentifiedStockKey>
<ID>{{IdentifiedStockID}}</ID>
</IdentifiedStockKey>
</ItemProduct>
<ItemScheduleLine actionCode="04">
<ID>1</ID>
<TypeCode>1</TypeCode>
<Quantity unitCode="EA">2</Quantity>
<!-- Item issue date: -->
<DateTimePeriod>
<StartDateTime timeZoneCode="UTC">{{IssueDate}}</StartDateTime>
<!-- <EndDateTime>{{IssueDateEndDate}}</EndDateTime> -->
</DateTimePeriod>
</ItemScheduleLine>
<ShipFromItemLocation actionCode="04">
<LocationID>{{ConsignorSiteID}}</LocationID>
</ShipFromItemLocation>
<PriceAndTaxCalculationItem actionCode="04">
<ItemMainPrice actionCode="04">
<Rate>
<DecimalValue>10.00</DecimalValue>
<CurrencyCode>USD</CurrencyCode>
<BaseDecimalValue>1</BaseDecimalValue>
<BaseMeasureUnitCode>EA</BaseMeasureUnitCode>
</Rate>
</ItemMainPrice>
</PriceAndTaxCalculationItem>
</Item>
</SalesOrder>
</glob:SalesOrderBundleMaintainRequest_sync>
</soapenv:Body>
</soapenv:Envelope>

However, using both API types it is not yet possible to trigger/execute a "Consignment allocation" (which is mandatory to release the sales order). Please request an enhancement of the public solution model if you would like to run this step via Web API as well.

Best regards,
Knut
s_kaiser
Explorer
0 Kudos
Identified stock selection is a good thing and will help a lot.

I'll create the PSM enhancement request as suggested for consignment allocation action.

Thanks a lot for your answer Knut !!
ezorhub
Participant
0 Kudos
Hello, Knut!

Always wanted to say many thanks for your post!

I just wondered How many I can get data from this service?

I searched $inlinecount=allpages, the result count from SAP ByD report was same, "522".

but in the postman, I've got only 50 records returned at first time. Is there any limit to get data? or can you show me how to get all data if I can?

now I just searched how many records that I have to get by that filter "$inlinecount" firstly, and secondly called using that count as a top parameter. ($top={{inlinecount}}) But I'm not sure if it's a correct way. 😥
s_kaiser
Explorer

Hello Zozo Park

Could you try to set the $top value to a big number, like 200000 (or at least something you're sure that is bigger than your result set).

In "Some Trouble Shooting…" section you can see this question/answer :

Why does the oData service return 50 entries only?
=> 50 entries is the default if the parameter $top is not specified in the oData URL.Use $top, $skip and $inlinecount=allpages to specify the number of entries to be returned and for paging.

If this answered your question; do not hesitate to read this full blog, including the question/answer part, and users comments. It will save you a lot of time for sure.

Sébastien.

 

ezorhub
Participant
Hello, Sébastien!

just worried if it was right or not. 😊

Thank you so much letting me know! solved it perfectly.

Zoe.

 
knutheusermann
Product and Topic Expert
Product and Topic Expert

Hi Zozo,

please let me add some remarks to Sebastiens answer:

$count:

You can use $count to get the total number of records. However, keep in mind, that the result takes into account the settings of the report, incl. default filters. $count returns a number only, w/o records.

Examples:

  • GET /sap/byd/odata/crm_customerinvoicing_analytics.svc/RPCRMCIVIB_Q0001QueryResults/$count
    • Here, the default report selection parameter settings for the timeframe applies
      => my result: 326.
  • GET /sap/byd/odata/crm_customerinvoicing_analytics.svc/RPCRMCIVIB_Q0001QueryResults/$count?$filter=PARA_CAL_DAY ge datetime'2019-01-01T00:00:00'
    • Here, I'm overwriting the default report selection parameter settings
      => my result: 573

You find more details about the report settings in blog post https://blogs.sap.com/2017/02/08/using-filter-and-selection-parameter-in-byd-odata-for-analytics/.

$inlinecount and $top:

You can use $inlinecount = allpages to get the total numnber of records based on the filter parameter. $top specifies how many records are returned. If you don't submit the parameter $top, then system automatically applies the default value $top = 50.

Exampes:

  • GET /sap/byd/odata/crm_customerinvoicing_analytics.svc/RPCRMCIVIB_Q0001QueryResults?$format=json&$inlinecount=allpages&$filter=PARA_CAL_DAY ge datetime'2019-01-01T00:00:00'
    • Returns "__count": "573" in my test system (compare above)
    • Returns 50 records (the default of $top = 50 applies)
  • GET /sap/byd/odata/crm_customerinvoicing_analytics.svc/RPCRMCIVIB_Q0001QueryResults?$format=json&$inlinecount=allpages&$filter=PARA_CAL_DAY ge datetime'2019-01-01T00:00:00'&$top=600
    • Returns "__count": "573" in my test system (compare above)
    • Returns all 573 records

Here as well the system applies default report selection parameter settings, which can be overwritten as described in the blog post mentioned above.

There is no fixed maximum value for $top, but your filter parameters, your choice of properties and key figures in $select has an impact on the request runtime and the memory required to fetch and process data from the database. Please check the remarks about high volume data sources above.
The parameter $top has an impact on the runtime as well, but much less than your  settings for the parameters $filter and $select. 

Best regards,
Knut

0 Kudos
I want to know much about below

We are planning to use SAML SSO in our tenant,

You said SAML needs to be explicitly disabled for an OData call.

If we don't set disable for SAML , what will happen for it ?

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

If SAML SSO is configured on the tenant, and OData shall be accessed using basic authentication, SAML needs to be explicitly disabled for an OData call.

-------------------------------------
knutheusermann
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Chen,

using the OData API for reports with business users, you have 4 possible authentication options:

  • Basic authentication (user/password)

  • Certificate (user logon certificate)

  • OAuth 2.0 SAML Bearer authentication

  • SAML 2.0 (Identification by user ID or e-mail address; specific endpoint for single sign-on: <sso-hostname>/sap/byd/odata-sso/…)


For the first 3 options you use the standard ByD hostname, such as for example my123456.sapbydesign.com.

For the 4th option you need to use the sso-hostname, such as for example my123456-sso.sapbydesign.com.

There is no need to disable SSO.
0 Kudos
Hi Knut,

So you mean when we use below 3 options, we need to disable SSO ?

  • Basic authentication (user/password)

  • Certificate (user logon certificate)

  • OAuth 2.0 SAML Bearer authentication


BR
Chen
knutheusermann
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Chen,

I'm not sure If I understand correctly what you mean by "disable SSO"?

However, SSO does not play any role when using basic auth or certificate. You can configure SSO if you want users to authenticate via some IDP.

If you want to use OAuth, you need to configure an OAuth Identity Provider in ByD. You find an example in my blog post Configure OAuth 2.0 for SAP ByDesign OData Services or in github repository SME Partner Reference Application.
0 Kudos
Dear Knut,

 

Actually, we are using the Odata to get data from BYD and send them to other systems.

But now we don't input the condition saml2=disabled in Odata.

So I'm not sure when we use SAML SSO in our tenant , if we need to add the condition saml2=disabled in all Odata.

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

/sap/byd/odata/srm_supplierbase_analytics.svc/RPBUPSPP_Q0001QueryResults?saml2=disabled

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

BR
Chen
knutheusermann
Product and Topic Expert
Product and Topic Expert
0 Kudos
Well, the parameter saml2=disabled is only needed if you are using the sso-hostname, but don't want the system to run a saml-procedure.

I would suggest to use the "normal" hostname; then you don't have to add the parameter saml2=disabled.
Example: my123456.sapbydesign.com/sap/byd/odata/srm_supplierbase_analytics.svc/RPBUPSPP_Q0001QueryResults
0 Kudos
Dear Kunt-san,

Thanks for explain !

Now I understand !

But when I try Odata by using myXXXX-sso and without "saml2=disabled"

It still need me to input user id and password and won't go to SSO.

 

danielzhou
Discoverer
0 Kudos
Hi Chen,

 

As Knut mentioned, for SAML 2.0, the endpoint should like <sso-hostname>/sap/byd/odata-sso/....     The fourth part of the endpoint URL is odata-sso instead of odata.

Good luck.
0 Kudos
Dear Daniel-san,

Thank you very much !

Now I understand.

BR
Chen
StefanieSchulke
Explorer
0 Kudos
Dear Knut,

Thanks for the interesting blog, very helpful!

I am running into a problem with a certain financial report that I need to retrieve data from using OData. With most financial reports (including this one) there is an initial setting for the company which will be selected automatically, namely the "Default Selection". In my OData request, I added the filter for company in my request (like you suggested in your blog), but it seems that the results are still only showing for the "Default Selection" company.

I also created a copy of the report and tried to alter the default selection in the report wizard, but the key figure group uses the field as a filter. So even in the copy report, I can not alter this filtering option. The key figures are also based on fields which are not part of the standard Data Source on which this report is based.

Any suggestions here? The report I am using is Aging List For Receivables With Journal Entry Details.

Thanks you in advance,

Regards,

Stefanie
kostadin_terziev
Participant
0 Kudos
Hello, knut.heusermann

 

Is it possible to expose a report based on a custom joined data sources created via Cloud Application Studio and get the data for it?

 

Regards,

Kostadin
knutheusermann
Product and Topic Expert
Product and Topic Expert
Hi Kostadin,

yes, that should be possible. However, please consider any performance impact of the data source join.

Best regards,
Knut
knutheusermann
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Stefanie,

in the OData metadata you see the report selection parameter as special filter characteristics. Typically these properties are name with the prefix "PARA_" or similar; you can identify them as well by the property attribute: sap:selection="true".

Please check blog post https://blogs.sap.com/2017/02/08/using-filter-and-selection-parameter-in-byd-odata-for-analytics/ for more details and GitHub repository https://github.com/SAP-samples/byd-api-samples for examples.

Best regards,
Knut
kostadin_terziev
Participant
0 Kudos
Thank you, knut.heusermann .
dimitrijhilt
Explorer
0 Kudos
Hi Knut

thanks for very comprehensive article. Do you have any tips how to use Microsoft PowerQuery (Excel or PowerBI) for access reports using SSO? I was able to access them via browser, but not with Excel or PowerBI as a OData stream.

 

Best

Dimitrij
YanGerzon
Participant
0 Kudos

Hi,

Is there any guide or suggestion you can give to making a BTP html5 app that takes data from a report in sap BYD?
This works fine with SAP BYD business objects Odata or sap BYD data source Odata, using either fiori templates or free style fiori apps but it refuses to work with SAP BYD report Odata.

Any help is appreciated.

najari
Participant
0 Kudos

Hi Knut,

We have to connect data from SAP ByDesign to our company datalake.

A technical prerequisites for any system to be connected to this datalake is to be able to capture delta data and hard deletions (physical deletions).

Is there any way to enable CDC Capture Change Data mechanisms for OData Services like other SAP Source Systems e.g. via ODP Framework?

Thanks, and best regards,

Saleem