APIs, APIs, APIs: when building an extension for a product like S/4HANA, in the end it is all about APIs and about extensions point, meaning points where you can hook into existing applications and processes.
In my previous blogs, I wrote about the tools that you can use for extending S/4HANA (see, for example https://blogs.sap.com/2015/09/30/the-key-user-extensibility-tools-of-s4-hana/). In this blog, I want to guide you through the tools where you can find the related APIs and extension points.
External (Web Service) APIs
External APIs (Web Service) are listed on the SAP API Hub. You can find them under https://api.sap.com/ -> API Packages -> SAP S/4HANA Cloud and SAP Hybris Marketing Cloud. These APIs can be used for integration and side-by-side extensibility for example on SAP Cloud Platform. For additional information, read also my blog on https://blogs.sap.com/2016/10/19/s4hana-extensibility-connect-sap-s4hana-cloud-sap-hana-cloud-platform-hcp/.
You can see here the screenshot with the list of S/4HANA APIs (40 at the time of writing this blog, but I expect that this number will rapidly increase)
CDS/VDM Views are the S/4HANA read APIs for in-app extensibility. You can use them
- to build new analytical apps (so-called cubes and queries, and on top of them analytical reports and KPIs)
- in custom code extensions (“BAdIs”)
- to build your own custom CDS views and expose these views as OData service as external API.
You can see all released CDS Views in the Custom CDS Views app. Start the app and the overview page will show all released views provided by SAP and the custom views created by you. The following screenshot shows the list of views (446 when writing this blog).
You can open the details screen a CDS view and inspect the view properties and you can also do a data preview in this app.
Apart from the signature and the data preview in the Custom CDS Views app, you can find also documentation on CDS/VDM Views in the S/4HANA documentation (https://help.sap.com -> SAP S/4HANA Cloud) -> Product Assistance -> Generic Information -> Analytics -> CDS Views).
What is CDS and VDM? In short, we can say that CDS is a technology, while VDM stands for the semantical model.
CDS (Core Data Services) is a key component of the SAP technology for levering qualities such as:
- Capture and share business-rich data models using the SAP HANA relational model
- Enrich the data models with specific semantics e.g. for UI, draft, analytics, search, actions and events. It’s also enabling the S/4HANA APIs
- Leverage SAP HANA optimally in most relevant scenarios
- Enable and standardize esp. zero downtime, verticalization, extensibility, access control (based on ABAP authority objects)
- Integration into ABAP programming model and improve development productivity
- Exposure of CDS models and data to SAP Cloud Platform, e.g. for Business Objects Cloud and extension apps
SAP Virtual Data Model (VDM) represents the simplified and harmonized business oriented semantically enriched data model. “Virtual” refers to the fact that the VDM semantical model may deviate from the historically grown persistent model of database tables to make it simpler and easier to understand. In SAP S/4HANA, the VDM is established by specifically classified/annotated CDS Views.
This is a short impression, the complete CDS/VDM story is a subject for a subsequent blog. To see the details of the complete model, you can use the View Browser, an app that shows an overview on all CDS/VDM Views.
Analytical Queries are the base objects for analytical UIs (KPIs and Reports). Technically they are also CDS/VDM View, but with a very specific semantics. You can see all released SAP Analytical Queries in the overview page of the Custom Analytical Queries app.
Business Contexts for Custom Fields and Logic
Business Contexts are SAP entities that can be extended by custom fields and/or custom logic. Typically, business contexts represent “business document tables” or “business object nodes”, Examples for extensible business contexts are: Billing Document, Billing Document Item, Billing Due List Item.
You can find the list of extensible business context in the Custom Fields and Logic app. For business contexts that support field extensibility, navigate to the Custom Fields tab, click “+”, and open the value help for the Business Context field.
For business context that are support code extensibility, navigate to the Custom Logic tab, click “+”, and open the value help for the Business Context field.
Class API can be used in custom logic as re-use methods. When writing this blog, there is no browser for class APIs available. You must go into the coding and use the code completion (cntrl + blank) to see the available class API together with its signature.
In total, there 70 APIs available at the time of writing this blog.
SAP has defined the API hub as the central place for publishing all external APIs. The publishig of APIs for S/4HANA has started, I exect more an more APIs appearing here.
For in-app extensibility, internal APIs (CDS views and classes) and extension points are used. A central tool for discovery is still missing, so for the time being you must use different tools when searching for APIs and extension points. This should be fixed by a central tool in the future. I will be happy to report on the discovery tool in a future blog once this is available.