SAP CO_OCM_RU_CONFIRM_SWITCH_EXE Function Module for NOTRANSL: Umhängen der Rückmeldungen/Warenbewegungen beim Separieren









CO_OCM_RU_CONFIRM_SWITCH_EXE is a standard co ocm ru confirm switch exe 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: Umhängen der Rückmeldungen/Warenbewegungen beim Separieren 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 ru confirm switch exe FM, simply by entering the name CO_OCM_RU_CONFIRM_SWITCH_EXE into the relevant SAP transaction such as SE37 or SE38.

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



Function CO_OCM_RU_CONFIRM_SWITCH_EXE 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_RU_CONFIRM_SWITCH_EXE'"NOTRANSL: Umhängen der Rückmeldungen/Warenbewegungen beim Separieren
EXPORTING
* I_AUFNR_MOVE = "Order Number
* I_VBELN_NEW = "Sales Document
* I_POSNR_NEW = "Sales document item
* I_RSNUM_NEW = "Number of Reservation / Dependent Requirement
* I_RSPOS_NEW = "Number of Order Item
* I_RSNUM_SEPA = "Number of Reservation / Dependent Requirement
* I_RSPOS_SEPA = "Number of Order Item

TABLES
* ET_MSEG = "Document Segment: Material
* ET_AFWI = "Subsequently posted goods movements for confirmations
* IT_MSEG = "Document Segment: Material

EXCEPTIONS
ERROR = 1 NOTHING_FOUND = 2 NOTHING_TO_DO = 3
.



IMPORTING Parameters details for CO_OCM_RU_CONFIRM_SWITCH_EXE

I_AUFNR_MOVE - Order Number

Data type: AFKO-AUFNR
Optional: Yes
Call by Reference: Yes

I_VBELN_NEW - Sales Document

Data type: VBAP-VBELN
Optional: Yes
Call by Reference: Yes

I_POSNR_NEW - Sales document item

Data type: VBAP-POSNR
Optional: Yes
Call by Reference: Yes

I_RSNUM_NEW - Number of Reservation / Dependent Requirement

Data type: AFKO-ARSNR
Optional: Yes
Call by Reference: Yes

I_RSPOS_NEW - Number of Order Item

Data type: AFKO-ARSPS
Optional: Yes
Call by Reference: Yes

I_RSNUM_SEPA - Number of Reservation / Dependent Requirement

Data type: AFKO-ARSNR
Optional: Yes
Call by Reference: Yes

I_RSPOS_SEPA - Number of Order Item

Data type: AFKO-ARSPS
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for CO_OCM_RU_CONFIRM_SWITCH_EXE

ET_MSEG - Document Segment: Material

Data type: MSEG
Optional: Yes
Call by Reference: Yes

ET_AFWI - Subsequently posted goods movements for confirmations

Data type: AFWI
Optional: Yes
Call by Reference: Yes

IT_MSEG - Document Segment: Material

Data type: MSEG
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

ERROR -

Data type:
Optional: No
Call by Reference: Yes

NOTHING_FOUND -

Data type:
Optional: No
Call by Reference: Yes

NOTHING_TO_DO -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CO_OCM_RU_CONFIRM_SWITCH_EXE 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_error  TYPE STRING, "   
lt_et_mseg  TYPE STANDARD TABLE OF MSEG, "   
lv_i_aufnr_move  TYPE AFKO-AUFNR, "   
lt_et_afwi  TYPE STANDARD TABLE OF AFWI, "   
lv_i_vbeln_new  TYPE VBAP-VBELN, "   
lv_nothing_found  TYPE VBAP, "   
lt_it_mseg  TYPE STANDARD TABLE OF MSEG, "   
lv_i_posnr_new  TYPE VBAP-POSNR, "   
lv_nothing_to_do  TYPE VBAP, "   
lv_i_rsnum_new  TYPE AFKO-ARSNR, "   
lv_i_rspos_new  TYPE AFKO-ARSPS, "   
lv_i_rsnum_sepa  TYPE AFKO-ARSNR, "   
lv_i_rspos_sepa  TYPE AFKO-ARSPS. "   

  CALL FUNCTION 'CO_OCM_RU_CONFIRM_SWITCH_EXE'  "NOTRANSL: Umhängen der Rückmeldungen/Warenbewegungen beim Separieren
    EXPORTING
         I_AUFNR_MOVE = lv_i_aufnr_move
         I_VBELN_NEW = lv_i_vbeln_new
         I_POSNR_NEW = lv_i_posnr_new
         I_RSNUM_NEW = lv_i_rsnum_new
         I_RSPOS_NEW = lv_i_rspos_new
         I_RSNUM_SEPA = lv_i_rsnum_sepa
         I_RSPOS_SEPA = lv_i_rspos_sepa
    TABLES
         ET_MSEG = lt_et_mseg
         ET_AFWI = lt_et_afwi
         IT_MSEG = lt_it_mseg
    EXCEPTIONS
        ERROR = 1
        NOTHING_FOUND = 2
        NOTHING_TO_DO = 3
. " CO_OCM_RU_CONFIRM_SWITCH_EXE




ABAP code using 7.40 inline data declarations to call FM CO_OCM_RU_CONFIRM_SWITCH_EXE

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 AUFNR FROM AFKO INTO @DATA(ld_i_aufnr_move).
 
 
"SELECT single VBELN FROM VBAP INTO @DATA(ld_i_vbeln_new).
 
 
 
"SELECT single POSNR FROM VBAP INTO @DATA(ld_i_posnr_new).
 
 
"SELECT single ARSNR FROM AFKO INTO @DATA(ld_i_rsnum_new).
 
"SELECT single ARSPS FROM AFKO INTO @DATA(ld_i_rspos_new).
 
"SELECT single ARSNR FROM AFKO INTO @DATA(ld_i_rsnum_sepa).
 
"SELECT single ARSPS FROM AFKO INTO @DATA(ld_i_rspos_sepa).
 


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!