Learn about Process Instruction (PI) sheet functionality in SAP ERP Central Component 6.0 for the Production Planning-Process Industry (PP-PI). Get some tips and tricks on the use of PI sheets in error-free manufacturing data capture.
Key Concept
SAP ERP Central Component (SAP ECC) provides Process Instruction (PI) sheets as part of the Production Planning-Process Industry (PP-PI) component. PI sheets are primarily used in production processes in pharmaceutical, mining, chemicals, agro- based, and meat processing companies. They contain steps for processing or manufacturing a product and are generated from the control recipe in the process order. They are also used for communicating with third-party software such as Supervisory Control and Data Acquisition Systems (SCADA), and SAP modules such as materials management, production planning, quality management, and logistics execution. Process instructions in PI sheets can be executed automatically by the process control system or manually on a production line. SAP provides two types of PI sheets, ABAP-based and browser-based. The browser-based PI sheet is based on an HTML layout and is an enhanced version of an ABAP-based PI sheet.
To combat this problem, we suggest configuring Process Instruction (PI) sheets. You can use PI sheet functionality to create an easy-to-use validation-based data input tool that enables error-free data capture with a significant reduction in user data input effort and cost.
Configuring PI sheets to meet your requirements is easy. We concentrate on how to build and integrate the custom scenarios in a characteristic-based and browser-based PI sheet. Browser-based PI sheets are enhanced versions of ABAP list-based PI sheets and contain helpful features such as input validation. We will explain how you can use the flexibility offered by PI sheet functionality for manual data capture for process orders in SAP ERP Central Component (SAP ECC) 6.0.
In addition, we provide a few tips and tricks for enhancing the PI sheet functionality provided in the standard SAP system. These tips and tricks are not well documented in either SAP Help or SAP Notes.
A Basic Overview of PI Sheet Integration
In an environment in which PI sheets are integrated with Supervisory Control and Data Acquisition Systems (SCADA), transactions such as goods receipts and goods issues can be performed without any user intervention. Typically, SCADA passes information to the SAP system through the PI sheet. However, if PI sheets are not integrated with SCADA systems, the operator can manually enter data (quantity, unit of measure, and storage location) directly into the PI sheet. Once you’ve set the data entered in the PI sheet to complete, the system generates process messages. These process messages perform the required business transaction in the SAP ECC system. For example, materials released into a reactor (a vessel to perform chemicals production) are considered as a goods issue transaction in the SAP ECC system.
Similarly, goods-received information (such as quantity) for a process order can also be entered in the PI sheet, which results in a goods receipt document being created through a process message. Thus, PI sheets can be used as a single data entry tool for automation of multiple standard SAP steps such as goods issue or goods receipt with respect to a process order.
Figure 1 shows how Product Planning-Process Integration (PP-PI) functionality integrates with other modules of SAP and Supervisory Control and Data Acquisition (SCADA) systems.

Figure 1
Integration of PI sheets with other modules of the SAP and SCADA systems
PI sheets allow you to enhance and even create new function modules linking them to the specific PI sheet step in the process messages configuration. These modules include:
- Phase confirmation
- Inspection lot update
- Quantity update in a storage bin
- Activity confirmation
- Process order information
- Goods issue/goods receipt (GI/GR)
Business Scenario
The key requirement of the agro products organization for which we implemented the PI sheet functionality was to enable a single data entry point. The company needed this single data entry point to do multiple transactions related to process orders using a manual PI sheet for agricultural seed production.
The company had some business specific requirements:
- Update several batch characteristics with their corresponding value. Standard SAP ECC has a provision for updating a single batch characteristic for a given batch. However, in pharmaceutical, meat processing, and agro-based industries, several batch characteristics are assigned to a batch and users want to record values for more than one. For example, our client needed to know the moisture content for a batch and the grain size of the batch. Therefore, the functionality in standard SAP ECC was not sufficient.
- Create a service procurement purchase order. Standard SAP ECC doesn’t provide a process instruction for creating a purchase order. The scenario involved in creating a process order has two types of components. One set of components was stock items and another was a service item. When a user performs a goods receipt for the header material, the purchase order needed to be created for the service material.
- Update of master inspection characteristics for in-process inspection lot with a value. Standard SAP ECC provides the provision for capturing results in a PI sheet, but it doesn’t update master inspection characteristic values.
Standard SAP ECC provides a few standard process message function modules in the PP-PI module for interacting with other SAP modules. For example, for interacting with inventory management, standard SAP ECC provides a goods receipt process message and a goods issue process message. However, in practical business scenarios, many requirements can’t be accomplished by the standard process message function modules provided in SAP ECC. To satisfy these business-specific requirements, you need to design your own custom process message function modules. SAP ECC has the ability for you to create additional custom process message function modules, through which you can achieve the desired functionality.
Designing PI Sheets to Address the Business Scenario
In the following section we are going to explain in detail the PI sheet-based solution we created to address the needs of our client.
Update Batch Characteristics with Their Corresponding Value
In this scenario, the user enters the values of the batch characteristics for a given batch number in the PI sheet. When the user completes that row in a PI sheet, the system should update those values in the batch characteristics. The PI sheet screen looks like the one in Figure 2.
The batch number is present in the first column. All the batch characteristics are present next to the batch number. To assign the batch characteristic values, the user enters data in the batch characteristics and sets the value to YES in the Assign Values? column. To achieve this, you need to create a custom process message function module. You can create a custom function module by copying the template function module COCD_MESSAGE_DEST_TEMPLATE (the template function module is provided by SAP). The custom function module should have the same interface as the template function module.
Step 1. Declare all the required data elements. All the batch characteristics and the batch numbers that are used in the PI sheet should be declared as either characters or integers with the appropriate data element size based on the requirement. The purpose of the declaration is to let the system know that you will be using these elements in further processing. This is a standard SAP requirement you must do while creating a custom PI sheet function module in ABAP.
Be sure to see if there are any process messages to be processed by checking the status of the process message in the SCOMH table. This helps avoid duplicate processing of the same process message. The internal table SCOMH contains all the process messages to be processed.
Step 2. Execute the function module. All the characteristics that are present in the table of the PI sheet are present in the internal table TARGET_FIELD_NAMES. You can obtain the values assigned to these TARGET_FIELD_NAMES by using function module COCM_MESS_CHARS_TO_DEST_FIELDS. After executing this function module, internal table TARGET_FIELD_VALUES contains the values entered by the user in the PI sheet. The tables TARGET_FIELD_NAMES and TARGET_FIELD_VALUES are the internal tables that are provided by SAP.
Step 3. Map the values entered in the PI sheet to batch characteristics. Mapping ensures that the batch characteristics can be populated automatically by the process message. To avoid hard coding, we suggest you use a custom table. Maintaining a custom table provides more flexibility. All the process message function modules work with respect to a plant, so you need to create a configurable custom table like the one we created in Table 1. In this example, Werks and target_field are part of the primary key of this table. Having one Werks as part of primary key brings as much flexibility as having separate target_fields and batch characteristics for each plant.
0001
|
FIELD1
|
DENSITY
|
0001
|
FIELD2
|
WEIGHT
|
|
Table 1 |
Mapping of batch characteristic and target fields in a custom table |
Step 4. Update the batch characteristic values. Use the standard SAP function module VB_CHANGE_BATCH by passing the batch characteristic values captured in steps 2 and 3 to the table CHAR_OF_BATCH. Once you’ve finished the execution of the function module, the system updates the batch characteristics with their corresponding values.
Step 5. Update the log. Once the processing of the main functionality is complete (in this scenario, it is the update of batch characteristics with their corresponding values), you can update the process message log with success or error messages. It is a good practice to update the log so that upon execution of the process message, the user can find the status. Step 5 needs to be implemented to get useful information in the process message log.
Once you have finished these steps, you should now be able to implement a custom function module. While creating custom function modules, make sure that the validations and error handling procedures are taken care of so that the reason for failure of a process message can be easily traced and the error corrected.
Create the Purchase Order
When you begin this scenario, first follow steps 1 and 2 in the “Update Batch Characteristics with Their Corresponding Value” section. Once you’ve finished those steps, start with step 3 beginning here.
Step 3. Create the purchase order automatically for the service material. After getting all the required data, use BAPI: BAPI_PO_CREATE1. Fill in all the necessary data fields you required in BAPI structures POHEADER, POITEM, and POCOND before using a BAPI.
Step 4. Update the purchase order number created in step 4 (update batch characteristics) to the process message log. This allows you to have traceability of the purchase order automatically created by the process message. To show a newly created purchase order number in the process message log, you can use the output of BAPI: BAPI_PO_CREATE1, used in step 4 in the RETURN structure. If the PO creation is a success, then pass the PO number to the process message. If the PO creation is not a success, the RETURN structure contains the actual reason for failure. Read the reason for failure of purchase order creation and pass the same information to process message log.
Other nuances of PI sheet customizations we used in this implementation are described in the next section.
Generation of Multiple Process Messages for a Single Action
The standard SAP ECC system provides process instructions through which you can trigger only one action. For example, standard SAP ECC provides a separate process instruction for performing goods receipt and a separate process instruction for performing goods issue. However, in practical business scenarios, you sometimes need to perform more than one transaction in an SAP ECC system by closing a single row in a PI sheet.
We’ll use the example scenario of a process order that has been created with a component. When you do a goods receipt for the header material of a process order, you want the system to create a goods issue document for the component material. The trigger for performing both these transactions in the SAP ECC system is entering the goods receipt data in the PI sheet. You can configure this in a single PI as shown in Table 2.

Table 2
Configuration setup of PI category
The standard SAP ECC system contains template function module COCD_MESSAGE_DEST_TEMPLATE, which is provided in function group COCD. Create a new function group and create a custom function module by referencing COCD_MESSAGE_DEST_TEMPLATE.
Validation for PI Characteristics in the PI Sheet
You can validate a value in the PI sheet by using a validation function module or by using the template assigned to a PI characteristic. Here is how to validate using a template.
Requirement: Any value assigned to a characteristic in a PI sheet should always be in the format of AAANNN, where A is an alphabet letter and N is a numerical and it is always three letters first and then three numbers. This validation check can be easily implemented in a PI sheet by assigning a template to the required PI characteristic. Create a template in the required format and assign it to the PI characteristic (Figure 3). In Figure 3, we have defined the Data Type as character, length (Number of Chars) as 6, and Template as AAANNN (alphabet, alphabet, alphabet, number, number, number) according to our requirement.

Figure 3
characteristic template
Suppose the user enters a value that is not in the required format. The system immediately gives an error message indicating that the entered value is not in the required format by highlighting the value in red (Figure 4).

Figure 4
User input validation error
Various Ways of Achieving F4 Help in PI Sheet Fields
In manually operated PI sheets, the user has to enter data in some of the fields as per the business requirement. In these cases, wherever possible, you should provide F4 help so that it becomes easy for the user to find the value he wants to populate (i.e., batch numbers). When using the standard PI characteristics, F4 help is available in some of the characteristics. In the case of custom characteristics, you need to decide the way in which you want to achieve F4 help. There are three ways in which you can achieve F4 help.
Procedure 1: Use a Function Module
Obtain F4 help by assigning a custom function module to the PI characteristic as shown in Figure 5. The PI characteristic to which the custom function module is assigned needs to be used as an input request characteristic in PI category. The advantage of using this procedure is that you can write your custom logic in the function module. For example, you can decide which values need to be shown and which values should not be shown.
You need to create two function modules: ZPI_GOODBATCH and ZPI_GOODBATCH_F4. This is mandatory and the system does not work without them. Function module ZPI_GOODBATCH is to be assigned to a PI characteristic. ZPI_GOODBATCH_F4 is used by the system for displaying values in the PI sheet when you use the F4 help option. While the ZPI_GOODBATCH_F4 is used for aiding the user with data entry, ZPI_GOODBATCH is used for validation when the user enters data directly in the input request field.

Figure 5
Function module for F4 Help
All the custom logic that is needed in getting the values in F4 help pop-up should be written in the ZPI_GOODBATCH_F4 function module. The logic related to the validations on the value selected/entered by the user should be written in the ZPI_GOODBATCH function module.
Procedure 2: Use Foreign Key Validation
In the PI sheet, if the standard PI characteristic (PPPI_STORAGE_LOCATION) is used as an input request field, then all the storage locations available in that plant are shown to the user. Similarly, if you want to have all the possible values of an organizational element in your custom characteristic, then you need to assign it as a foreign key field. In a PI characteristic, there is a provision to enter a foreign key field to get the F4 help (Figures 6 and 7). First, click the Proc. mgmt button provided in the Basic data tab of the process instruction characteristic (Figure 6). The system shows a pop-up window as shown in Figure 7. In this pop-up window you can enter the data in the Foreign key field.

Figure 6
Process management setup for PI characteristic

Figure 7
Link the PI charactersitic to another component
In the standard SAP ECC system, you can enter a limited number of components in the Foreign key field. You can only use the components present in the RCOFKCHR structure. If you want to assign a component that is not provided by the standard SAP system, you have to append it in the RCOFKCHR structure. Then you can assign that newly added component in the Foreign key field. Appending a new field to structure RCOFKCHR is possible only after you implement SAP Note 1282448.
For example, you can’t assign Storage Section (LGBER) in standard SAP. To make this possible, first you have to append RCOFKCHR and then you can assign it in the PI characteristic (Figure 8).

Figure 8
Append RCOFKCHR structure
Once this assignment is done, press the F4 help or click the search icon in the field of the PI sheet. Now you can see the pop-up window as shown in Figure 9.

Figure 9
F4 Help using Foreign Key Field
Procedure 3: Use the Check Table
You need to use a check table if you want to restrict the F4 help values in a field of a PI sheet to the values present in a table. To get F4 help, you need to assign a check table in the PI characteristic as shown in Figure 10. Once this is done, you get the F4 help icon in the corresponding field of the PI sheet. All the values present in the check table become available as F4 help values.

Figure 10
F4 Help using Check table
Use Events in PI Sheet Configuration
Any action that is performed in the PI sheet is controlled via events. For example, the action of adding a new row in a PI sheet table is internally controlled via an event. These events can be used in the configuration to achieve the custom functionality. Let me explain using events with an example. Imagine that the system has automatically generated a number and has displayed it in the PI sheet. This automatic generation is triggered by events that occur in the PI sheet. In the configuration of the PI category, events are assigned to characteristic PPPI_EVENT. SAP has provided several events that occur in the PI sheet. You can use one of these according to your requirement.
Assign a custom function module to an event so that when that particular event occurs, the associated custom function module is executed automatically. The custom functionality that you want to achieve for that event needs to be coded in the assigned function module.
Requirement 1: Automatic Number Generation and Field Population when Generating a New PI Sheet
Before we explain how to fulfill this requirement, let us give you an example of when you might want to have it. Suppose you want to generate a ticket number for each and every goods receipt that occurs in your plant. The ticket number should be auto populated in the first row used for performing the goods receipt by the time the user starts entering data of the first goods receipt. Automatic number generation and its value population in a particular field is not provided as a standard feature in the standard SAP ECC system. In Figure 11, you can see that the ticket number is generated at the same time when a new PI sheet is generated. This can be achieved by the configuration shown in Figure 12.

Figure 11
Automatic number generation using PI sheet events
For this requirement, use standard SAP event DOCUMENT.GENERATED as shown in Figure 12 below for row no. 130.

Figure 12
Process instruction configuration example for using events
Requirement 2: Automatic Number Generation, When a New Row is Added to a PI Sheet Table
Now let us give you an example where this requirement would be useful. Suppose you want to generate a ticket number for each and every goods receipt that occurs in a plant. The ticket number should be auto populated whenever you do the goods receipt. A new goods receipt can be performed by using the plus button. Now when the user uses the plus button, the system should generate the next ticket number. Automatic number generation and its value population in a particular field is not provided as a standard feature in the SAP ECC system. When you add a new row to a repeated data request, you can set up the system to have the next number automatically generated (Figure 13).

Figure 13
Next number generation using custom logic
Use the standard SAP event TABLE.LINE_ADDED. For example, in Figure 13, the ticket number is generated when a new row is added to a repeated data request. This can be achieved by the configuration shown in Figure 14 row no. 210. Here I have used the same function module ZPI_STKNUM present in the earlier requirement.

Figure 14
PI configuration for next number generation
Additional Lessons Learned
In this section, we highlight the lessons learned during our implementation process.
- For manual PI sheet development and configuration, follow an iterative process whereby the key users are engaged throughout the development life cycle to avoid rework at a later stage (i.e., during the user acceptance test).
- Design the logical split of data request tables in the PI sheet so that it reflects the timing and sequencing of data entry by users. This ensures that the PI sheet rows generate the process message in the correct sequence.
- Consider the change/cancellation of data inputs using additional data request tables as the standard SAP system does not allow for changes of the PI sheet data input requests.
- The F4 help function module is preferred over using possible values:In aPIcharacteristic, there is a provision to provide possible values in a Values tab. Once this PI characteristic is used in a PI sheet, values provided in the PI characteristic are available as possible values in the drop-down menu. After generation of a PI sheet, if a new value is added in the Values tab of a PI characteristic, this newly added value is not available in the existing PI sheets. The newly added value is available only in PI sheets generated after adding the new value. To avoid this, you can use the F4 help function module. The procedure for this is to create a new function module and assign it in the value tab of the PI characteristic. Maintain all the possible values in a custom table and read the content of this in the F4 help function module.
- Create separate PI characteristics for each scenario. In the case of custom PI characteristics, you should always use separate PI characteristics for each scenario rather than trying to reuse custom PI characteristics created for one scenario in another. The reason is that custom characteristics are created to meet the specific demand present in that scenario. If you modify the properties of a custom characteristic to meet the requirement of one scenario, it affects the other scenarios where it is used.
- Use configuration to specify a PI characteristic as mandatory. A PI characteristic can be set as a mandatory characteristic either via configuration or in the process message function module. In the process message function module, you can instruct the system to consider PI characteristics as mandatory characteristics. We suggest you control this via configuration using this procedure: Check the check box Entry Required in basic data view screen of PI characteristic in transaction O26C. Then, check the check box Required Characteristic for the characteristic in the message category screen of transaction O13C of the corresponding process message category.
- A simple data request can be achieved in a tabular format (like that of a repeated data request) by assigning value 1 to both PPPI_MINIMUM_TABLE_SIZE and PPPI_MAXIMUM_TABLE_SIZE in the process instruction category screen of transaction O12C. An example of configuration for achieving the same is shown in Figure 15. Even though a data request type is mentioned as a repeated data request, data entry is possible only once for this instruction because the minimum and maximum table sizes are mentioned as 1.

Figure 15
Repeated data request set up in PI category configuration
- Enable pop-up functionality in a PI sheet for a scenario in which a user clicks a button to create a batch. Once pressed, the system gives a pop-up with a yes and no option. If the user selects yes, the system creates a batch. If the user selects no, a batch is not created. To create a batch in pop-up functionality, call function BAPI_BATCH_CREATE destination none. Using destination none during the call of function is mandatory to achieve this functionality.
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.
Shreepriya Garg
Shreepriya Garg is a senior principal consultant with Infosys Technologies Limited. He has more than 12 years of professional experience, most of it in SAP implementations, upgrades, and rollouts.
You may contact the author at sreepriya_g@infosys.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.