How do you use the Class-Based version of MDM4A?
For all class-based access to MDM4A you only interact with the object CL_MDM_GENERIC_API. Internally the Abstract Provider will be instantiated with the release specific provider. All access to the functionality of MDM4A is done through the instances of the main group of Interfaces exposed by the Generic API
The object CL_MDM_GENERIC_API has attributes that hold object references to the 5 major parts of the API:
IF_MDM_ACCESSOR
This interface controls the opening and closing of a connection to a repository.
For many of the other API Methods, you must first have created a connection to a repository via this interface.
IF_MDM_ADMIN
This interface provides access to Admin functions similar to those available via the MDM Console. It includes User (creation, password set, role maintenance) and Repository (Mount or Load Repositories) Administration.
The IF_MDM_ADMIN interface poses an interesting situation. Many of the functions here could be automated and then batch scheduled using the local ABAP Scheduler or the Netweaver Central Scheduler by Redwood. It would also be quite easy to use IF_MDM_ADMIN to batch create users (based upon their existence or role assignment in AS-ABAP) for the MDM Server.
IF_MDM_API_CONFIG
This interface allows you to read the configuration entries from Transaction MDMAPIC for one repository or all of them at once. See the Data Dictionary structures MDM_REPOSITORY, MDM_CONNECTION, MDM_DBMS, and MDM_PROVIDER for the data supplied by this Interface.
IF_MDM_CORE_SERVICES
This is the main interface to directly manipulate the data within a repository.
It includes Check In/Out, Client System Keys, Update, Delete, Creation, and Query of data.
Many of the Core Services have a second method that ends in _SIMPLE. For instance there is UPDATE and UPDATE_SIMPLE. The "Simple" methods accept data dictionary structures that match the format of the repository table that you want to manipulate. This provides an easier interface into the API but requires the creation of a matching structure in the ABAP Data Dictionary.
The field names in the ABAP Data Dictionary Structure must be the same as the Name in the MDM Repository (case-sensitive). You are also restricted to only using the MDM API Data Types. Keep in mind that in ABAP there is no NULL state for a value. Any NULL value from MDM will be returned through the simple data types using the initial value for the underlying Data Dictionary Domain. Use of the specific methods instead of the SIMPLE ones will avoid this issue.
IF_MDM_META
This interface provides methods that allow you to change the metadata of a repository. Many of these methods require that the repository be unloaded before they can be performed.