The SAP Business ByDesign (ByD) provides REST/OData APIs to access ByD business objects, reports and data sources:
- The OData API for Reports is tailored for remote access to pre-processed and formatted analytical data (reports). The remote application may extract a ByD analytical model as a cube incl. semantics like key figures, language-dependent texts and aggregated data.
- The OData API for Data Sources is designed to extract analytical raw data (data sources) in flat tables, free of redundancies from ByD.
- The OData API for Business Objects is designed for UI-driven access to ByD business objects. A UI-like remote application or system interactively queries, reads, creates, updates, deletes or performs actions on ByD business objects and business documents. Using the work center “Application and User Management – OData Services“, key users are empowered to decide which business objects, nodes, elements and actions are exposed via OData API.
You find more information about ByD APIs in blog post SAP Business ByDesign – API Overview.
Where do I get OData examples?
To get some hands-on experience using SAP Business ByDesign OData APIs you find a repository of API Examples on GitHub: SAP Business ByDesign – API Samples.
The GitHub repository provides sample ByD Custom OData Services for currently 44 business objects and 6 Postman collections with more than 600 example OData requests. The Postman collections illustrate hands-on how to access master data, business documents and analytical data in context of ByD business processes with a focus on ByD OData APIs.
All sample Postman collections are tailored to SAP Business ByDesign Partner Demo Tenants (Full scope US) with preconfigured and loaded sample data provided by SAP.
Nevertheless you can use the Postman collections and sample Custom OData Services in other ByD systems as well, if you adopt Postman environment variables and Postman requests according the business configuration and master data of your ByD system.
The GitHub repository contains the following Postman collecions:
- Analytics – Data Sources: Extract analytical raw data (data sources) from the ByD.
- Analytics – Reports: Extract pre-processed, aggregated and formatted reporting data from ByD.
- Master Data: Access ByD master data objects using APIs
- Organizational Structure
- Service Product
- Sales Price
- Business Partner
- Employee and Position
- Code lists
- Reference Scenarios: Run ByD business processes using APIs to get insights how to create, change and read involved business documents and how to create business document relationships to achieve a meaningful document flow
- Lead to opportunity to quote
- Order to cash for services
- Procure to pay for services
- Field service and repair
- Procure to stock
- Sell from stock
- Drop shipment
- Make to stock
- Clear due items using bank statements
- Projects: Create, change and read cost collecting projects and customer projects
- Cost collection project with task hierarchy
- Cost collecting project with project team and work
- Customer project with planning data
- Sell project-based services (sales order > project > project time recordings)
- Sales and Commerce Scenarios: Run ByD sales and commerce processes using APIs to get insights how to create, change and read involved business documents and how to create business document relationships to achieve a meaningful document flow.
- Sell from stock with external payment
- Create customer invoices with external payment
- Customer return to stock
- Pre-confirm payments using clearing house statements
- Confirm payments using bank statements
- Create sales orders using a nested create, batch and node-by-node
- Create sales orders with attachments
- Create sales orders with externally provided prices, discounts and surcharges
Please check the description of the respective Postman collection for further details.
How to run API examples?
The easiest way to run an API sample scenario would be using a SAP Business ByDesign Partner Demo Tenant (Full scope US) with preconfigured and loaded sample data provided by SAP.
The following example is based on such a tenant and I am running the scenario “Master Data – Service Product (write)“:
- Install the API sample package “Master Data“ and configure your ByD system following the instructions in chapters “Download and Installation” and “Configuration” of the GitHub repository readme file.
- Open the Postman Runner and select the collection “Master Data“, the collection folder “Service Product (write)” and the environment “Master Data“:
- Click on “Run Service Product (write)” and see the process flow:
For more detailed analysis you can open the Postman Console to log detailed traces or simply execute the requests one-by-one in the Postman collection itself.
By the way:
The sample Postman collections may serve as well as approach to create meaningful data along process chains to prepare a ByD system for demo purposes, or to run regression tests by processing end-to-end business processes.
Blog Posts with further Examples
- Extend SAP ByDesign using SAP Cloud Platform HTML5 Applications
- Configure OAuth 2.0 for SAP ByDesign OData Services
- OData Example: Read and Write Product Purchasing Data
- OData Example: Create and Update Product Data in ByD
- Create ByD Sales Orders using Alexa
- Alexa Meets SAP Business ByDesign
- SAP Business by Design – How to Create an OData Service (Youtube)
- SAP Business ByDesign Side-by-Side Extensions on SAP Cloud Platform