Master Data Governance Application Programming Interface Guide

Depending on the software release, MDG offers different APIs for consumption with different functional scopes. This guide describes the Application Programming Interfaces for each release. Download the Document

PUBLICMDG Application Framework API GuideApplicable releases:SAP MDG 9.1 and aboveVersion: 3.0Date: 12/2025Owner: PCP Master Data Governance
Document HistoryDocument Version Description2.0 Version from 7. June 20162.1 Update template3.0 Formatting, Code adjustments© 2025 SAP SE or an SAP affiliate company. All rights reserved. See Legal Notice on https://www.sap.com/legal-notice for use terms, disclaimers, disclosures, or restrictions related to this material. 2 / 27
Table of Contents1. MDG Application Framework APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.1. API Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2. Main Purposes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3. Availability and Function Scopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.4. Architectural Perspective. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62. Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1. Limitation with Respect to the Functional Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2. Limitations with Respect to the Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.3. Limitations with Respect to the Number of Change Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4. Limitations with Respect to the Parallel Usage of the APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.5. Limitations with Respect to the Caller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.6. Limitations with Respect to Business Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.7. Other Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83. Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.1. Change Request API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.2. External Model API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.3. Governance API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.4. Convenience API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.5. CL_USMD_APP_CONTEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114. Data Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.1. Introduction to the MDG Master Data Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.2. Reading Entity Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.3. Changing Entity Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.4. Authorization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175. Simple Guide for Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.1. Sequence Diagram for Convenience API Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.2. Code Example – Create Airline (with governance API) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185.3. Code Example – Change Flight Connection (with governance API) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226. Additional Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266.1. Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26© 2025 SAP SE or an SAP affiliate company. All rights reserved. See Legal Notice on https://www.sap.com/legal-notice for use terms, disclaimers, disclosures, or restrictions related to this material. 3 / 27
1. MDG Application Framework APIs1.1. API OverviewThe MDG framework provides several interfaces that are used by the delivered SAP MDG applications andalso can be used by other external applications (like customer applications) in order to handle the governance process and the related entity data. These are the interfaces:Table 1. Table 1: API OverviewAPI Interface Implementing ClassChange Request API IF_USMD_CREQUEST_API CL_USMD_CREQUEST_APIExternal Model API IF_USMD_MODEL_EXT CL_USMD_MODEL_EXTGovernance API IF_USMD_GOV_API CL_USMD_GOV_APIConvenience API IF_USMD_CONV_SOM_GOV_API CL_USMD_CONV_SOM_GOV_APIContext API IF_USMD_APP_CONTEXT CL_USMD_APP_CONTEXT1.2. Main PurposesThe different APIs have different purposes which are described in the following table:Table 2. Table 2: Main purposes of the relevant APIsAPI Main PurposeChange Request API Handling of change requests and partly changing and reading entity dataExternal Model API Reading entity dataGovernance API Handling of (several) change requests and entity dataConvenience API As the Governance API but using a single change requestContext API Store and provide process context dataOriginally, only the Change Request API and the External Model API existed. The Change Request API provides the possibility to fully control the governance process and the life cycle of a change request. Thisincludes the possibilities to create, save, activate or reject a change request, to modify its object list as well asto read and change entity data.The External Model API was provided to enable extended possibilities to read entity data.Since the Change Request API and the External Model API turned out to be quite complex to use from thecaller perspective, it was decided to provide a new (Governance) API. The focus of the Governance API is, toprovide a single API with full functional scope concerning the coverage of the governance process using workflows (change request handling) and the correlated handling of the entity data. Furthermore, this API wasdesigned to stay as simple as possible by hiding several automatic steps. It still needs to fulfill all new requirements arising from the different MDG applications.The Convenience API was developed in parallel to the Governance API. This API is on top of the GovernanceAPI with the focus of being even simpler to use. This improved simplicity is reached by reducing its scope tothe handling of a single change request. Its main purpose is to be used for single object maintenance UIswhere its usage is restricted not only to use a single change request but also to change a single object only aswell.Later it was discovered that lower architectural levels sometimes need access to some process relevant data.To enable this, the (Application) Context API was developed.© 2025 SAP SE or an SAP affiliate company. All rights reserved. See Legal Notice on https://www.sap.com/legal-notice for use terms, disclaimers, disclosures, or restrictions related to this material. 4 / 27
1.3. Availability and Function ScopesThe existence of the different APIs and their functional scope depends on the MDG release. The following isvalid independent of the underlying system being an ERP or SAP S/4 HANA On-Premise system.In EhP5 only the Change Request API and the External Model API existed. Both APIs can still be used in thelater MDG releases. Whereas the External Model API always was kept up to date with new developments, thedevelopment of the Change Request API was stopped in EhP6. However, with respect to change request handling the Change Request API offers some functions that are not covered by any other API. This includes thepossibility to move objects between different change requests, to split one change request including to moveobjects to the new change request, and to create a change request using another change request as a template.In EhP6 the Convenience API and the Governance API were introduced and their functional scopes were further extended from release to release. Most of these developments were done to fulfill new requirementscoming from the later MDG applications.The External Model API is fully up to date in each MDG release. The following table provides a rough overviewof the situation.Table 3. Table 3: Functional Scopes of the relevant APIs in dependency to the MDG releaseMDG Release Description Functional ScopeEhP 5 Change Request API Programming interface for CR Processing. One Instance perchange request. Administration of change request object list byconsumer.External model API Reading entity and hierarchy data.EhP 6 Change Request API No further development.Governance API Programming interface for governance process. Multiple CR processing within one instance for one model. Limited use for models using editions.Convenience API Programming interface for governance process optimized forsingle object processing and single object processing UIs. Nosupport for models using editions.Context API Programming interface consumed mainly by convenience API.Stores and calculates context data.External model API Reading entity and hierarchy data.MDG 6.1 Change Request API No further development.Governance API Support of foreign key entities.Convenience API Support of foreign key entities.Context API No further development.External model API Reading entity and hierarchy data.MDG 7.0 Change Request API No further development.Governance API Support of new edition management and parallel changerequestsConvenience API Support of new edition management, parallel change requestsand highlighting changesContext API Support of new edition management and parallel changerequestsExternal model API Support of new edition management and parallel changerequests© 2025 SAP SE or an SAP affiliate company. All rights reserved. See Legal Notice on https://www.sap.com/legal-notice for use terms, disclaimers, disclosures, or restrictions related to this material. 5 / 27