Production Planning and Detailed Scheduling (PP/DS) heuristics and optimizer support constraint-based shop floor production sequencing. Through implementation of the right components, PP/DS helps you automate the production planning process to avoid customer delays or increased setup costs and time.
Key Concept
You can use Production Planning and Detailed Scheduling (PP/DS) in SAP Advanced Planning and Optimization for material requirements planning, finite scheduling of the production plan, and production sequence optimization. PP/DS allows you to plan your production and procurement of raw materials to minimize customer delay. This in turn optimizes your shop floor resources.
One of my clients recently conquered this challenge with enormous success. The key element to this success was
implementing the planning algorithm (heuristics) and optimizer functionality within Advanced Planning and Optimization
(APO) Production Planning and Detailed Scheduling (PP/DS). I’ll show you the process the client went through during
the project analysis, design plan, and validation phases of this implementation.
Project Analysis
In the design phase of the implementation, my client and I analyzed the complex multi-variable scheduling rules in
multiple iterations. To summarize them, we came up with a fishbone diagram in which the rules were working in the opposite
direction to our goal of an optimal schedule (Figure 1). Some of the rules were hard constraints and
others were soft constraints. I’ll discuss this concept in more detail in the “Hard and Soft
Constraints.”

Figure 1
Shop floor sequencing rules
In this implementation, the major business issue was to resolve the scheduling constraints within the
plant. To map the shop floor constraints into the APO model, we identified key PP/DS functionalities to automate the shop
floor scheduling process.
For short-term planning, PP/DS offers multiple functionalities from which you can choose. Depending on the
business requirement, you can implement one or more in conjunction with each other. For this implementation example, the
client set the following short-term planning goals:
- Set up sales order processing and material requirements planning (MRP)
- Define order sequencing with hard and soft constraints (Figure 1)
- Set up dynamic cost calculation within multiple variables — for example, product attributes such
as corrosive material, non-corrosive material, or special coating
- Create a bill of material (BOM) comparison between the finished products, giving special weight to
certain attributes
- To accomplish these goals, we implemented heuristic planning as well as DS functionality that included
the PP/DS optimizer and block planning.
Heuristic Planning
Heuristic planning is an algorithm that executes planning tasks for selected objects (e.g., products,
resources, and operations). SAP delivers standard heuristics that you can use for different planning functions. For
example, you can use standard heuristics to execute infinite planning for selected products on selected resources.
In Figure 2 the system executes infinite planning to create the procurement proposals for
sales orders in the system. Procurement proposals are the replenishment orders that you can convert to production orders
or purchase requisitions, depending on whether the product is produced in-house or procured externally.

Figure 2
Infinite planning heuristic for products and resources
In infinite planning, the plan does not take into account the capacity constraint. The system creates the
time-phased production plan under the assumption that capacity is infinite. This situation results in overlapping orders
on the resources, as shown in Figure 2. At the same time gaps exist in the schedule.
After you create the production plan, the next step is to sequence the orders finitely on the resource. You
can use scheduling heuristics to sequence the orders on the resources. After you have the infinite plan, the scheduling
heuristic performs the capacity leveling backward or forward where the resource is overloaded (Figure 3).
You can use this heuristic approach to perform load balancing on the production resource, but it does not take care of
other scheduling constraints such as customer delay, setup cost, downtime, or product-specific exclusion.

Figure 3
The scheduling heuristic creates a finite plan
You can run multiple heuristics in sequence for the same objects to execute multiple planning functions
individually step by step to address one logic at a time. Apart from the standard heuristics, you can also develop custom
heuristics with a user-defined algorithm to address a specific requirement which SAP does not provide as standard
heuristics. For example, if you want to schedule only production resources that have a specific attribute, you can create
a custom heuristics. This functionality allows you to accommodate additional planning logic along with sequential standard
algorithms.
DS Functionality
DS offers sequence optimization with constraints and block planning. MRP heuristic planning creates an
infinite plan. With the scheduling heuristic logic, you can convert the plan to a finite plan with capacity leveling.
However, this plan does not respect the scheduling constraints, such as setup conditions (i.e., transition from one
product to another product), customer due date, or total lead time. To incorporate these constraints in the schedule, you
need to evaluate the schedule based on some parameters using the PP/DS optimizer.
The main purpose of the optimizer is to minimize the total objective function values. You can assign
weights to the objective functions depending on their significance and priority. At the same time it is unnecessary to use
all the objective functions to derive the schedule as all may not be relevant for the business.
Another DS functionality that we used is block planning, in which you define blocks on the production
resource by attributes. Resources are blocked by attributes so you can schedule only products with that attribute on that
resource for a particular time frame. A resource can have multiple blocks. Figure 4 shows how you can
define the blocks on resources across time. Production lines 5 and 6 are blocked for the products that have attributes 1,
2, and 3. With block planning you can schedule only the products with the specific attributes on the specified production
lines.

Figure 4
Planning of resource capacity with attributes for a specific customer or product
Design Plan
After we identified the PP/DS components we wanted, the next challenge was to implement them in a specific
sequence. We needed to plan the production first and then sequence the production plan with the shop floor constraints.
The overall design applies multiple heuristics along with sequence optimization (Figure 5).

Figure 5
Process flow for the shop floor design
The following six steps show how the shop floor design works. When we completed the process, we had an
executable production plan.
Step 1. Enter inbound sales orders with the requirement dates in R/3. These sales orders
are the actual demands, which show up in real time in APO through Core Interface (CIF).
Step 2. Run the MRP heuristic. This created the production plan that the client required.
In turn, the production plan created the replenishment orders against the requirement.
Step 3. Prioritize the orders. Before this step, the replenishment plan was driven by
demand. However, it did not offer an executable shop floor plan because it did not adhere to the shop floor rules
(constraints), such as the requirement date and the key customer. In this step we classified key customers with A, B, and
C designations, depending on the volume of business. This established priorities for the receipt elements (production
plan) that corresponded to the requirement elements. Replenishment orders with the higher priorities are sequenced first.
Step 4. Optimize the production sequence to create a plan, based on scheduling
constraints. In this step, the optimizer streamlined the shop floor plan according to the shop floor constraints
(e.g., setup cost, setup time, product exclusion, customer delay, and downtime) and the assigned priority.
Step 5. Run the heuristic for order merging. The optimized solution had multiple orders of
the same product back to back. We merged the back-to-back multiple orders to create one big order that ran continuously to
avoid multiple transitions.
Step 6. Run the heuristic for order squeezing. The solution also had gaps in the schedule.
We filled them by squeezing the orders in the schedule to maximize how we used production resources.
Hard and Soft Constraints
The next exercise was to define the hard and soft constraints. Hard constraints are rules that cannot be
violated and require major shop floor changes to override, such as downtime and resource capacity. Soft constraints are
rules that the scheduler tries to adhere to with minimum cost and time penalty. In a traditional shop floor, in which no
system application exists to automate the process, the scheduler addresses the hard and soft rules manually while creating
the schedule. We needed to set up these rules in the system so it would use them automatically. You can see the rules we
determined as hard or soft in Figure 1.
Hard Constraints
The implementation team configured hard constraints as master data so the heuristics or optimizer follows
them when it applies the algorithm. We decided to have the scheduler maintain downtime in the resource master data as a
calendar entry (Figure 6). This ensured that planned downtime would be available for the production
resource when the system cannot schedule orders.

Figure 6
Resource capacity downtime
Another hard constraint we developed was the changeover constraint that governed when the system moved from
one production order to another. In the client’s situation, only one changeover was possible at a time on the
production floor because only one person could perform the changeover and no changeover was allowed during the shift
change.
To set this constraint, the scheduler maintains a single secondary resource with a shift break for the
products in the Production Process Model (PPM), which is the master data with activities and components that you maintain
for each product. The setup activity has one changeover resource with shift timing. With this configuration, system
scheduling heuristics or the optimizer cannot schedule changeovers or schedule the setup during a shift change
(Figure 7).

Figure 7
The scheduler creates the changeover as a secondary resource with one capacity assigned to the changeover resource
Another hard constraint we used was product exclusion, which means some of the products are not produced on
certain production resources depending on the attributes. You control this constraint through PPM configuration. You
exclude a specific resource in the PPM for the product so that the system cannot use it.
Soft Constraints
After you map the hard constraints in the system through master data configuration, the next challenge is
to handle the soft constraints to minimize the penalty. Soft constraints in this situation are setup conditions, such as
the penalty when you change over from one product to another, due date violation, and resource utilization. You achieve
these constraints through sequence optimization along with a few heuristics.
Sequence optimization streamlines the setup penalty when you change from one product to another while
respecting the due dates to the customer. Prerequisite master data for this constraint is the setup matrix, which is a
table that contains the setup cost and time from one setup group to another setup group. For example, the cost and time to
switch from one brand of products with corrosive material coating to another brand of product with non-corrosive coating
might be more than the transition within the same brand of products.
You define the setup group at the product setup activity level in PPM, which is a separate master data by
itself. You can group similar products under one setup group, as shown in the APO setup matrix in Figure
8. The scheduler sets up the groups and maintains the setup cost and time in the matrix, which defines the
transition from one product to another. You can then use these groups in APO PPM, as shown in Figure 9.

Figure 8
The APO setup matrix groups products together

Figure 9
The setup group FP2 from the APO setup matrix
In this implementation, the setup matrix is a function of multiple variables depending on product
attributes. To derive the single setup matrix, the implementation team took the following two steps. First it created
multiple setup matrixes for each product variable, and then it translated the matrixes into a unique setup matrix to set
up the optimizer.
Step 1. Create multiple setup matrixes for each product variable. One of the key variables
is to compare the products’ BOM components. Based on these components, setup time and penalty changed drastically,
so we had to quantify the penalties. We assigned numbers to transition from one product to another product based on the
degree of difficulty. We refined these numbers by trial and error. This approach enabled us to create multiple matrixes
— one on BOM comparison and the rest on other variables.
Step 2. Translate the matrixes into a unique setup matrix to set up the optimizer. We gave
each variable a weight. Then, we generated a unique combined matrix using Microsoft Excel. We multiplied the value of the
individual matrix by the corresponding weights, which resulted in Excel formulas for the combined matrix (Figure
10). This allowed us to set up the optimizer to streamline the production schedule based on the combined matrix.

Figure 10
Combined setup matrix used to set up the optimizer
Although the combined matrix helps the PP/DS optimizer create an optimized finite schedule, it may have
gaps and multiple orders of the same product back to back. After we created the combined matrix, we executed the merge and
squeeze heuristics to convert the optimized plan into an executable plan.
Validation
After we completed the design, the next major challenge was to validate it. In this implementation, no
benchmarking existed apart from the scheduler’s experience. How could we know if the system provided a better
solution than what the scheduler used to do manually?
In the validation process, the first step we took was to provide sample orders to the experienced scheduler
for manual sequencing. We then fed the same orders to PP/DS at the same time for automatic sequencing through optimization
and heuristic planning. We measured the setup cost and time in both manual and automatic sequencing with reference to the
setup matrix. We performed this step multiple times to fine-tune the weights and setup matrix to achieve a successful
implementation.
Parijat Chakraborty
Parijat Chakraborty is a director of SAP SCM Solutions at Falcon Prime, Inc. He has 14 years of experience in SAP technology. He focuses on implementing various components of SCM, such as Demand Planning, Supply Network Planning, PP/DS, and Global ATP. He specializes in supply chain manufacturing systems and optimization techniques.
You may contact the author at parijat.chakraborty@falconprime.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.