OpenAPI: How do I get data from Analytical, Procurement, and Sourcing Reporting API?
How do I get data from Analytical, Procurement, and Sourcing Reporting API?
Prerequisites:
- Register on SAP Ariba developer portal where your realm(s) resides
- Create an APP for the specific Reporting API (Analytical, Procurement, and Sourcing)
- Have the APP approved and enabled on the specific realm you choose during step 2
- Have the ability to obtain secret key (Either by right as administrator of the organization or request the key from administrator of the organization)
- Ability to generate the secret key to generate Access Token
Summary of the Reporting API Flow:
The only way to generate data is by using viewTemplate.
The viewTemplate can be either out of the box template or a custom template you created(via template management API).
The reporting data can be requested as either Synchronous(immediate - paginated result) or Asynchronous(job submission - zipped file result).
Details of the Reporting API structures:
- Getting the Metadata
Metadata API end point will return all available select fields and filter fields for documentTypes available from reporting API.
Using the metadata, custom viewTemplate/s can be created via viewTemplate management API end points.
Metadata should also be used to replicate data as it consists of the data type, length, and description. - ViewTemplate management
Out of the box viewTemplates are provided and custom viewTemplate/s can be created specifically for each documentType.
The requirement for custom viewTemplate is the documentType, selectFields, and filterFields.
Only 1 documentType can be specified per viewTemplate.
Once created, custom viewTemplate can be patched, changing the select fields, and filter fields, but it can't be changed for different documentType or deleted.
Custom fields should also be added to the viewTemplate, by adding the custom fields in the select fields definition.
Out of the box viewTemplates does not have custom fields as it is unique to each realm. You must add the custom field/s to your custom viewTemplate, either during creation or by patching the viewTemplate. - Getting the report data
Utilizing the viewTemplate, a Synchronous call can be made to bring back the data in pagination or an Asynchronous Job can be submitted and once completed, the data can be downloaded in zipped file(s) format.
Glossary:
DocumentType: Cluster root database object. On Analytical Reporting, these are the Facts and Dimensions. Procurement Reporting: Invoice, Receipt, Requisition, etc. Sourcing Reporting: Task, RFXDocument, Organization, etc.
viewTemplate: Similar to database view, it consists of 3 components: DocumentType, Select Fields, and Filter Fields.
Metadata: Complete details of available documentType(s) along with its Select Fields and Filter Fields.
Reporting Job: Asynchronous request to get data on specific reporting viewTemplate. Job can have various state (Pending, Running, Completed, and Error).
System viewTemplate: Generic, out of the box viewTemplate. Available for immediate use for all realms.
Custom viewTemplate: Specific viewTemplate for specific realm, must be created by customer and only available for specified realm.
For more detailed instructions, from the Developer portal, click Help > Product Documentation
Analytical Reporting API for Strategic Procurement and Operational Procurement
SAP Ariba Operational Reporting API for Procurement
SAP Ariba Operational Reporting API for Sourcing
Creating Analytical Reports
Analytical - Reporting Fact reference
Ariba Connect
Purchasing
Spend Visibility
Strategic Sourcing
Supplier Information & Performance Management
Supplier Lifecycle & Performance