SAP CTMW_MATRIX Function Module for Matrix 4.0
CTMW_MATRIX is a standard ctmw matrix SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Matrix 4.0 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 ctmw matrix FM, simply by entering the name CTMW_MATRIX into the relevant SAP transaction such as SE37 or SE38.
Function Group: CTMW
Program Name: SAPLCTMW
Main Program: SAPLCTMW
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CTMW_MATRIX 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 'CTMW_MATRIX'"Matrix 4.0.
EXPORTING
APPLICATION = "
* PF3_POSI = "
* PF8_POSI = "
* PF11_POSI = "
* PF12_POSI = "
* PF15_POSI = "
* XY_CHANGE_POSI = "
* DISPLAY_ONLY = "
* CHECK_EXIT = "
INCLUDE_HEADER = "
START_MODE = "
* TITEL = "
* NODELIST_TITEL = "
* STATUS_PROG = "
* STATUS = "
* BUTTON_01 = "
* BUTTON_02 = "
IMPORTING
RETURN_WITH_FUNCTION = "
CHANGING
VAR_MSEL = "
TABLES
* VAR_ART = "
* VAR_WSEL = "
VB_CHAR = "
VB_VAL = "
MODES = "
* LIST_HEADER = "
* OK_CODES = "
EXCEPTIONS
MATRIX_CANCELLED = 1
IMPORTING Parameters details for CTMW_MATRIX
APPLICATION -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PF3_POSI -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
PF8_POSI -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
PF11_POSI -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
PF12_POSI -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
PF15_POSI -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
XY_CHANGE_POSI -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
DISPLAY_ONLY -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
CHECK_EXIT -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
INCLUDE_HEADER -
Data type: INCL_BILDOptional: No
Call by Reference: No ( called with pass by value option)
START_MODE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TITEL -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
NODELIST_TITEL -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
STATUS_PROG -
Data type: RSMPE-PROGRAMOptional: Yes
Call by Reference: No ( called with pass by value option)
STATUS -
Data type: SY-PFKEYOptional: Yes
Call by Reference: No ( called with pass by value option)
BUTTON_01 -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
BUTTON_02 -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CTMW_MATRIX
RETURN_WITH_FUNCTION -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for CTMW_MATRIX
VAR_MSEL -
Data type: MATRX_MSELOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CTMW_MATRIX
VAR_ART -
Data type: MTRX_VARTOptional: Yes
Call by Reference: No ( called with pass by value option)
VAR_WSEL -
Data type: MTRX_WSELOptional: Yes
Call by Reference: No ( called with pass by value option)
VB_CHAR -
Data type: MTRX_CHAROptional: No
Call by Reference: No ( called with pass by value option)
VB_VAL -
Data type: MTRX_VALIOptional: No
Call by Reference: No ( called with pass by value option)
MODES -
Data type: MTRX_MODEOptional: No
Call by Reference: No ( called with pass by value option)
LIST_HEADER -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
OK_CODES -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
MATRIX_CANCELLED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CTMW_MATRIX 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: | ||||
| lt_var_art | TYPE STANDARD TABLE OF MTRX_VART, " | |||
| lv_var_msel | TYPE MATRX_MSEL, " | |||
| lv_application | TYPE MATRX_MSEL, " | |||
| lv_matrix_cancelled | TYPE MATRX_MSEL, " | |||
| lv_return_with_function | TYPE MATRX_MSEL, " | |||
| lv_pf3_posi | TYPE MATRX_MSEL, " | |||
| lv_pf8_posi | TYPE MATRX_MSEL, " | |||
| lv_pf11_posi | TYPE MATRX_MSEL, " | |||
| lv_pf12_posi | TYPE MATRX_MSEL, " | |||
| lv_pf15_posi | TYPE MATRX_MSEL, " | |||
| lv_xy_change_posi | TYPE MATRX_MSEL, " | |||
| lv_display_only | TYPE MATRX_MSEL, " | |||
| lv_check_exit | TYPE MATRX_MSEL, " | |||
| lt_var_wsel | TYPE STANDARD TABLE OF MTRX_WSEL, " | |||
| lv_include_header | TYPE INCL_BILD, " | |||
| lt_vb_char | TYPE STANDARD TABLE OF MTRX_CHAR, " | |||
| lv_start_mode | TYPE MTRX_CHAR, " | |||
| lv_titel | TYPE MTRX_CHAR, " | |||
| lt_vb_val | TYPE STANDARD TABLE OF MTRX_VALI, " | |||
| lt_modes | TYPE STANDARD TABLE OF MTRX_MODE, " | |||
| lv_nodelist_titel | TYPE MTRX_MODE, " | |||
| lt_list_header | TYPE STANDARD TABLE OF MTRX_MODE, " | |||
| lv_status_prog | TYPE RSMPE-PROGRAM, " | |||
| lv_status | TYPE SY-PFKEY, " | |||
| lt_ok_codes | TYPE STANDARD TABLE OF SY, " | |||
| lv_button_01 | TYPE SY, " | |||
| lv_button_02 | TYPE SY. " |
|   CALL FUNCTION 'CTMW_MATRIX' "Matrix 4.0 |
| EXPORTING | ||
| APPLICATION | = lv_application | |
| PF3_POSI | = lv_pf3_posi | |
| PF8_POSI | = lv_pf8_posi | |
| PF11_POSI | = lv_pf11_posi | |
| PF12_POSI | = lv_pf12_posi | |
| PF15_POSI | = lv_pf15_posi | |
| XY_CHANGE_POSI | = lv_xy_change_posi | |
| DISPLAY_ONLY | = lv_display_only | |
| CHECK_EXIT | = lv_check_exit | |
| INCLUDE_HEADER | = lv_include_header | |
| START_MODE | = lv_start_mode | |
| TITEL | = lv_titel | |
| NODELIST_TITEL | = lv_nodelist_titel | |
| STATUS_PROG | = lv_status_prog | |
| STATUS | = lv_status | |
| BUTTON_01 | = lv_button_01 | |
| BUTTON_02 | = lv_button_02 | |
| IMPORTING | ||
| RETURN_WITH_FUNCTION | = lv_return_with_function | |
| CHANGING | ||
| VAR_MSEL | = lv_var_msel | |
| TABLES | ||
| VAR_ART | = lt_var_art | |
| VAR_WSEL | = lt_var_wsel | |
| VB_CHAR | = lt_vb_char | |
| VB_VAL | = lt_vb_val | |
| MODES | = lt_modes | |
| LIST_HEADER | = lt_list_header | |
| OK_CODES | = lt_ok_codes | |
| EXCEPTIONS | ||
| MATRIX_CANCELLED = 1 | ||
| . " CTMW_MATRIX | ||
ABAP code using 7.40 inline data declarations to call FM CTMW_MATRIX
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 PROGRAM FROM RSMPE INTO @DATA(ld_status_prog). | ||||
| "SELECT single PFKEY FROM SY INTO @DATA(ld_status). | ||||
Search for further information about these or an SAP related objects