SAP CO_MP_OPERATION_CHECK Function Module for Check an operation/sequence combination
CO_MP_OPERATION_CHECK is a standard co mp operation check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check an operation/sequence combination processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for co mp operation check FM, simply by entering the name CO_MP_OPERATION_CHECK into the relevant SAP transaction such as SE37 or SE38.
Function Group: COMP
Program Name: SAPLCOMP
Main Program: SAPLCOMP
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CO_MP_OPERATION_CHECK pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'CO_MP_OPERATION_CHECK'"Check an operation/sequence combination.
EXPORTING
APLFL_IMP = "Sequence
AUFNR_IMP = "Order Number
* STATUS_LOEKZ = ' ' "
* STATUS_RUECK = ' ' "
VORNR_IMP = "Operation/Activity Number
IMPORTING
AFFLD_EXP = "Order: Dialog table for order sequences (AFFL)
AFVGD_EXP = "Order: Dialog table for Table AFVG (order operation)
INDEX_PLFL_EXP = "Index referring to record table for sequences
INDEX_PLPO_EXP = "Index referring to record table for items
EXCEPTIONS
OBJNR_MISSING = 1 OPER_DELETED = 2 SEQ_ALTERNATIV = 3 STATUS_LOEKZ = 4 STATUS_NOT_FOUND = 5 STATUS_RUECK = 6
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLCOMPXPD_001 Determine Reference Date
EXIT_SAPLCOMPXPD_002 Subitems Field Catalog
EXIT_SAPLCOMPXPD_003 Update of Event Data
EXIT_SAPLCOMPXPD_004 Derivation of Event Scenario
EXIT_SAPLCOMPXPD_005 Assignment of Events to Expediting Object
EXIT_SAPLCOMPXPD_006 Field Catalog for Enhancement of Monitoring of Dates Data
EXIT_SAPLCOMPXPD_007 Update of Subitem During First Call
EXIT_SAPLCOMPXPD_S_001 Selection of Relevant Components
IMPORTING Parameters details for CO_MP_OPERATION_CHECK
APLFL_IMP - Sequence
Data type: RCM01-PLNFLOptional: No
Call by Reference: No ( called with pass by value option)
AUFNR_IMP - Order Number
Data type: CAUFVD-AUFNROptional: No
Call by Reference: No ( called with pass by value option)
STATUS_LOEKZ -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
STATUS_RUECK -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
VORNR_IMP - Operation/Activity Number
Data type: RCM01-VORNROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CO_MP_OPERATION_CHECK
AFFLD_EXP - Order: Dialog table for order sequences (AFFL)
Data type: AFFLDOptional: No
Call by Reference: No ( called with pass by value option)
AFVGD_EXP - Order: Dialog table for Table AFVG (order operation)
Data type: AFVGDOptional: No
Call by Reference: No ( called with pass by value option)
INDEX_PLFL_EXP - Index referring to record table for sequences
Data type: RC27I-INDEX_PLFLOptional: No
Call by Reference: No ( called with pass by value option)
INDEX_PLPO_EXP - Index referring to record table for items
Data type: RC27I-INDEX_PLPOOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
OBJNR_MISSING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OPER_DELETED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SEQ_ALTERNATIV -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
STATUS_LOEKZ -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
STATUS_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
STATUS_RUECK -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CO_MP_OPERATION_CHECK Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_affld_exp | TYPE AFFLD, " | |||
| lv_aplfl_imp | TYPE RCM01-PLNFL, " | |||
| lv_objnr_missing | TYPE RCM01, " | |||
| lv_afvgd_exp | TYPE AFVGD, " | |||
| lv_aufnr_imp | TYPE CAUFVD-AUFNR, " | |||
| lv_oper_deleted | TYPE CAUFVD, " | |||
| lv_status_loekz | TYPE CAUFVD, " SPACE | |||
| lv_index_plfl_exp | TYPE RC27I-INDEX_PLFL, " | |||
| lv_seq_alternativ | TYPE RC27I, " | |||
| lv_status_loekz | TYPE RC27I, " | |||
| lv_status_rueck | TYPE RC27I, " SPACE | |||
| lv_index_plpo_exp | TYPE RC27I-INDEX_PLPO, " | |||
| lv_vornr_imp | TYPE RCM01-VORNR, " | |||
| lv_status_not_found | TYPE RCM01, " | |||
| lv_status_rueck | TYPE RCM01. " |
|   CALL FUNCTION 'CO_MP_OPERATION_CHECK' "Check an operation/sequence combination |
| EXPORTING | ||
| APLFL_IMP | = lv_aplfl_imp | |
| AUFNR_IMP | = lv_aufnr_imp | |
| STATUS_LOEKZ | = lv_status_loekz | |
| STATUS_RUECK | = lv_status_rueck | |
| VORNR_IMP | = lv_vornr_imp | |
| IMPORTING | ||
| AFFLD_EXP | = lv_affld_exp | |
| AFVGD_EXP | = lv_afvgd_exp | |
| INDEX_PLFL_EXP | = lv_index_plfl_exp | |
| INDEX_PLPO_EXP | = lv_index_plpo_exp | |
| EXCEPTIONS | ||
| OBJNR_MISSING = 1 | ||
| OPER_DELETED = 2 | ||
| SEQ_ALTERNATIV = 3 | ||
| STATUS_LOEKZ = 4 | ||
| STATUS_NOT_FOUND = 5 | ||
| STATUS_RUECK = 6 | ||
| . " CO_MP_OPERATION_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM CO_MP_OPERATION_CHECK
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single PLNFL FROM RCM01 INTO @DATA(ld_aplfl_imp). | ||||
| "SELECT single AUFNR FROM CAUFVD INTO @DATA(ld_aufnr_imp). | ||||
| DATA(ld_status_loekz) | = ' '. | |||
| "SELECT single INDEX_PLFL FROM RC27I INTO @DATA(ld_index_plfl_exp). | ||||
| DATA(ld_status_rueck) | = ' '. | |||
| "SELECT single INDEX_PLPO FROM RC27I INTO @DATA(ld_index_plpo_exp). | ||||
| "SELECT single VORNR FROM RCM01 INTO @DATA(ld_vornr_imp). | ||||
Search for further information about these or an SAP related objects