Learn the steps to build the integration between maintenance activities and production planning/detailed scheduling in SAP Advanced Planning & Optimization. See how integration between these areas and departments creates more visibility over common processes to help alert planners to possible downtimes and lack of materials.
Key Concept
Many companies rely on SAP Production Planning (PP) for the production planning process while they use SAP Plant Maintenance (PM) for maintenance activities. With PP, companies can manage the manufacturing processes from planning to execution, integrating those processes with other areas such as sales and distribution and purchasing and controlling. PM covers a company’s maintenance requirements through activities such as inspection and preventive and corrective maintenance.
With the release of SAP SCM 4.1 in 2005, SAP delivered a new and interesting functionality: the integration of maintenance orders in SAP SCM. Before this release, production planners using SAP Advanced Planning & Optimization (APO) were not able to get the information related to maintenance activities in the system. Now you can easily display maintenance orders in SAP APO. That means you can coordinate both production and maintenance areas, and manage products used by maintenance personnel and consumed by production operations.
For instance, often shared materials used in maintenance orders were not reflected in the replenishment plan. Materials not reflected in the replenishment plan can cause big problems for planners. If production starts, the plant won’t have the required components to finish the item, and this could cause a halt in the work center. For example, suppose the maintenance team has consumed a box of screws needed to complete a product, but this is not reflected in the replenishment plan. The production line has to be stopped and kept waiting until new screws arrive. A plan reflecting shared materials could have given the planner time to re-plan the production for those days, such as moving production to an alternative resource, anticipating the production orders, or subcontracting the operation. Instead, time is lost.
My integrated scenario involves three areas: Production Planning (PP) and Plant Maintenance (PM) in SAP ERP, as well as SAP APO, which contains the production planning and scheduling tools. I will explain in the following steps how to integrate PP and PM as well as cover the main points to consider when integrating the maintenance and production activities with SAP SCM, including some explanations about settings of PP and PM that are not commonly used.
Note
For further information refer to the SAP help center, https://help.sap.com. Follow menu path SCM > APO > Master Data > Resource > Create and Changing resources > Tab pages in Resource Maintenance > Downtime. To implement this functionality, I recommend reading these SAP Notes for a better understanding of this process:
- 550330 Consulting note about APO resources
- 764778 PM Integration with SCM 4.1 - Restrictions
- 872607 Report for transferring maintenance orders
- 874516 Downtime is not set in confirmed dates
Linking Both Worlds: Maintenance and Production in SAP ERP
Step 1. Link the production and maintenance master data objects. Both PM and PP are fairly similar from a technical point of view, but differ in areas such as master data structure, the planning process, and some elements of the order. For example, a machine or group of productive elements is referred to as a work center (productive resource) in SAP PP, while in SAP PM a work center means equipment and functional locations. If an employee operates three pumps, you can define all three as one work center in PP because they work together and you don’t need more details. However, from a maintenance point of view, they are three separate elements — pump1, pump2, and pump3 — because you need to manage each of them individually. When you want to build the connection between the PP and PM master data objects, the relationship takes place in the PM side in the equipment and functional location master data.
To build this integration, you need to maintain the functional location. Follow menu path Logistics > Plant maintenance > Management of Technical Objects > Functional Location > Create or use SAP ERP transaction IL01. In the Location tab ( Figure 1), the Work center field represents the link. In my example, the functional location ZAMF-OC1 represents the production work center ZAMFRES1 fully (1:1). But in complex installations a functional location could represent partially (1:n) the work center (part of this resource). In Figure 1, the Work center is assigned to only one functional location.

Figure 1
Link between functional location and production object through the Work center field
You also need to manually link the equipment to the production resource using transaction IE01 if you are creating the object, or IE02 if you are changing it. You can also following the path Logistics > Plant maintenance > Management of Technical Objects > Equipment > Create or Change (Figure 2). In my example, notice that ZAMFRES1 has changed to ZAMFRES2. They are different work centers and are represented, from a maintenance point of view, by different objects. The first work center, ZAMFRES1, is represented by a functional location and the second one, ZAMFRES2, by equipment.
The process integration doesn’t rely only on the system processes. However, at this point, it’s important to underline the close collaboration of the production and maintenance implementation teams to align and simplify this scenario, especially the master data structure.

Figure 2
Link between equipment and work center
Step 2. Move maintenance information into SAP SCM. Moving maintenance information happens with the help of the maintenance order. The maintenance order is the main transactional object in SAP PM. It contains all the information required for maintenance activities such as elements affected, estimated times, operations, materials needed, and costing information. The system can create these orders automatically from preventive plans or you can create them manually by following menu path Logistics > Plant maintenance > Maintenance Processing > Order > Create or by using transaction IW31. In my example, I created a special maintenance order type (ZAM1 copied from the standard PM01) that allows for filtering the orders to be sent to SAP APO later. It can help the companies to decide which orders are sent to APO or not. For instance, I can create a special type for some special orders that I don’t want to be transferred to APO.
At this point, you need to inform the planning or production department that a particular maintenance order affects or halts the regular activities of the resource involved (equipment ZAMFEQUIP1 shown in Figure 3). The system condition field (SystCond. in Figure 3) or operating Conditions in the Header Data of the Maintenance Order determine and inform other users whether the operation must be carried out in production or when the system should shut down, for example. When you set this field to 0 (not in operation), it triggers the integration of the PM order into APO and therefore, the planner using SAP APO is informed about it.

Figure 3
Header data in a SAP PM order
If you need to define special system conditions by adding new indicators (such as Not In Operation, Test, In Operation, Partial Operation, or Manual Operation), follow menu path IMG > Plant Maintenance and Customer Service > Maintenance and Service Orders > General Data > Create System Conditions and Operation conditions. Figure 4 shows the operations the maintenance order requires with the information about the dates and duration of the maintenance operations. Those dates are automatically transferred to SAP APO via the CIF (as explained in step 3).

Figure 4
Operations information in a PM order
Step 3. Define the communication channel. By now you’ve created the master data in SAP ERP and the maintenance order has a system condition (to inform how the maintenance order affects the equipment) with the capacity reservation required. Now you need to define the communication channel so you can establish the data flow for the maintenance orders from SAP ERP to SAP SCM. The Core Interface (CIF) is responsible for sending most of the data interchanged between SAP ERP and SAP SCM with the help of the integration models. Those models define the channel where the data flows between both systems. Therefore, the integration model contains the SAP ERP objects, master data, and transactional data to be sent to SAP SCM.
To create the integration models, select the objects to send to SAP APO and then define the filters in/out (Figure 5). The left side shows some of the objects that you can integrate into SAP APO, such as Customers, Vendors, and maintenance orders. The right side has the standard filters for the maintenance order, such as: Order Type and Plant. You can filter in/out the maintenance order for plant A or B. When you select one object and click the arrow icon, you get the standard filters that you can add, such as equipment affected. When you add a new element, it must be included in the filter to be sent to SAP SCM. For instance, if the equipment starts with EQUIPnn where nn is the number of the equipment (such as EQUIP1, EQUIPA, or EQUIP345), you could create a new integration model by filtering for EQUIP*.
In this case, the main criterion to filter the maintenance orders in/out depends on the type of maintenance orders and plant as shown in Figure 5 (use transaction CFM1 to access this screen). For instance, I set the maintenance order (Maint. Order) on the left side of the screen, and then I filter in the orders with the Order type ZAM* and Plant 1000 on the right side of the screen. When you activate this integration model, all maintenance orders set to this criterion transfer to SAP APO. In my example, I sent all the maintenance orders corresponding to the types starting with ZAM* in plant 1000 to SAP SCM.

Figure 5
Send data to SAP APO: integration model
Note
The Business Add-In (BAdI) /SAPAPO/MNT_INBOUND for Maintenance Order Integration in SAP APO can program new custom transfer logic in this case. For example, you can create downtimes for each activity rather than downtimes for orders.
Step 4. Review the integration. Once you’ve transferred the maintenance order into SAP APO, you can review it via transaction order processing by following menu path APO > Production planning > Interactive Production planning > Order Processing or using transaction /SAPAPO/RRP2 (Figure 7). This is an SAP APO transaction in which you can see the order data such as components, what item is produced, operations, or dates. This SAP APO information should be identical to the PM order information in SAP ERP. There is one limitation, however. You cannot change these orders in SAP SCM because they are transferred as fixed. This means that you cannot plan or schedule them in SAP SCM. It’s a SAP limitation and so far there is no way to avoid it.

Figure 7
PM order in SAP SCM
When you set the Sys Status to technical complete (refer to Figure 3 for the field) in the PM order in SAP ERP, the system deletes the maintenance order in SAP APO. When the technicians end their work and set the completion status in the order, the change shows up in SAP APO as well.
The Concept of Downtime
Resource downtime in SAP APO refers to a period of inactivity or interruption of a resource (machine, groups of people, transportation, and so on). In this context, SAP APO downtime can be defined as the translation of the SAP ERP maintenance order to planning and scheduling terms (how a planning system, such as SAP SCM, treats the maintenance order). You can manually create downtime by following menu path APO > Master Data > Resource > Resource or using transaction /SAPAPO/RES01. Figure 8 shows two manual types of interruptions: Planned Downtime and Resource is Inactive.You can also automatically create a downtime from a maintenance order. In SAP APO you can create simulation versions where you can simulate different scenarios.
By clicking the Downtimes button in Process Order transaction (in Figure 7), you can see the corresponding downtimes created from the previous maintenance order. As depicted, it corresponds to a PM order type. Additionally, you can create new downtimes (such as work center halts) for simulations or other kinds of unavailable periods not defined by your maintenance team. These simulations can help you learn how to deal with unexpected problems.

Figure 8
APO resource with downtime generated from SAP PM order
The Difference Between Work Center and Resource
When comparing both systems (SAP SCM and SAP ERP), I want to call your attention to the different names : work center in SAP ERP and resource in SAP SCM. They are similar, but not the same. One work center in SAP ERP can have several capacities such as labor or machine. When it’s transferred to SAP APO, the system creates one resource for each capacity. These resources, coming from one work center, are linked by the system. This is the standard behavior when transferring from SAP ERP to SAP APO. The system adds a prefix W and a suffix with the plant identification and the capacity code. For example: a work center called ADOLFO1 created in the plant 1000 in SAP ERP is renamed automatically to WADOLFO1_1000_001. In case you have a pool capacity (a group of resources shared by several work centers), it does not add the prefix.
This naming convention can be easily changed with the SAP APO BAdI /SAPAPO/CRESCIF (CIF transfer resources). The BAdI includes a simple example defining a unique name for a resource by appending the logical system (source system) to the resource name. SAP Note 674838 “Resource transfer from APO Release 4.0” provides more information about this topic.
Planning and Scheduling Process
Now it is time to see how these downtimes affect the planning result. I recommend using the Detailed Scheduling Planning Board (Figure 9) because it graphically shows the current situation in the shop floor. Follow menu path APO > Production Planning > Interactive Productive Planning > Detailed Scheduling > DS Planning Board – Variable View or use transaction /SAPAPO/CDPS0. Downtimes appear as a fixed dark gray box that represents the time period in which you cannot schedule a production operation. Note that the downtime also affects automatic processes such material requirements planning (MRP) execution in SAP APO. Thus, the system does not schedule any operation in this inactive period.

Figure 9
Detailed Scheduling Planning Board in which downtime is represented by a gray box between 24.11.2008 and 27.11.2008
The capacity reservation caused by the downtime takes effect in the supply network planning (SNP) view as well. That is, the bucket capacity (daily, weekly, or monthly) of the resource shows a reduction where the PM order exists.
Production Planning Integration
Throughout this article I described how the resources in the maintenance and production areas share a unique vision. However, as a part of this process integration, these departments can use the same products or materials in their processes. In that case, you need to combine or take into account both planned consumption in the product planning process and product use in the maintenance activities. From SAP APO, in addition to the above steps, this process requires the integration from SAP ERP of these products and objects where the materials are used. Figure 10 shows the components used in a maintenance order in SAP ERP that could be used in production operations as well.
When modeling this scenario, it‘s helpful to check the consulting SAP Note 1017700 “Consulting: Scheduling of material components (network).” The SAP consulting notes include some recommendations and additional information that is useful when you are building the scenario.

Figure 10
Component used during the maintenance activities of a PM order
Figure 11 shows how the component required in the PM order (Figure 10) in SAP ERP creates a reservation of 7 pieces (negative quantity) at 24.11.2008 8:00. In this way, my planning process in SAP APO considers the requirements coming from the production process (DepDmd [dependent demands]) as well as the reservation (OrdRes) the maintenance department generates.

Figure 11
Reservation created from a PM order
The CIF LOG
The CIF log provides a helpful tool for root cause analysis when CIF transferring does not work properly. You know it is not working because the data does not update properly in the target system. In this case, the CIF log collects the error into an error log. With this error log, you can find the root cause and correct it. Access it through menu path Logistics > Central Functions > Core Interface Advanced Planner and optimizer > Monitoring > Application Log > Display Entries or use transaction CFG1. In this transaction (Figure 6), you can see if the objects (master data, configuration such as Available-to-Promise [ATP] settings or transactional data) are transferred properly (indicated by a green flag) or not (indicated by a red alert). With the transaction CFC6 (Configuration of CIF Application Log), it’s possible to improve the log information that helps you add more information and find potential errors. The first time you activate the integration model for PM orders, using the transaction CFM2, you get a warning referring to this log improvement.
Following the steps the system suggests, enter the function module CIF_PMORDER_SEND, which refers to the technical component responsible for PM order integration. After that, you get all tables or fields available to be reported on and you can select the new fields to include in the CIF log. I selected the downtime information so it can appear in the DOWNTIME Entries section in the CIF log in Figure 6.

Figure 6
CIF information about PM order (SAP ERP transaction CFG1) with downtime information

Adolfo Menéndez Fernández
Adolfo Menéndez Fernández is the application architecture manager at Repsol in Madrid. Previously, he worked at SAP Consulting Spain as the logistics consulting manager. He studied at the University of Oviedo, where he earned an electronic engineering degree. He is a certified SAP consultant in supply and demand planning (SNP and DP), order fulfillment (Global Available-to-Promise), production planning and detailed scheduling (PP/DS), as well as procurement and materials management (MM). Adolfo has more than 10 years of SAP implementation experience in the consumer product goods, pharmaceutical, automotive, furniture, textile, chemical, oil & gas, and steel industries using SAP ERP logistic modules (including PP, MM, and sales and distribution [SD]) as well as SAP SCM (DP, SNP, and PP/DS). He is APICS certified in Production and Inventory Management (CPIM).
You may contact the author at asturiasadolfo@yahoo.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.