SAP CO_OCM_COMPONENT_CREATE Function Module for NOTRANSL: Erzeugung einer Auftragskomponente aus Stücklistenposition
CO_OCM_COMPONENT_CREATE is a standard co ocm component create 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: Erzeugung einer Auftragskomponente aus Stücklistenposition 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 component create FM, simply by entering the name CO_OCM_COMPONENT_CREATE 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_COMPONENT_CREATE 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_COMPONENT_CREATE'"NOTRANSL: Erzeugung einer Auftragskomponente aus Stücklistenposition.
EXPORTING
HEADERORD = "
* TCN41_WA = "
* T006_WA = "
* T001W_WA = "
* T156_WA = "
* T001L_WA = "
* T163K_WA = "
* T148_WA = "
* TCOKO_WA = "
* AFPOD_WA = "
* I_COPY_LONG_TEXT = 'X' "Selection Indicator
* ITEMORD = "
* OPER = "Operation Incl. Update Indicator
* PROD_COST = "
* DEL_DUMMY = "
* TCOKT_WA = "
* T003O_WA = "
* T418_WA = "
* T460A_WA = "
CHANGING
BOMITEM = "
COMPONENT = "
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_COMPONENT_CREATE
HEADERORD -
Data type: CAUFVDOptional: No
Call by Reference: No ( called with pass by value option)
TCN41_WA -
Data type: TCN41Optional: Yes
Call by Reference: No ( called with pass by value option)
T006_WA -
Data type: T006Optional: Yes
Call by Reference: No ( called with pass by value option)
T001W_WA -
Data type: T001WOptional: Yes
Call by Reference: No ( called with pass by value option)
T156_WA -
Data type: T156Optional: Yes
Call by Reference: No ( called with pass by value option)
T001L_WA -
Data type: T001LOptional: Yes
Call by Reference: No ( called with pass by value option)
T163K_WA -
Data type: T163KOptional: Yes
Call by Reference: No ( called with pass by value option)
T148_WA -
Data type: T148Optional: Yes
Call by Reference: No ( called with pass by value option)
TCOKO_WA -
Data type: TCOKOOptional: Yes
Call by Reference: No ( called with pass by value option)
AFPOD_WA -
Data type: AFPODOptional: Yes
Call by Reference: No ( called with pass by value option)
I_COPY_LONG_TEXT - Selection Indicator
Data type: RC27X-FLG_SELDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ITEMORD -
Data type: AFPODOptional: Yes
Call by Reference: No ( called with pass by value option)
OPER - Operation Incl. Update Indicator
Data type: AFVGDGETOptional: Yes
Call by Reference: No ( called with pass by value option)
PROD_COST -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
DEL_DUMMY -
Data type: SY-DATAROptional: Yes
Call by Reference: No ( called with pass by value option)
TCOKT_WA -
Data type: TCOKTOptional: Yes
Call by Reference: No ( called with pass by value option)
T003O_WA -
Data type: T003OOptional: Yes
Call by Reference: No ( called with pass by value option)
T418_WA -
Data type: T418Optional: Yes
Call by Reference: No ( called with pass by value option)
T460A_WA -
Data type: T460AOptional: Yes
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for CO_OCM_COMPONENT_CREATE
BOMITEM -
Data type: STPOXOptional: No
Call by Reference: No ( called with pass by value option)
COMPONENT -
Data type: RESBBOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CO_OCM_COMPONENT_CREATE 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_bomitem | TYPE STPOX, " | |||
| lv_headerord | TYPE CAUFVD, " | |||
| lv_tcn41_wa | TYPE TCN41, " | |||
| lv_t006_wa | TYPE T006, " | |||
| lv_t001w_wa | TYPE T001W, " | |||
| lv_t156_wa | TYPE T156, " | |||
| lv_t001l_wa | TYPE T001L, " | |||
| lv_t163k_wa | TYPE T163K, " | |||
| lv_t148_wa | TYPE T148, " | |||
| lv_tcoko_wa | TYPE TCOKO, " | |||
| lv_afpod_wa | TYPE AFPOD, " | |||
| lv_i_copy_long_text | TYPE RC27X-FLG_SEL, " 'X' | |||
| lv_itemord | TYPE AFPOD, " | |||
| lv_component | TYPE RESBB, " | |||
| lv_oper | TYPE AFVGDGET, " | |||
| lv_prod_cost | TYPE C, " | |||
| lv_del_dummy | TYPE SY-DATAR, " | |||
| lv_tcokt_wa | TYPE TCOKT, " | |||
| lv_t003o_wa | TYPE T003O, " | |||
| lv_t418_wa | TYPE T418, " | |||
| lv_t460a_wa | TYPE T460A. " |
|   CALL FUNCTION 'CO_OCM_COMPONENT_CREATE' "NOTRANSL: Erzeugung einer Auftragskomponente aus Stücklistenposition |
| EXPORTING | ||
| HEADERORD | = lv_headerord | |
| TCN41_WA | = lv_tcn41_wa | |
| T006_WA | = lv_t006_wa | |
| T001W_WA | = lv_t001w_wa | |
| T156_WA | = lv_t156_wa | |
| T001L_WA | = lv_t001l_wa | |
| T163K_WA | = lv_t163k_wa | |
| T148_WA | = lv_t148_wa | |
| TCOKO_WA | = lv_tcoko_wa | |
| AFPOD_WA | = lv_afpod_wa | |
| I_COPY_LONG_TEXT | = lv_i_copy_long_text | |
| ITEMORD | = lv_itemord | |
| OPER | = lv_oper | |
| PROD_COST | = lv_prod_cost | |
| DEL_DUMMY | = lv_del_dummy | |
| TCOKT_WA | = lv_tcokt_wa | |
| T003O_WA | = lv_t003o_wa | |
| T418_WA | = lv_t418_wa | |
| T460A_WA | = lv_t460a_wa | |
| CHANGING | ||
| BOMITEM | = lv_bomitem | |
| COMPONENT | = lv_component | |
| . " CO_OCM_COMPONENT_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM CO_OCM_COMPONENT_CREATE
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 FLG_SEL FROM RC27X INTO @DATA(ld_i_copy_long_text). | ||||
| DATA(ld_i_copy_long_text) | = 'X'. | |||
| "SELECT single DATAR FROM SY INTO @DATA(ld_del_dummy). | ||||
Search for further information about these or an SAP related objects