SAP Production Planning: Install Custom Function COHV (Part I)
Introduction
SAP standard production orders information system, the COOIS transaction, is a very powerful and flexible tool to report various aspects of production and planned orders. It can be easily customized and enhanced.
The COHV transaction couples COOIS with order mass processing functions enhancing the PP information system even further. It provides various mass processing functions like order release, staging, costing etc. The note 1819470 – Mass processing functions are missing in t-code COHV has introduced two additional options to fix/delete fixing and to delete planned orders. The note shows that the mass processing capabilities of COHV can be enhanced. However, I have not been able to find any official extension points or documentation on how to add customer defined functions to COHV. This article is meant to close this gap and to present a step-by-step instructions to implement a new mass processing functions.
Enhance fixed values list of CO_FUNCT domain
The mass processing function lists is defined with a reference to CO_FUNCT data element.
Figure 1: Technical details of the “Function” field in COHV
The data element refers to the CO_FUNCT domain.
Figure 2: The CO_FUNCT data element details
The list of mass processing functions available in COHV is defined with fixed values of the CO_FUNCT domain. Notice that the list has already been enhanced with 205 and 215 functions delivered with the note 1819470 – Mass processing functions are missing in t-code COHV.
Figure 3: The fixed values of the CO_FUNCT domain
Therefore, the first step is to add a custom function code to the fixed values of the domain. The exact procedure is described on SAP Help: Creating Fixed Value Appends
Figure 4: The fixed values of the CO_FUNCT domain enhanced with a custom function
Register the custom function
The next step is to register the custom function with COHV. That is done in the include LCOWORKF06, the FORM routine REGISTERED_FUNCTIONS_INIT
SAP provides the enhancement spot ES_SAPLCOWORK to register additional functions. However, it is for SAP internal use only. Unfortunately, there are no standard enhancements available here either. Therefore, I am going to use an implicit enhancement at the end of the routine.
The fct_icon field is optional, but it is a nice touch to have an icon assigned to the mass processing function.
Add the custom function in the COISL transaction
Finally, the custom function needs to be assigned to order information list type in the COISL transaction.
Final result
The final result is that the custom function is visible and selectable in COHV.
Figure 5: The custom function in the COHV initial screen
It is also available as a push button with the icon assigned in the registration step in the COHV toolbar.
Figure 6: The custom function in the COHV toolbar
The custom function is also visible and executable from the COHV results list.
Figure 7: The custom function in the COHV results list
Naturally, the custom function does not do anything for now. The function execution implementation is the topic of the next episode. Stay tuned…