SAP CO2M_COMPONENT_CHANGE_WITH_REF Function Module for NOTRANSL: Network: change component with reference









CO2M_COMPONENT_CHANGE_WITH_REF is a standard co2m component change with ref 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: Network: change component with reference 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 co2m component change with ref FM, simply by entering the name CO2M_COMPONENT_CHANGE_WITH_REF into the relevant SAP transaction such as SE37 or SE38.

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



Function CO2M_COMPONENT_CHANGE_WITH_REF 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 'CO2M_COMPONENT_CHANGE_WITH_REF'"NOTRANSL: Network: change component with reference
EXPORTING
I_RESBD_NEW = "Reservation/Dependent requirements
I_RSNUM_SOURCE = "Number of Reservation/Dependent Requirement
I_RSPOS_SOURCE = "Item Number of Reservation/Dependent Requirement
I_RSART_SOURCE = "Record type
I_OBJNR_SOURCE = "Object Number

IMPORTING
E_INDEX_BT = "ABAP System Field: Row Index of Internal Tables

EXCEPTIONS
ERROR_OCCURED = 1
.



IMPORTING Parameters details for CO2M_COMPONENT_CHANGE_WITH_REF

I_RESBD_NEW - Reservation/Dependent requirements

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

I_RSNUM_SOURCE - Number of Reservation/Dependent Requirement

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

I_RSPOS_SOURCE - Item Number of Reservation/Dependent Requirement

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

I_RSART_SOURCE - Record type

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

I_OBJNR_SOURCE - Object Number

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

EXPORTING Parameters details for CO2M_COMPONENT_CHANGE_WITH_REF

E_INDEX_BT - ABAP System Field: Row Index of Internal Tables

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

EXCEPTIONS details

ERROR_OCCURED -

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

Copy and paste ABAP code example for CO2M_COMPONENT_CHANGE_WITH_REF 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_e_index_bt  TYPE SY-TABIX, "   
lv_i_resbd_new  TYPE RESBD, "   
lv_error_occured  TYPE RESBD, "   
lv_i_rsnum_source  TYPE RESB-RSNUM, "   
lv_i_rspos_source  TYPE RESB-RSPOS, "   
lv_i_rsart_source  TYPE RESB-RSART, "   
lv_i_objnr_source  TYPE RESB-OBJNR. "   

  CALL FUNCTION 'CO2M_COMPONENT_CHANGE_WITH_REF'  "NOTRANSL: Network: change component with reference
    EXPORTING
         I_RESBD_NEW = lv_i_resbd_new
         I_RSNUM_SOURCE = lv_i_rsnum_source
         I_RSPOS_SOURCE = lv_i_rspos_source
         I_RSART_SOURCE = lv_i_rsart_source
         I_OBJNR_SOURCE = lv_i_objnr_source
    IMPORTING
         E_INDEX_BT = lv_e_index_bt
    EXCEPTIONS
        ERROR_OCCURED = 1
. " CO2M_COMPONENT_CHANGE_WITH_REF




ABAP code using 7.40 inline data declarations to call FM CO2M_COMPONENT_CHANGE_WITH_REF

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 TABIX FROM SY INTO @DATA(ld_e_index_bt).
 
 
 
"SELECT single RSNUM FROM RESB INTO @DATA(ld_i_rsnum_source).
 
"SELECT single RSPOS FROM RESB INTO @DATA(ld_i_rspos_source).
 
"SELECT single RSART FROM RESB INTO @DATA(ld_i_rsart_source).
 
"SELECT single OBJNR FROM RESB INTO @DATA(ld_i_objnr_source).
 


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!