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

Function RPM_CREATE_MATRIX_DATA 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 'RPM_CREATE_MATRIX_DATA'"Create RPM Matrixes.
EXPORTING
IV_SIMVERSION = "Name of Planning Version
* IV_RPMSESSION = "Flag for Temporary Planning Data
IV_TIMESTREAM = "GUID Reference Time Stream (can be used by multiple resources)
IT_RESOURCES = "Tables of Resource Definitions
IT_PEGAREAS = "Table for Pegging Area Key (Pegging Area and ATP Anchor)
IV_MATID = "Internal Number (UID) for Product
IV_LOCID = "Internal Number of Location (Customer, Supplier, or Plant)
IV_TRPID = "Internal Number of Source of Supply
* IT_IO = "Information About Inputs/Outputs
IMPORTING
EV_POSVAR_M_HANDLE = "Matrix Handle in liveCache
EV_STATUS_M_HANDLE = "Matrix Handle in liveCache
EXCEPTIONS
ERROR_ADD_NODES = 1 ERROR_STORE_POSVARS = 2 ERROR_CREATE_MATRIX = 3 ERROR_CREATE_DATEVECTOR = 4 ERROR_IN_IT_IO = 5
IMPORTING Parameters details for RPM_CREATE_MATRIX_DATA
IV_SIMVERSION - Name of Planning Version
Data type: /SAPAPO/OM_VRSIOIDOptional: No
Call by Reference: Yes
IV_RPMSESSION - Flag for Temporary Planning Data
Data type: RPM_SESSIONOptional: Yes
Call by Reference: Yes
IV_TIMESTREAM - GUID Reference Time Stream (can be used by multiple resources)
Data type: /SAPAPO/OM_SHARED_TSTREAMIDOptional: No
Call by Reference: Yes
IT_RESOURCES - Tables of Resource Definitions
Data type: /SAPAPO/OM_RESOURCE_TABOptional: No
Call by Reference: Yes
IT_PEGAREAS - Table for Pegging Area Key (Pegging Area and ATP Anchor)
Data type: /SAPAPO/OM_TAB_PEGAREAOptional: No
Call by Reference: Yes
IV_MATID - Internal Number (UID) for Product
Data type: /SAPAPO/OM_MATIDOptional: No
Call by Reference: Yes
IV_LOCID - Internal Number of Location (Customer, Supplier, or Plant)
Data type: /SAPAPO/OM_LOCIDOptional: No
Call by Reference: Yes
IV_TRPID - Internal Number of Source of Supply
Data type: /SAPAPO/OM_TR_TRPIDOptional: No
Call by Reference: Yes
IT_IO - Information About Inputs/Outputs
Data type: /SAPAPO/OM_IO_TABOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for RPM_CREATE_MATRIX_DATA
EV_POSVAR_M_HANDLE - Matrix Handle in liveCache
Data type: M_HANDLEOptional: No
Call by Reference: Yes
EV_STATUS_M_HANDLE - Matrix Handle in liveCache
Data type: M_HANDLEOptional: No
Call by Reference: Yes
EXCEPTIONS details
ERROR_ADD_NODES -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_STORE_POSVARS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_CREATE_MATRIX -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_CREATE_DATEVECTOR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_IN_IT_IO -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RPM_CREATE_MATRIX_DATA 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_iv_simversion | TYPE /SAPAPO/OM_VRSIOID, " | |||
| lv_error_add_nodes | TYPE /SAPAPO/OM_VRSIOID, " | |||
| lv_ev_posvar_m_handle | TYPE M_HANDLE, " | |||
| lv_iv_rpmsession | TYPE RPM_SESSION, " | |||
| lv_ev_status_m_handle | TYPE M_HANDLE, " | |||
| lv_error_store_posvars | TYPE M_HANDLE, " | |||
| lv_iv_timestream | TYPE /SAPAPO/OM_SHARED_TSTREAMID, " | |||
| lv_error_create_matrix | TYPE /SAPAPO/OM_SHARED_TSTREAMID, " | |||
| lv_it_resources | TYPE /SAPAPO/OM_RESOURCE_TAB, " | |||
| lv_error_create_datevector | TYPE /SAPAPO/OM_RESOURCE_TAB, " | |||
| lv_it_pegareas | TYPE /SAPAPO/OM_TAB_PEGAREA, " | |||
| lv_error_in_it_io | TYPE /SAPAPO/OM_TAB_PEGAREA, " | |||
| lv_iv_matid | TYPE /SAPAPO/OM_MATID, " | |||
| lv_iv_locid | TYPE /SAPAPO/OM_LOCID, " | |||
| lv_iv_trpid | TYPE /SAPAPO/OM_TR_TRPID, " | |||
| lv_it_io | TYPE /SAPAPO/OM_IO_TAB. " |
|   CALL FUNCTION 'RPM_CREATE_MATRIX_DATA' "Create RPM Matrixes |
| EXPORTING | ||
| IV_SIMVERSION | = lv_iv_simversion | |
| IV_RPMSESSION | = lv_iv_rpmsession | |
| IV_TIMESTREAM | = lv_iv_timestream | |
| IT_RESOURCES | = lv_it_resources | |
| IT_PEGAREAS | = lv_it_pegareas | |
| IV_MATID | = lv_iv_matid | |
| IV_LOCID | = lv_iv_locid | |
| IV_TRPID | = lv_iv_trpid | |
| IT_IO | = lv_it_io | |
| IMPORTING | ||
| EV_POSVAR_M_HANDLE | = lv_ev_posvar_m_handle | |
| EV_STATUS_M_HANDLE | = lv_ev_status_m_handle | |
| EXCEPTIONS | ||
| ERROR_ADD_NODES = 1 | ||
| ERROR_STORE_POSVARS = 2 | ||
| ERROR_CREATE_MATRIX = 3 | ||
| ERROR_CREATE_DATEVECTOR = 4 | ||
| ERROR_IN_IT_IO = 5 | ||
| . " RPM_CREATE_MATRIX_DATA | ||
ABAP code using 7.40 inline data declarations to call FM RPM_CREATE_MATRIX_DATA
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.Search for further information about these or an SAP related objects