Skip to Content

Implement Service Master in SAP Sourcing / CLM

Implement Service Master in SAP Sourcing / CLM Including Integration with SAP ERP

While most companies have a good overview of their direct spending, and have processes in place to drive efficiency and compliance, they tend to lack the same oversight for indirect spending. Depending on the industry, services can account for less than 50% and up to 90% (financial sector) of indirect spending. It also depends on the industry and how important it is to have the ability to structure services including support of a service master. In a SAP ERP system SAP External Service Management (MM-SRV) is an application component of SAP MM (Material Management) which supports the complete cycle of purchase requisition, order placement, acceptance of services, contract management as well as the invoice verification process.

While SAP Sourcing/CLM provides integration with SAP MM, it has less support for services. SAP Sourcing/CLM 9.0 allows to distinguish between materials and services, but it lacks support of a service master. While this is an item in the SAP Sourcing/CLM backlog bucket, it is currently not available. However, I will present one possible solution that will allow customers to solve this gap without too much overhead. Note that there are some limitations and restrictions to this workaround. These will be addressed later in this post.

Create Service Master in Sourcing

Here, we’ll use the existing material master in SAP Sourcing as the service master. To distinguish between the material and service master, add an extension field Is_Service of type Boolean.

Sourcing Service Master.jpg

Generally, the IDoc MATMAS05 is used to send materials from SAP ERP through PI to SAP Sourcing. The same kind of IDoc for services is called SRVMAS01. To enable the transfer of a service master to PI,you must perform the same  configuration tasks that were done for materials, like adding SRVMAS to the Distribution Model (transaction BD64), Partner Profile (WE20), and so on. Next, adjust the PI configuration to create the Operation Mappings, Message Mappings, Service Interface, etc. similar to how it is for the ERP Material to ES Material, and making sure the extension field Is_Service is set to TRUE for the service master.

Use Service Master in Documents

Although adding a service master to a document might already work, some additional work is required to improve usability. First, start by changing the default value of the Add Material button to Add Material/Service. Search for the Localized Resource and enter the text at the field Value Override. When a user clicks Add Material/Service in an RFx or Master Agreement, the standard queries can be adjusted so that they do not show data where Is_Service is TRUE. Additionally, create a new query called All Services (add further queries as required for your specific business needs) for our services master. Do not forget to assign the new query to the Query Group for material selection.

Adjust add material button text.jpg

adjust query to include All Services.jpg

SAP Sourcing distinguishes between materials and services; for example different price conditions are selected similar like in SAP ERP. Through scripting it is possible to change the item type from Material to Service in the case where a service master is added. Afterwards the application will automatically display the service price condition(s) instead of the typical PB00 condition for materials. Lastly, change (in page customization) the label from * Material to * Service in the item details.

Add service master item final with highlighting.jpg

Enable Integration with SAP ERP

SAP ERP handles services differently than materials. In the item overview, there is only an item of type D (“D” for the German word for Service: Dienstleistung) with a description and an optional plant. You can configure the unit of measure for this item. The default setting is 1 AU (Activity Unit). The price is calculated from the service item(s). Each item (of type D) can have one or many services underneath it, which can have a service master or a free text description, quantity with uom, and a price (one or multiple price conditions).

This concept allows you to group items together, for example the same kind of services could be part of multiple items, but with different prices depending if it is during normal operational hours, or during the night or weekend.

ERP OA item overview.jpg

ERP OA service items.jpg

The ERP interface itself already supports a service master (used for the SAP SRM to ERP integration). The Line Item Group concept in SAP Sourcing can be used for grouping of services, which might not be ideal from a usability point of view, but requires only limited changes. As the line item group description(s) is not by default part of the XML message sent to PI, some additional work is required to get this information to PI and then map the data accordingly to create the follow-on document in SAP ERP. Note that information about the service master data ID gets mapped in PI to ensure the SAP ERP Outline Agreement has this information as well.

Things to Consider

As mentioned earlier, this solution has some limitations. For example it is designed on top of SAP Sourcing/CLM 9.0, because only this release provides an Item Type to distinguish between Material and Service. Release 9 is currently in “Ramp-up” mode and expected to be generally available in October 2012. It is already available for OnDemand customers).

Using the existing (Sourcing) Material Master for the Service Master could be a limitation, but it reduces the effort. In case additional data is required the material master might require further extension fields.

Services themselves in ERP have no associated plant; only the item (item type D) with the description can have a plant. On the other hand, in SAP Sourcing each item can have a plant which can be confusing for end users. For example, in the case multiple service items that are used in a single line item group that have their own individual plants, which one should be used? This requires some end user training to use only the same plant within a line item group for services.

Lastly, I think it is important to have the right resource(s) available to implement this as detailed knowledge of several areas like SAP ERP, PI, Sourcing and scripting is required. Please let me know what you think about this concept. Have you already done an implementation of service master in a lower release? Feel free to add some comments or contact me directly at

You must be Logged on to comment or reply to a post.
  • Hi Markus Frieske thanks for stepping in and providing this much awaited work-around, and a vision for having this incorporated in the product in the future.

    This has been a pressing need from almost all the customers, where I’ve positioned and implemented SAP CLM as a role player for being an Enterprisewide Contract Management system

    This workaround, seems to be bringing in so much of Service Contractual spend under the folds of the Legal Contract, that can now seem more meaningful before replicating back to ECC to help with Contract Compliance and for someone to do a quick check before processing Service Entry sheets

    I rate this as one of the paradigm shift work-arounds to manage the Service Master in SAP CLM

    Thanks for bringing this out



  • Hi Markus,

    We are using the same approach in our implementation project. we are almost done with the developments but honestly we are keeping our fingures cross but after reading your blog I am confident that this approach will surely work.

    Thanks for the blog.



    • Hello Oscar,

      good question. There are different kind of packages for Sourcing OnDemand, e.g. you need the Premium for integration. Further SAP distinguishes between public and private. Without knowing the last level of details I know that colleagues always recommend the private version in case extension and enhancements are planned. With a private instance of SAP Sourcing I would expect that this concept should work, but I am not aware that somebody tried it out to be sure.

      best regards


    • Hello Celeste,

      the concept above is intended for Wave 9 and a couple of things are specific for Wave 9 (e.g. the field item type was introduced in Wave 8). Nevertheless other parts of this concept like extending the material master by an extension field are release independent. I know from consultants that they had intension to implement a similar concept in 5.0 or 5.1 (intension as I am not sure if they did it). You might skip a few things, but have to adjust some other parts to Wave 7.


      • Markus, finally our customer choose to implement CLM 9.0, could you please confirm if by implementing this workaround it would be possible to support service hierarchy in the CLM/ERP integration !? Our need is to create a Contract in CLM and transfer to ERP with the structure.

        Item 010

        service line 9000

        service line 9001

        service line 9007

        Item 020

        service line 10000

        service line 10001

        service line 9007


        Thank you !!!

        • Hello Celeste,

          the described concepts allows you to group items together. In ERP an item of type D (Service) can have one or multiple items and it is possible to implement it.

          best regards


  • Hi Markus,

    Joining this discussion a bit late but wanted to thank you for sharing your approach to replicate Services in CLM. We are on CLM 9.0 SP06.

    We implemented this solution recently and the services are getting replicated to CLM. The only issue arises when we try to transfer the Master Agreement to SRM. The error returned by SRM specifies that it cannot recognize the item with type Service. I am sure its a SRM configuration issue which should be resolved.

    Great post once again and it really helped throw some light on this unexplored concept.



  • Hi Markus,

    I know this treat is a little bit old but wondering if with new SRM 7.0 SP x would be possible to use service master data w/o limitations (or with less) especially because we are in Brazil and localization aspects are very sensitive.

    I’d appreciate any information.

    Erico Basilio

  • Markus,

    I’m trying to integrate Services Master Data – send them from ERP to Sourcing through SAP PI.

    During message mapping IDOC (SRVMAS01) -> File (Material.xml) where can I find in target structure of the file, field Is_Service which you said should be mapped with true ?

    I can’t see in my file structure any extension segments neither.



    • Hi TG,

          This is all custom, meaning you have to

      1. Create extension field ‘is_service’ in SAP Sourcing first

      2. Change the message type in PI to include this field (is_service)

      3. If Service IDOC then set this field (is_service) in PI.

      Hope this clarifies..


      • Hi!

        Prasad, thanks a lot for your reply,

        Just to be 100% sure,

        As I understand, the standard data type in SAP PI (DT_Material_Header_Fields) structure should be manually extended with new field is_service of type boolean, then mapped with ‘true’. Is that right?

        Also, target field in file structure (EXTERNAL_ID) where MATNR was propagated in case of MATMAS, here should be mapped with ASNUM etc… ?



        • TG,

             You would do this just on the MT_Material message type (SAP Sourcing interface). Create a new field like ‘is_replicated’ just below that and call it ‘is_service’. and since you will be creating new mappings from service IDOC you can always set it to ‘TRUE’. Yes the external ID will be mapped to the Service master ID.. etc..



  • Hi Markus,

    Great post!  We have Sourcing 9 SP19 and we are trying to implement a solution where CLM publish to ERP Services (Ds) with multimple Service Specifications.  I just have a some questions about your comment “…As the line item group description(s) is not by default part of the XML message sent to PI, some additional work is required to get this information to PI …”.  My questions are: a) is this additional work in CLM or in PI?; and b) if it’s from CLM, what type of configuration/scripting/customization are you refering to?; and c) do you know if there are new features on version 9 SP19 that may facilitate this integration?

    Thanks in advance for your answer,


  • Hi Markus,

    Thanks for the great post.

    We are trying to implement the Service Master data in Sourcing 10.0.

    Configured everything what is there in post, challenge facing in changing the item type from “Material” to “Service”,

    Written code for it, code has no error:

    But system is throwing some standard error

    “You are not allowed to change the item type of selected document type: Material.”

    Can you please help us on this , why it is not allowing us to change the item type to Service.

    Any leads would be of great help!!



    • This is an old post and Markus is no Longer with SAP. However, when do you get the error  is it at the time of Line item Creation ?. If so there should already be an Item type of Service available in Sourcing 10.0 as a standard item type ?


      • Hi Prasad,

        Thanks for replying.

        Yeah we are getting the error on adding line item which is of type Service.

        Actually we have written code like if in line item “Is_Service” is checked item type should get changed to “Service”.

        And we are trying to do it in Standard Master Agreement type.

        Is there any configuration that needs to be changed in MA type to allow the item type to Service?



          • Hi Prasad,

            I have gone through the link, we are maintaining same configuration.

            Also maintained system property as Devesh suggested.

            Can you please help us why still it is not allowing us to change the type?

            Thanks in Advance!!



        • Hi Geetika and Prasad,

          You have to set enable.item.category System Property to True. This will allow you to change the item type.

          Let me know how it goes.



          • Hi Devesh,

            Thanks for your inputs.

            Added the system property , still it’s not allowing to change the type.


            Any leads would be of great help!!



          • Geethika, Have you tried teh following

            The scripting logic to set the Item Type to Service has to be executed upon Save (Validation event) and all line items that have a Material Master selected with extension like IS_Sevice = TRUE can then be changed to Item Type Service… i.e., the UI will only show Item Type = Service after the Save when the script executes.

            Please try that and let us know..


          • Hi Prasad,

            Thanks for replying.

            Yeah i have written script on Validate event. Done logging getting the correct values.

            ma_line_items = doc.getLineItems() ;

            mchl_LogIt(“line item size”+ma_line_items.size());

            iter = ma_line_items.iterator();


                lineTypeEnum = new LineItemTypeEnumType(LineItemTypeEnumType.SERVICE);

            mchl_LogIt(“line type enum”+lineTypeEnum);



                 line_item =;


                 mat_obj = line_item.getMaterialObjRef();

              matHomeBean=IBeanHomeLocator.lookup(session, mat_obj).find(mat_obj);

              if(hasValue(matHomeBean)&& matHomeBean.getExtensionField(“Z_Is_Service”).get()){

              // throw new ApplicationException(“test”+matHomeBean);




            Also in the db below line is displaying the service value, but on ui it’s not reflecting.


            Below is the error i am getting.


            This is the standard error, if we can figure out why this check have been put we can resolve this.

            Any leads would be of great help!



          • Hi Prasad,

            Can you please help us on this.

            I have raised he OSS for same but sap denied saying  this is customization we can’t help you on this.

            Also the above script is working fine in version 9, in 10.0 it;s creating an issue.

            Any leads would be of great help.



          • Hi Geetika,

                Yes we are aware of this and investigating. Please resend the OSS message(referrinf to this discussion) and we will keep you posted..



          • HI Prasad,

            Looking for your support on this.

            Request you to please help us . We are not able to deliver service master due to this.

            Thanks in Advance:)



  • Can anyone explain how you handled the mapping. Currently we have this working but have manipulated the lines in the bapi user exits. This works fine for those contracts without account assignments but it is causing failure when we re-publish only those with account assignments. I would like to change the mapping to see if this eliminates the issue.

    Did you use a UDF or just change the mapping?