SAP CO_OCM_UPDATE_EXECUTE Function Module for NOTRANSL: Änderungen am Originalauftrag ausführen









CO_OCM_UPDATE_EXECUTE is a standard co ocm update execute SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Änderungen am Originalauftrag ausführen 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 ocm update execute FM, simply by entering the name CO_OCM_UPDATE_EXECUTE into the relevant SAP transaction such as SE37 or SE38.

Function Group: COOCM
Program Name: SAPLCOOCM
Main Program: SAPLCOOCM
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CO_OCM_UPDATE_EXECUTE 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_OCM_UPDATE_EXECUTE'"NOTRANSL: Änderungen am Originalauftrag ausführen
EXPORTING
COMPNUM_IMP = "Unambiguous identification number of a comparison result
* SOURCE1_IMP = 'B' "Generic Type
* SOURCE2_IMP = 'B' "Generic Type
* CPROF_IMP = "Change profile for Order Change Management
* CPROC_IMP = "Function to be carried out by system

EXCEPTIONS
COMPNUM_NOT_FOUND = 1 FOREIGN_LOCK = 2
.




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_SAPLCOOCMB_001 Check conflict for change step
EXIT_SAPLCOOCM_001 OCM: Definition of Comparison Fields for Order Comparison

IMPORTING Parameters details for CO_OCM_UPDATE_EXECUTE

COMPNUM_IMP - Unambiguous identification number of a comparison result

Data type: COMPH-COMPNUM
Optional: No
Call by Reference: No ( called with pass by value option)

SOURCE1_IMP - Generic Type

Data type: C
Default: 'B'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SOURCE2_IMP - Generic Type

Data type: C
Default: 'B'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CPROF_IMP - Change profile for Order Change Management

Data type: TCO47
Optional: Yes
Call by Reference: No ( called with pass by value option)

CPROC_IMP - Function to be carried out by system

Data type: FUNOCM-FUNCT
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

COMPNUM_NOT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FOREIGN_LOCK -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CO_OCM_UPDATE_EXECUTE 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_compnum_imp  TYPE COMPH-COMPNUM, "   
lv_compnum_not_found  TYPE COMPH, "   
lv_source1_imp  TYPE C, "   'B'
lv_foreign_lock  TYPE C, "   
lv_source2_imp  TYPE C, "   'B'
lv_cprof_imp  TYPE TCO47, "   
lv_cproc_imp  TYPE FUNOCM-FUNCT. "   

  CALL FUNCTION 'CO_OCM_UPDATE_EXECUTE'  "NOTRANSL: Änderungen am Originalauftrag ausführen
    EXPORTING
         COMPNUM_IMP = lv_compnum_imp
         SOURCE1_IMP = lv_source1_imp
         SOURCE2_IMP = lv_source2_imp
         CPROF_IMP = lv_cprof_imp
         CPROC_IMP = lv_cproc_imp
    EXCEPTIONS
        COMPNUM_NOT_FOUND = 1
        FOREIGN_LOCK = 2
. " CO_OCM_UPDATE_EXECUTE




ABAP code using 7.40 inline data declarations to call FM CO_OCM_UPDATE_EXECUTE

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 COMPNUM FROM COMPH INTO @DATA(ld_compnum_imp).
 
 
DATA(ld_source1_imp) = 'B'.
 
 
DATA(ld_source2_imp) = 'B'.
 
 
"SELECT single FUNCT FROM FUNOCM INTO @DATA(ld_cproc_imp).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!