Media Product Master in SAP S/4HANA: Interfaces for Integration with other Systems
Inbound and Outbound interfaces may be required for the integration with other systems, for example content management systems, rights and royalties’ systems, or master data governance. Different kinds of interfaces are available and you first should evaluate which interface is best for your specific use cases.
The OData Service API_PRODUCT_SRV exposes create, read, update and delete operations (CRUD) on product master data via the OData protocol. See help.sap.com → SAP S/4HANA → Master Data Integration for Product Master Data → OData Service for Product Master Data.
Custom fields can be added to the header node A_PRODUCT via the Custom Fields and Logic App. For each field, you need to enable usage oData extension model for Product API in the UI and Reports tab.
So far no similar OData Service is available for the classification data. This means for the time being you could use the BAPI mentioned below to create classification data. Similar BAPIs are available for the other operations within the same function group CLBPA.
Alternatively, you may choose to encapsulate the classification BAPIs in a custom OData service in the Gateway Service Builder, transaction SEGW. This way, you can use the same interface type to read and edit product master and its classification.
Business Application Programming Interfaces (BAPIs)
The mass-enabled BAPI_MATERIAL_SAVEREPLICA BAPI allows you to create or change Product Master Data. To create or change the media product master hierarchy, a separate BAPI BAPI_OBJCL_CREATE must be called to create / change the classification data.
You can find an example how to call these BAPIs and how to enhance BAPI_MATERIAL_SAVEREPLICA by custom fields in Media Product Master in SAP S/4HANA: Example for creation of Media Product Master using BAPIs.
You can also use the IDoc interface to exchange Media Product Master data with an external system. This requires an extension of the IDoc Interface. A generic description of how to enhance an IDoc type can be found here: help.sap.com → SAP NetWeaver 7.5 → IDoc Interface/ALE → Development → Structure, Documentation, and Definition of IDoc Types → Defining new IDoc Types → Enhancing an IDoc Type
Find below a short description of how to enhance the IDoc interface for inbound processing:
- Create a custom specific segment which contains the custom fields, at SAP Menu → Tools → ALE → ALE Development → IDoc → IDoc Type Development → Segments (WE31).
- Create a custom specific extension for the basic type MATMAS06 at SAP Menu → Tools → ALE → ALE Development → IDoc → IDoc Type Development → IDoc Type (WE30).
Add the segment created before as a subnode to E1MARAM. I suggest making this segment mandatory, because without MPM data it does not make sense to call this IDoc instead of standard Material IDoc (such as for standard materials). Maximum number must be 1, otherwise the system cannot interpret imported data.
- Assign Message Type to Basic Type and Extension at SAP Menu → Tools → ALE → ALE Development → IDoc → IDoc Type Development → IDoc Type for Message (WE82). Create a new entry for Message Type MATMAS, Basic Type MATMAS06 and the Extension created in the previous step.
- If you have not created an enhancement project which you can use in the next step, you need to create one through SAP Menu → Tools → ABAP Workbench → Utilities → Extensions → Project Management.
- Assign enhancement MGV00001 to your enhancement project and implement component EXIT_SAPLMV02_002 within the include in customer namespace. Within the implementation, don’t forget to add the case clause for f_cust_segment-segnam to ensure your coding is only processed if it contains the value of the segment you have created in step 1.
- Finally, don’t forget to activate the project.
After processing of an IDoc of type MATMAS06 with your enhancement, you also need to process the IDoc of message type CLFMAS with object table MARA to create the classification data.