SAP CO_XT_COMPONENT_ADD Function Module for NOTRANSL: Anlegen von Komponenten für Fertigungsaufträge
CO_XT_COMPONENT_ADD is a standard co xt component add 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: Anlegen von Komponenten für Fertigungsaufträge 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 xt component add FM, simply by entering the name CO_XT_COMPONENT_ADD into the relevant SAP transaction such as SE37 or SE38.
Function Group: COXT
Program Name: SAPLCOXT
Main Program: SAPLCOXT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CO_XT_COMPONENT_ADD 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_XT_COMPONENT_ADD'"NOTRANSL: Anlegen von Komponenten für Fertigungsaufträge.
EXPORTING
IS_ORDER_KEY = "Order Number
* I_BATCH = "
* I_BATCHX = "
* I_CUOBJ = "Configuration (Internal Object Number)
* I_CUOBJX = "Change Information for the Relevant User Data Field
* I_BATCH_SEL_CUOBJ = "
* I_BATCH_SEL_CUOBJX = "
I_POSTP = "Item category (bill of material)
* I_KZKUP = "Indicator: Co-Product
* I_KZKUPX = "Change Information for the Relevant User Data Field
* I_XFEHL = "Missing Part
I_MATERIAL = "Material Number
* I_XFEHLX = "Change Information for the Relevant User Data Field
* I_SOBKZ = "
* I_SOBKZX = "
* I_KDAUF = "
* I_KDAUFX = "
* I_KDPOS = "
* I_KDPOSX = "
* I_PSPEL = "
* I_PSPELX = "
I_POSNO = "Item Number of an I/O Node in APO
IS_REQU_QUAN = "
* I_KZAUS = "
* I_KZAUSX = "
* I_NAFKZ = "
* I_NAFKZX = "
* I_NOMAT = "
* I_NOMATX = "
* I_NFUML = "
* I_NFUMLX = "
* I_NFPKZ = "
* I_NFPKZX = "
* IS_CONF_QUAN = "
* I_NOMNG = "
* I_NOMNGX = "
* IS_CONF_QUANX = "
I_OPERATION = "Operation Counter
* I_SEQUENCE = "Sequence
IS_STORAGE_LOCATION = "
IS_STORAGE_LOCATIONX = "
IMPORTING
ES_AFPO = "Document structure for order items
ES_ISSUEDATE = "
ES_BAPIRETURN = "
E_ERROR_OCCURRED = "Generic Type
ES_RESBD_CREATED = "Reservation/Dependent requirements
TABLES
* RESBT_EXP = "Reservation/Dependent Requirements
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_SAPLCOXT_001 DE-EN-LANG-SWITCH-NO-TRANSLATION
EXIT_SAPLCOXT_002 DE-EN-LANG-SWITCH-NO-TRANSLATION
IMPORTING Parameters details for CO_XT_COMPONENT_ADD
IS_ORDER_KEY - Order Number
Data type: COXT_ORD_KEYOptional: No
Call by Reference: Yes
I_BATCH -
Data type: COXT_BATCHOptional: Yes
Call by Reference: Yes
I_BATCHX -
Data type: COXT_BATCHXOptional: Yes
Call by Reference: Yes
I_CUOBJ - Configuration (Internal Object Number)
Data type: COXT_CONFIG_OBJECTOptional: Yes
Call by Reference: Yes
I_CUOBJX - Change Information for the Relevant User Data Field
Data type: COXT_CONFIG_OBJECTXOptional: Yes
Call by Reference: Yes
I_BATCH_SEL_CUOBJ -
Data type: COXT_CONFIG_OBJECTOptional: Yes
Call by Reference: No ( called with pass by value option)
I_BATCH_SEL_CUOBJX -
Data type: COXT_CONFIG_OBJECTXOptional: Yes
Call by Reference: Yes
I_POSTP - Item category (bill of material)
Data type: RESB-POSTPOptional: No
Call by Reference: Yes
I_KZKUP - Indicator: Co-Product
Data type: RESB-KZKUPOptional: Yes
Call by Reference: Yes
I_KZKUPX - Change Information for the Relevant User Data Field
Data type: COXT_BAPIUPDATEOptional: Yes
Call by Reference: Yes
I_XFEHL - Missing Part
Data type: RESB-XFEHLOptional: Yes
Call by Reference: Yes
I_MATERIAL - Material Number
Data type: COXT_MATERIALOptional: No
Call by Reference: Yes
I_XFEHLX - Change Information for the Relevant User Data Field
Data type: COXT_BAPIUPDATEOptional: Yes
Call by Reference: Yes
I_SOBKZ -
Data type: COXT_SOBKZOptional: Yes
Call by Reference: No ( called with pass by value option)
I_SOBKZX -
Data type: COXT_SOBKZXOptional: Yes
Call by Reference: Yes
I_KDAUF -
Data type: COXT_KDAUFOptional: Yes
Call by Reference: No ( called with pass by value option)
I_KDAUFX -
Data type: COXT_KDAUFXOptional: Yes
Call by Reference: Yes
I_KDPOS -
Data type: COXT_KDPOSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_KDPOSX -
Data type: COXT_KDPOSXOptional: Yes
Call by Reference: Yes
I_PSPEL -
Data type: COXT_PSPELOptional: Yes
Call by Reference: No ( called with pass by value option)
I_PSPELX -
Data type: COXT_PSPELXOptional: Yes
Call by Reference: Yes
I_POSNO - Item Number of an I/O Node in APO
Data type: CIF_R3RES-POSITIONNOOptional: No
Call by Reference: Yes
IS_REQU_QUAN -
Data type: COXT_S_QUANTITYOptional: No
Call by Reference: Yes
I_KZAUS -
Data type: COXT_KZAUSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_KZAUSX -
Data type: COXT_KZAUSXOptional: Yes
Call by Reference: Yes
I_NAFKZ -
Data type: COXT_NAFKZOptional: Yes
Call by Reference: No ( called with pass by value option)
I_NAFKZX -
Data type: COXT_NAFKZXOptional: Yes
Call by Reference: Yes
I_NOMAT -
Data type: COXT_NOMATOptional: Yes
Call by Reference: No ( called with pass by value option)
I_NOMATX -
Data type: COXT_NOMATXOptional: Yes
Call by Reference: Yes
I_NFUML -
Data type: COXT_NFUMLOptional: Yes
Call by Reference: No ( called with pass by value option)
I_NFUMLX -
Data type: COXT_NFUMLXOptional: Yes
Call by Reference: Yes
I_NFPKZ -
Data type: COXT_NFPKZOptional: Yes
Call by Reference: No ( called with pass by value option)
I_NFPKZX -
Data type: COXT_NFPKZXOptional: Yes
Call by Reference: Yes
IS_CONF_QUAN -
Data type: COXT_S_QUANTITYOptional: Yes
Call by Reference: Yes
I_NOMNG -
Data type: COXT_NOMNGOptional: Yes
Call by Reference: No ( called with pass by value option)
I_NOMNGX -
Data type: COXT_NOMNGXOptional: Yes
Call by Reference: Yes
IS_CONF_QUANX -
Data type: COXT_S_QUANTITYXOptional: Yes
Call by Reference: Yes
I_OPERATION - Operation Counter
Data type: AFVC-APLZLOptional: No
Call by Reference: Yes
I_SEQUENCE - Sequence
Data type: AFVC-PLNFLOptional: Yes
Call by Reference: Yes
IS_STORAGE_LOCATION -
Data type: COXT_S_STORAGE_LOCATIONOptional: No
Call by Reference: Yes
IS_STORAGE_LOCATIONX -
Data type: COXT_S_STORAGE_LOCATIONXOptional: No
Call by Reference: Yes
EXPORTING Parameters details for CO_XT_COMPONENT_ADD
ES_AFPO - Document structure for order items
Data type: AFPOBOptional: No
Call by Reference: Yes
ES_ISSUEDATE -
Data type: COXT_S_DATEOptional: No
Call by Reference: Yes
ES_BAPIRETURN -
Data type: COXT_BAPIRETURNOptional: No
Call by Reference: Yes
E_ERROR_OCCURRED - Generic Type
Data type: COptional: No
Call by Reference: Yes
ES_RESBD_CREATED - Reservation/Dependent requirements
Data type: RESBDOptional: No
Call by Reference: Yes
TABLES Parameters details for CO_XT_COMPONENT_ADD
RESBT_EXP - Reservation/Dependent Requirements
Data type: RESBBOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for CO_XT_COMPONENT_ADD 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_es_afpo | TYPE AFPOB, " | |||
| lt_resbt_exp | TYPE STANDARD TABLE OF RESBB, " | |||
| lv_is_order_key | TYPE COXT_ORD_KEY, " | |||
| lv_i_batch | TYPE COXT_BATCH, " | |||
| lv_i_batchx | TYPE COXT_BATCHX, " | |||
| lv_i_cuobj | TYPE COXT_CONFIG_OBJECT, " | |||
| lv_i_cuobjx | TYPE COXT_CONFIG_OBJECTX, " | |||
| lv_i_batch_sel_cuobj | TYPE COXT_CONFIG_OBJECT, " | |||
| lv_i_batch_sel_cuobjx | TYPE COXT_CONFIG_OBJECTX, " | |||
| lv_i_postp | TYPE RESB-POSTP, " | |||
| lv_i_kzkup | TYPE RESB-KZKUP, " | |||
| lv_i_kzkupx | TYPE COXT_BAPIUPDATE, " | |||
| lv_i_xfehl | TYPE RESB-XFEHL, " | |||
| lv_i_material | TYPE COXT_MATERIAL, " | |||
| lv_es_issuedate | TYPE COXT_S_DATE, " | |||
| lv_i_xfehlx | TYPE COXT_BAPIUPDATE, " | |||
| lv_i_sobkz | TYPE COXT_SOBKZ, " | |||
| lv_i_sobkzx | TYPE COXT_SOBKZX, " | |||
| lv_i_kdauf | TYPE COXT_KDAUF, " | |||
| lv_i_kdaufx | TYPE COXT_KDAUFX, " | |||
| lv_i_kdpos | TYPE COXT_KDPOS, " | |||
| lv_i_kdposx | TYPE COXT_KDPOSX, " | |||
| lv_i_pspel | TYPE COXT_PSPEL, " | |||
| lv_i_pspelx | TYPE COXT_PSPELX, " | |||
| lv_i_posno | TYPE CIF_R3RES-POSITIONNO, " | |||
| lv_is_requ_quan | TYPE COXT_S_QUANTITY, " | |||
| lv_es_bapireturn | TYPE COXT_BAPIRETURN, " | |||
| lv_i_kzaus | TYPE COXT_KZAUS, " | |||
| lv_i_kzausx | TYPE COXT_KZAUSX, " | |||
| lv_i_nafkz | TYPE COXT_NAFKZ, " | |||
| lv_i_nafkzx | TYPE COXT_NAFKZX, " | |||
| lv_i_nomat | TYPE COXT_NOMAT, " | |||
| lv_i_nomatx | TYPE COXT_NOMATX, " | |||
| lv_i_nfuml | TYPE COXT_NFUML, " | |||
| lv_i_nfumlx | TYPE COXT_NFUMLX, " | |||
| lv_i_nfpkz | TYPE COXT_NFPKZ, " | |||
| lv_i_nfpkzx | TYPE COXT_NFPKZX, " | |||
| lv_is_conf_quan | TYPE COXT_S_QUANTITY, " | |||
| lv_e_error_occurred | TYPE C, " | |||
| lv_i_nomng | TYPE COXT_NOMNG, " | |||
| lv_i_nomngx | TYPE COXT_NOMNGX, " | |||
| lv_is_conf_quanx | TYPE COXT_S_QUANTITYX, " | |||
| lv_es_resbd_created | TYPE RESBD, " | |||
| lv_i_operation | TYPE AFVC-APLZL, " | |||
| lv_i_sequence | TYPE AFVC-PLNFL, " | |||
| lv_is_storage_location | TYPE COXT_S_STORAGE_LOCATION, " | |||
| lv_is_storage_locationx | TYPE COXT_S_STORAGE_LOCATIONX. " |
|   CALL FUNCTION 'CO_XT_COMPONENT_ADD' "NOTRANSL: Anlegen von Komponenten für Fertigungsaufträge |
| EXPORTING | ||
| IS_ORDER_KEY | = lv_is_order_key | |
| I_BATCH | = lv_i_batch | |
| I_BATCHX | = lv_i_batchx | |
| I_CUOBJ | = lv_i_cuobj | |
| I_CUOBJX | = lv_i_cuobjx | |
| I_BATCH_SEL_CUOBJ | = lv_i_batch_sel_cuobj | |
| I_BATCH_SEL_CUOBJX | = lv_i_batch_sel_cuobjx | |
| I_POSTP | = lv_i_postp | |
| I_KZKUP | = lv_i_kzkup | |
| I_KZKUPX | = lv_i_kzkupx | |
| I_XFEHL | = lv_i_xfehl | |
| I_MATERIAL | = lv_i_material | |
| I_XFEHLX | = lv_i_xfehlx | |
| I_SOBKZ | = lv_i_sobkz | |
| I_SOBKZX | = lv_i_sobkzx | |
| I_KDAUF | = lv_i_kdauf | |
| I_KDAUFX | = lv_i_kdaufx | |
| I_KDPOS | = lv_i_kdpos | |
| I_KDPOSX | = lv_i_kdposx | |
| I_PSPEL | = lv_i_pspel | |
| I_PSPELX | = lv_i_pspelx | |
| I_POSNO | = lv_i_posno | |
| IS_REQU_QUAN | = lv_is_requ_quan | |
| I_KZAUS | = lv_i_kzaus | |
| I_KZAUSX | = lv_i_kzausx | |
| I_NAFKZ | = lv_i_nafkz | |
| I_NAFKZX | = lv_i_nafkzx | |
| I_NOMAT | = lv_i_nomat | |
| I_NOMATX | = lv_i_nomatx | |
| I_NFUML | = lv_i_nfuml | |
| I_NFUMLX | = lv_i_nfumlx | |
| I_NFPKZ | = lv_i_nfpkz | |
| I_NFPKZX | = lv_i_nfpkzx | |
| IS_CONF_QUAN | = lv_is_conf_quan | |
| I_NOMNG | = lv_i_nomng | |
| I_NOMNGX | = lv_i_nomngx | |
| IS_CONF_QUANX | = lv_is_conf_quanx | |
| I_OPERATION | = lv_i_operation | |
| I_SEQUENCE | = lv_i_sequence | |
| IS_STORAGE_LOCATION | = lv_is_storage_location | |
| IS_STORAGE_LOCATIONX | = lv_is_storage_locationx | |
| IMPORTING | ||
| ES_AFPO | = lv_es_afpo | |
| ES_ISSUEDATE | = lv_es_issuedate | |
| ES_BAPIRETURN | = lv_es_bapireturn | |
| E_ERROR_OCCURRED | = lv_e_error_occurred | |
| ES_RESBD_CREATED | = lv_es_resbd_created | |
| TABLES | ||
| RESBT_EXP | = lt_resbt_exp | |
| . " CO_XT_COMPONENT_ADD | ||
ABAP code using 7.40 inline data declarations to call FM CO_XT_COMPONENT_ADD
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 POSTP FROM RESB INTO @DATA(ld_i_postp). | ||||
| "SELECT single KZKUP FROM RESB INTO @DATA(ld_i_kzkup). | ||||
| "SELECT single XFEHL FROM RESB INTO @DATA(ld_i_xfehl). | ||||
| "SELECT single POSITIONNO FROM CIF_R3RES INTO @DATA(ld_i_posno). | ||||
| "SELECT single APLZL FROM AFVC INTO @DATA(ld_i_operation). | ||||
| "SELECT single PLNFL FROM AFVC INTO @DATA(ld_i_sequence). | ||||
Search for further information about these or an SAP related objects