Capturing the predefined execution time of a process order is a well-known and straightforward procedure in the Production Planning for Process Industries module of the SAP ERP Central Component (SAP ECC) system. However, capturing the dynamic execution time of phases of a process order requires you to follow a special configuration procedure in SAP ECC. By using this configuration, you obtain greater predictability in process order scheduling and face less uncertainty about how variable factors affect the preparation of an ingredient.
Key Concept
Dynamic execution time is a variable aspect of the scheduling of a process order that emerges when an external factor affects a manufacturing process.
In the Production Planning for Process Industries (PP-PI) module of SAP ERP Central Component (SAP ECC), process stages and the corresponding resources are represented as the operations and phases in the manufacturing recipe.
In some scenarios in the pharmaceutical industry, scheduling time of a stage stems from external factors and is decided on only during the creation of the process order. For example, in cold weather, process stage heating takes longer compared to similar actions during hotter weather. These external factors make the scheduling time on a resource variable or dynamic in nature — in other words, it cannot be fixed duration or quantity-dependent fixed duration.
When the execution time of a phase or stage is fixed or dependent directly on the quantity to be processed without the influence of external factors, this can be configured in the resource and the recipe master and used in the process order scheduling. This is a straightforward process in the PP-PI module of SAP ECC. However, capturing dynamic execution time based on external factors is not as clearcut. We show you how to capture the dynamic execution time of the phase of a process order, including details about the configuration procedure and data setup to follow in SAP ECC.
Let’s start with some basics – if you’re already familiar with recipes and stages, you can skip ahead to the bulleted list under Figure 1. Preparation of an active ingredient in a pharmaceutical industry involves different process stages, such as mixing, heating, and blending. Manufacturers perform each of these process stages on a resource in a sequence, which is called a recipe. In the PP-PI module of SAP ECC, process stages and the corresponding resources are represented as the operations and phases in the recipe. All the input materials required to perform a process are mentioned in the bill of material (BOM). A production version is created for the combination of BOM and recipe.
The manufacturer processes input materials through each stage for a certain duration, which is known as scheduling time. The scheduling time is usually set up through a formula in the resource, which is then assigned to the operation of the recipe. During the creation of a process order, the recipe is the master data that defines the operation and phases of the process order. A phase in the recipe and hence in the process order is an independent subdivision of an operation. The primary resource that is allocated to the operation is the resource for the phase as well. The phase is a detailed process step of an operation that holds the variable parameters used in scheduling an operation and thus the sum of the duration of all phases of an operation is the duration required for the whole operation in the process order (Figure 1).

Figure 1
Formula assignment to the recipe and its use in process order
SAP ECC provides the following options to determine the scheduling duration:
- Fixed duration, which is a set amount of time. For example, if the fixed duration for a phase of an operation is five hours, regardless of the quantity of the operation, the operation duration is five hours.
- Quantity dependent variable duration, which, as a formula, equals operation quantity / base quantity * lot size-dependent duration. For example, suppose the lot size-dependent duration for a phase of an operation is two hours and the base quantity is 10 (i.e., it takes two hours to process a quantity of 10). If the operation quantity in this particular phase of the process order is 50, the variable duration is calculated as 50 / 10 * 2 = 10 hours.
- Combination of fixed and quantity-dependent duration, which in most manufacturing scenarios is the formula used in scheduling (Figure 2). For example, let’s say the set-up time for a machine is five hours. This would always be fixed regardless of the quantity to be processed in that machine. If the machine capacity is 10, the duration process in the machine is two hours, and the operation quantity is 50, the total duration of the operation would be:
Set-up time + lot size dependent duration * number of lots = 5 + (50 / 10 * 2) = 15 hours

Figure 2
Formula for a combination of fixed and lot size dependent duration
Steps to Assign Dynamic Time
You can use SAP functionality to capture dynamic time and to schedule the process order based on the dynamic execution time. Let’s look at the required customizing steps, master data setup, and the process of creating the process order.
Customizing Steps
You can carry out the following steps in customizing using transaction SPRO. Menu paths and other transactions appear below. You can go through transaction SPRO and follow the menu path or directly enter the transaction to carry out each of the steps.
Step 1. Create formula parameters in customizing. Follow menu path Customizing > Production planning for process industries > Master Data > Resource > Capacity Requirements Planning > Formulas for resources (work centers) > Define formula parameters for resources (work centers) or use transaction OP17.
Execute the last node and click the New Entries button. In the resulting screen, assign a parameter name to identify the parameter. Because we’re using the user field from the phase of the master recipe, define the parameter here with origin 4. Because the parameter is going to hold the dynamic execution time, the dimension of the parameter is setup as TIME and the unit as D (Days). Enter the parameter text and key word to identify this formula. After entering the details as shown in Figure 3, save the newly created formula parameter. This parameter is assigned to the formula that you create in step 2.

Figure 3
Parameter setup to be used in formula
Step 2. Create formulas for resources. Follow menu path Customizing > Production planning for process industries > Master Data > Resource > Capacity Requirements Planning > Formulas for resources (work centers) > Define Formulas for resources (work centers) or use transaction OP21.
Execute the last node and click the New Entries button. In the resulting screen, assign a formula key to identify the formula and give a meaningful description to the formula. Assign the parameter created in step 1 to this formula in the Formula field (Figure 4). Be sure to select the Allowed for Scheduling check box. Once you enter the details as shown in Figure 4, save the newly created formula. You can use this formula in the resource when the scheduling is dynamic.

Figure 4
Formula setup to be used in the research
In this formula, assign only the parameter for dynamic execution time directly. You could also set up the formula to combine the fixed duration or quantity-dependent duration and the parameter for dynamic execution time. You could also have another parameter set up and assign this to the user field key as defined in subsequent steps, and use both parameters in the formula.
Step 3. Create user field keys. Follow menu path Customizing > Production planning for process industries > Master Data > Master Recipe > Data for operations and phases >Define user defined fields or use transaction OPEC.
Create a user field key to assign to the phases of the master recipe when the dynamic execution time scheduling is required (i.e., for those phases in which the scheduling time cannot be fixed). The user field key sets up a place holder for storing additional user-defined values in the phases of the recipe. It provides a provision to have four text fields, two quantity fields, two amount/value fields, two dates, and two check boxes. For this example, use one of the quantity fields in the user field key.
To create a new user field key, either follow the customizing steps as defined above and execute the last node or enter transaction OPEC. Click the New Entries button. In the resulting screen, enter the field key name and description to identify the user field key. Enter the name of the parameter created in step 1 to one of the two Quantity fields (Figure 5). By assigning the formula parameter to the quantity field, you designate whatever value that goes into this quantity field of the user field key to the parameter and thereby affect the formula in the resource.

Figure 5
User field key definition to be used in the phases of the recipe
Master Data Setup
Let’s shift focus to setting up master data.
Step 4. Assign the user key field to the phase of the recipe. Identify the recipe and the phases in which the dynamic execution time would affect the scheduling of the process orders, and set up the user field key that you created in step 3 for these phases of the master recipes. To change a master recipe, use transaction C202. Enter the recipe number and the group counter and click the Operations button in the toolbar (Figure 6).

Figure 6
Initial screen for Change Master Recipe
The operations and phases are shown in the resulting screen. Double-clicking a phase opens details of the phase in various tabs. Select the User Fields tab, which produces the screen shown in Figure 7. Against the Field key as highlighted in Figure 7, there is a dropdown to select the appropriate user field key. Select the user field key that you created in step 3. Once you select the user field, there should be at least one quantity field available for input, which acts as a placeholder for the dynamic execution time. The unit of measure for this is D because you previously set up the unit for the formula parameter associated with this field to D (Days).

Figure 7
User field of the phase where the user field key is entered and the dynamic execution time is maintained
You can set up the dynamic execution time either at the master recipe level or in the process order. As an example, if there are different recipes varying by season, and within a season the execution time remains constant, then you can set up the execution time in this field in the recipe itself. This value then flows into the process order and is used in the scheduling. Then, depending on the season, you use the corresponding master recipe and hence the scheduling varies by season.
It’s best to perform the assignment of user field and dynamic execution time for phases through a mass upload program or Legacy System Migration Workbench because the number of recipes to be changed or created could be high.
Step 5. Assign the formula in the scheduling view of the resource master. Change another master data resource to use the scheduling formula that you created in step 2. These are the resources that are assigned to the corresponding operations in the master recipe, in which the execution time is dynamic. To assign the formula to the resource, go into change mode of the resource using transaction CRC2. Go to the Scheduling tab and enter the formula created in step 2 in the Other formula field (Figure 8). This is the formula used in determining the execution time of the phases carried out in this resource.

Figure 8
Assign the dynamic execution time formula in the Scheduling tab of the resource
Create Process Order and Scheduling
Create the process order using transaction COR1 for the material and choose the recipe for which the user field key has been assigned in step 4. Because you want to capture the dynamic execution time, select the phase for which the dynamic execution time needs to be applied and click the Details button. In the phase details, click the User Fields tab. Since the field key is already assigned in the recipe, the field for entering the variable time appears with the unit of measure D (Days) as determined from the parameter associated with this user field. In this field, the user can input the dynamic execution time to be considered in scheduling for this phase (Figure 9).

Figure 9
Dynamic execution time entered in the user field of the process order
In the example shown in Figure 9, the Variable Time field has a value of 4 days. Now click the Dates tab to produce the screen in Figure 10. You can see the time given for the Variable Time field is considered in the scheduling of dates for a phase (Start and Finish), and is also shown in the Processing Time field in the Duration subscreen.

Figure 10
Scheduled dates depicting the duration of dynamic execution time of the phase
Because in the user field key for the Variable Time field you assigned the parameter name that was defined in step 1, this parameter name was assigned to a formula in step 2.This formula is used in scheduling phase because the formula is assigned to the scheduling tab of the resource in step 5, and the scheduling of the phase is affected by the value entered into this field. This is graphically represented in Figure 11.

Figure 11
Flow for dynamic execution time scheduling
Note
In the example demonstrated, the dynamic execution time was entered manually in the user field of the process order. This can be made automatic through implicit enhancement, which requires ABAP coding. When the recipe is read during the creation of process order, the user fields read from table PLPO (Operations Table) and can be modified to populate the dynamic execution time during the runtime of the program. This dynamic execution time can come directly from a custom table or can be based on any calculation as defined by the business need. Because the runtime involves ABAP, you can put in any business rule to calculate or determine the dynamic execution time and update it in the user field
A user now has direct control of the dynamic execution time of the phase (i.e., the scheduling and rescheduling can be affected based on the dynamic execution time entered by the user). In case of automation determining the dynamic execution time, the implicit enhancements could also be used in determining the scheduling time for planned order.
Amir Ashfaq Hussain
Amir Ashfaq Hussain is a technology lead from Infosys Technologies, Limited. He has worked on SAP projects for the past seven-and-a-half years and has been involved in various rollout, maintenance, and upgrade projects. His primary areas of expertise are SAP PP, SAP PP-PI, and ABAP. He is currently providing consulting in the space of integrated planning in the process industry.
You may contact the author at amirashfaq_hussain@infosys.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.

Srivijaya Veeramachaneni
Srivijaya Bhanu Veeramachaneni has worked as an SAP consultant for the last eight-plus years. He works primarily in implementation and roll out projects, and his primary expertise is in SAP PP, PP-PI, and APO-PP/DS modules.
You may contact the author at Srivijaya_v@infosys.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.