When we were implementing SAP MDG-F Cost center and Profit center , our requirement was to import all the Cost centers and Profit centers from the ERP system that were valid right from the year 2005. Based on the business processes and existing data, we identified that we had to create one edition per month in the MDG system. That meant we had to create 120 editions to import the current data into MDG system.
Now , a How-To Video is already available showing how to create an edition manually.But as we had to create 120 editions , the manual process looked little tedious and time consuming , so we decided to automate this process.
During our analysis , we found a utility class called CL_USMD_EDITION_API. I couldn’t find any detailed documentation regarding this and so I decided to blog about this API.
This a very useful API with methods for almost all the edition relevant operations.
Method CREATE_EDITION is what we were looking for the automatic creation of Editions.
We created a small file upload program and used method CREATE_EDITION within this program to upload 120 editions and the process took just seconds 🙂
This class contains lot of other useful methods for e.g. GET_EDITIONS_OF_ENTITY that determines the editions where the current object was
changed and GET_VALID_EDITIONS which determines a list of editions for a given object which
can be used to create a change request for this object.
The above two are just examples and there are many other useful methods
If you would like to perform various edition relevant operations programmatically , be sure to check this class.