SAP MGW_CALL_PURCHASE_PRICE_MATRIX Function Module for Call Matrix for Purchase Price Maintenance Variants
MGW_CALL_PURCHASE_PRICE_MATRIX is a standard mgw call purchase price 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 Call Matrix for Purchase Price Maintenance Variants 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 mgw call purchase price matrix FM, simply by entering the name MGW_CALL_PURCHASE_PRICE_MATRIX into the relevant SAP transaction such as SE37 or SE38.
Function Group: MGW_PURCHASE_PRICE_MATRIX
Program Name: SAPLMGW_PURCHASE_PRICE_MATRIX
Main Program: SAPLMGW_PURCHASE_PRICE_MATRIX
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MGW_CALL_PURCHASE_PRICE_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 'MGW_CALL_PURCHASE_PRICE_MATRIX'"Call Matrix for Purchase Price Maintenance Variants.
EXPORTING
I_RMMW1 = "Material Master Maintenance: Initial Parameters (Retail)
* I_SPERRMODUS = 'E' "Type of block (shared, exclusive)
I_EINA = "Purchasing Info Record: General Data
I_EINE = "Purchasing Info Record - Purchasing Organization Data
* I_RMMW1_BEZ = "Initial Parameter Descriptions: Material Master Maintenance
* I_MAKT = "Material Descriptions
I_NEUFLAG = "Propose Field Content from the Reference
I_AKTYP = "Activity Category in the Transaction
* I_DISPLAY = ' ' "Kennzeichen Matrix nur anzeigen
* I_SUPPRESS = ' ' "Indicator: reset buffer for Material_Pre_Fetch
CHANGING
* C_EKAEND = "Checkbox
* C_F11 = "Propose Field Content from the Reference
TABLES
* T_MEINH = "Structure of Table MEINH (Created for Update Program)
EXCEPTIONS
WRONG_CALL = 1 WRONG_SATNR = 2 NO_MATRIX = 3
IMPORTING Parameters details for MGW_CALL_PURCHASE_PRICE_MATRIX
I_RMMW1 - Material Master Maintenance: Initial Parameters (Retail)
Data type: RMMW1Optional: No
Call by Reference: Yes
I_SPERRMODUS - Type of block (shared, exclusive)
Data type: TVGVI-SPERADefault: 'E'
Optional: Yes
Call by Reference: Yes
I_EINA - Purchasing Info Record: General Data
Data type: EINAOptional: No
Call by Reference: Yes
I_EINE - Purchasing Info Record - Purchasing Organization Data
Data type: EINEOptional: No
Call by Reference: Yes
I_RMMW1_BEZ - Initial Parameter Descriptions: Material Master Maintenance
Data type: RMMW1_BEZOptional: Yes
Call by Reference: Yes
I_MAKT - Material Descriptions
Data type: MAKTOptional: Yes
Call by Reference: Yes
I_NEUFLAG - Propose Field Content from the Reference
Data type: T130F-KZREFOptional: No
Call by Reference: Yes
I_AKTYP - Activity Category in the Transaction
Data type: T130M-AKTYPOptional: No
Call by Reference: Yes
I_DISPLAY - Kennzeichen Matrix nur anzeigen
Data type: MTCOM-KZRFBDefault: ' '
Optional: Yes
Call by Reference: Yes
I_SUPPRESS - Indicator: reset buffer for Material_Pre_Fetch
Data type: MTCOM-KZRFBDefault: ' '
Optional: Yes
Call by Reference: Yes
CHANGING Parameters details for MGW_CALL_PURCHASE_PRICE_MATRIX
C_EKAEND - Checkbox
Data type: RMMW3-EKAENDOptional: Yes
Call by Reference: Yes
C_F11 - Propose Field Content from the Reference
Data type: T130F-KZREFOptional: Yes
Call by Reference: Yes
TABLES Parameters details for MGW_CALL_PURCHASE_PRICE_MATRIX
T_MEINH - Structure of Table MEINH (Created for Update Program)
Data type: SMEINHOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
WRONG_CALL - Invalid Call
Data type:Optional: No
Call by Reference: Yes
WRONG_SATNR - Ungültige Artikelnummer
Data type:Optional: No
Call by Reference: Yes
NO_MATRIX - Keine Matrixausgabe
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for MGW_CALL_PURCHASE_PRICE_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: | ||||
| lv_i_rmmw1 | TYPE RMMW1, " | |||
| lt_t_meinh | TYPE STANDARD TABLE OF SMEINH, " | |||
| lv_c_ekaend | TYPE RMMW3-EKAEND, " | |||
| lv_wrong_call | TYPE RMMW3, " | |||
| lv_i_sperrmodus | TYPE TVGVI-SPERA, " 'E' | |||
| lv_c_f11 | TYPE T130F-KZREF, " | |||
| lv_i_eina | TYPE EINA, " | |||
| lv_wrong_satnr | TYPE EINA, " | |||
| lv_i_eine | TYPE EINE, " | |||
| lv_no_matrix | TYPE EINE, " | |||
| lv_i_rmmw1_bez | TYPE RMMW1_BEZ, " | |||
| lv_i_makt | TYPE MAKT, " | |||
| lv_i_neuflag | TYPE T130F-KZREF, " | |||
| lv_i_aktyp | TYPE T130M-AKTYP, " | |||
| lv_i_display | TYPE MTCOM-KZRFB, " ' ' | |||
| lv_i_suppress | TYPE MTCOM-KZRFB. " ' ' |
|   CALL FUNCTION 'MGW_CALL_PURCHASE_PRICE_MATRIX' "Call Matrix for Purchase Price Maintenance Variants |
| EXPORTING | ||
| I_RMMW1 | = lv_i_rmmw1 | |
| I_SPERRMODUS | = lv_i_sperrmodus | |
| I_EINA | = lv_i_eina | |
| I_EINE | = lv_i_eine | |
| I_RMMW1_BEZ | = lv_i_rmmw1_bez | |
| I_MAKT | = lv_i_makt | |
| I_NEUFLAG | = lv_i_neuflag | |
| I_AKTYP | = lv_i_aktyp | |
| I_DISPLAY | = lv_i_display | |
| I_SUPPRESS | = lv_i_suppress | |
| CHANGING | ||
| C_EKAEND | = lv_c_ekaend | |
| C_F11 | = lv_c_f11 | |
| TABLES | ||
| T_MEINH | = lt_t_meinh | |
| EXCEPTIONS | ||
| WRONG_CALL = 1 | ||
| WRONG_SATNR = 2 | ||
| NO_MATRIX = 3 | ||
| . " MGW_CALL_PURCHASE_PRICE_MATRIX | ||
ABAP code using 7.40 inline data declarations to call FM MGW_CALL_PURCHASE_PRICE_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 EKAEND FROM RMMW3 INTO @DATA(ld_c_ekaend). | ||||
| "SELECT single SPERA FROM TVGVI INTO @DATA(ld_i_sperrmodus). | ||||
| DATA(ld_i_sperrmodus) | = 'E'. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_c_f11). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_i_neuflag). | ||||
| "SELECT single AKTYP FROM T130M INTO @DATA(ld_i_aktyp). | ||||
| "SELECT single KZRFB FROM MTCOM INTO @DATA(ld_i_display). | ||||
| DATA(ld_i_display) | = ' '. | |||
| "SELECT single KZRFB FROM MTCOM INTO @DATA(ld_i_suppress). | ||||
| DATA(ld_i_suppress) | = ' '. | |||
Search for further information about these or an SAP related objects