SAP MATERIAL_CHANGE_CHECK Function Module for Check whether changes made to material
MATERIAL_CHANGE_CHECK is a standard material change check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check whether changes made to material 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 material change check FM, simply by entering the name MATERIAL_CHANGE_CHECK into the relevant SAP transaction such as SE37 or SE38.
Function Group: MGMU
Program Name: SAPLMGMU
Main Program: SAPLMGMU
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MATERIAL_CHANGE_CHECK 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 'MATERIAL_CHANGE_CHECK'"Check whether changes made to material.
EXPORTING
* IRMMG1 = "Material no., org. levels, ...
* IRMMG2 = "General (update) flags
* FLG_UEBERNAHME = ' ' "
FLG_ALLES_PRUEFEN = "If empty: check only FLG_AENDERUNG_GES
* AKTYP = "Activity Type
* MARA_MEINS = "Base unit of measure (nec. due to LHMNG checks)
* MARC_PERKZ = "
* OMARC_PERKZ = "
FLG_PUFFER = "Indicator: Check on buffer basis (MG21..
IMPORTING
FLG_AENDERUNG_GES = "Indicator: Some change was made
UPD_MLGT = "
UPD_MPGD = "
UPD_MVKE = "
UPD_MPOP = "
UPD_DMLAN = "
UPD_DMARM = "
UPD_DMEAN = "
UPD_DMAKT = "
UPD_DGESV = "
UPD_DUNGV = "
FLG_AENDERUNG_AEN = "Indicator: Create change documents
UPD_DPROW = "
UPD_DMKAL = "
UPD_DMAPE = "
UPD_PROGN_MESSAGES = "
UPD_DQMAT = "
LHMG1_BME = "Loading equipment quantity 1 in relation to base unit of measure
LHMG2_BME = " - ' - 2 - ' -
LHMG3_BME = " - ' - 3 - ' -
FLG_AENDERUNG_MAT = "Indicator: Changes to material master structures
UPD_MARA = "Indicator: MARA changed
UPD_MARC = "
UPD_MARD = "
UPD_MBEW = "
UPD_MFHM = "
UPD_MLGN = "
CHANGING
* KZTEXT_SICHERN = "Indicator: Text changed
TABLES
* MTAB = "Table of maintenance tables for operation status
* OSTEUMMTAB = "
* TPROW = "
* OPROW = "
* TGES_VERBTAB = "
* OGES_VERBTAB = "
* TUNG_VERBTAB = "
* OUNG_VERBTAB = "
* TMEAN_ME_TAB = "
* OMEAN_ME_TAB = "
* TMAPETAB = "
* WCDTXT_MATERIAL = "Change documents: Text changes
* OMAPETAB = "
* MEINH = "Units of measure
* OMEINH = "
* KTEXT = "
* OKTEXT = "
* TSTEUERTAB = "
* OSTEUERTAB = "
* TSTEUMMTAB = "
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLMGMU_001 Enhancements for Material Master Tables
IMPORTING Parameters details for MATERIAL_CHANGE_CHECK
IRMMG1 - Material no., org. levels, ...
Data type: RMMG1Optional: Yes
Call by Reference: No ( called with pass by value option)
IRMMG2 - General (update) flags
Data type: RMMG2Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_UEBERNAHME -
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_ALLES_PRUEFEN - If empty: check only FLG_AENDERUNG_GES
Data type: SY-DATAROptional: No
Call by Reference: No ( called with pass by value option)
AKTYP - Activity Type
Data type: T130M-AKTYPOptional: Yes
Call by Reference: No ( called with pass by value option)
MARA_MEINS - Base unit of measure (nec. due to LHMNG checks)
Data type: MARA-MEINSOptional: Yes
Call by Reference: No ( called with pass by value option)
MARC_PERKZ -
Data type: MARC-PERKZOptional: Yes
Call by Reference: No ( called with pass by value option)
OMARC_PERKZ -
Data type: MARC-PERKZOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_PUFFER - Indicator: Check on buffer basis (MG21..
Data type: SY-DATAROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MATERIAL_CHANGE_CHECK
FLG_AENDERUNG_GES - Indicator: Some change was made
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_MLGT -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_MPGD -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_MVKE -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_MPOP -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_DMLAN -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_DMARM -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_DMEAN -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_DMAKT -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_DGESV -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_DUNGV -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
FLG_AENDERUNG_AEN - Indicator: Create change documents
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_DPROW -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_DMKAL -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_DMAPE -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_PROGN_MESSAGES -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_DQMAT -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
LHMG1_BME - Loading equipment quantity 1 in relation to base unit of measure
Data type: MLGN-LHMG1Optional: No
Call by Reference: No ( called with pass by value option)
LHMG2_BME - - ' - 2 - ' -
Data type: MLGN-LHMG2Optional: No
Call by Reference: No ( called with pass by value option)
LHMG3_BME - - ' - 3 - ' -
Data type: MLGN-LHMG3Optional: No
Call by Reference: No ( called with pass by value option)
FLG_AENDERUNG_MAT - Indicator: Changes to material master structures
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_MARA - Indicator: MARA changed
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_MARC -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_MARD -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_MBEW -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_MFHM -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
UPD_MLGN -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for MATERIAL_CHANGE_CHECK
KZTEXT_SICHERN - Indicator: Text changed
Data type: SY-MARKYOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MATERIAL_CHANGE_CHECK
MTAB - Table of maintenance tables for operation status
Data type: SPTAPOptional: Yes
Call by Reference: No ( called with pass by value option)
OSTEUMMTAB -
Data type: MG03STEUMMOptional: Yes
Call by Reference: No ( called with pass by value option)
TPROW -
Data type: PROWFAOptional: Yes
Call by Reference: No ( called with pass by value option)
OPROW -
Data type: PROWFAOptional: Yes
Call by Reference: No ( called with pass by value option)
TGES_VERBTAB -
Data type: SVERBTABAOptional: Yes
Call by Reference: No ( called with pass by value option)
OGES_VERBTAB -
Data type: SVERBTABAOptional: Yes
Call by Reference: No ( called with pass by value option)
TUNG_VERBTAB -
Data type: SVERBTABAOptional: Yes
Call by Reference: No ( called with pass by value option)
OUNG_VERBTAB -
Data type: SVERBTABAOptional: Yes
Call by Reference: No ( called with pass by value option)
TMEAN_ME_TAB -
Data type: MEANIOptional: Yes
Call by Reference: No ( called with pass by value option)
OMEAN_ME_TAB -
Data type: MEANIOptional: Yes
Call by Reference: No ( called with pass by value option)
TMAPETAB -
Data type: MAPEOptional: Yes
Call by Reference: No ( called with pass by value option)
WCDTXT_MATERIAL - Change documents: Text changes
Data type: CDTXTOptional: Yes
Call by Reference: No ( called with pass by value option)
OMAPETAB -
Data type: MAPEOptional: Yes
Call by Reference: No ( called with pass by value option)
MEINH - Units of measure
Data type: SMEINHOptional: Yes
Call by Reference: No ( called with pass by value option)
OMEINH -
Data type: SMEINHOptional: Yes
Call by Reference: No ( called with pass by value option)
KTEXT -
Data type: SKTEXTOptional: Yes
Call by Reference: No ( called with pass by value option)
OKTEXT -
Data type: SKTEXTOptional: Yes
Call by Reference: No ( called with pass by value option)
TSTEUERTAB -
Data type: MG03STEUEROptional: Yes
Call by Reference: No ( called with pass by value option)
OSTEUERTAB -
Data type: MG03STEUEROptional: Yes
Call by Reference: No ( called with pass by value option)
TSTEUMMTAB -
Data type: MG03STEUMMOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MATERIAL_CHANGE_CHECK 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_mtab | TYPE STANDARD TABLE OF SPTAP, " | |||
| lv_irmmg1 | TYPE RMMG1, " | |||
| lv_kztext_sichern | TYPE SY-MARKY, " | |||
| lv_flg_aenderung_ges | TYPE SY-MARKY, " | |||
| lv_upd_mlgt | TYPE SY-MARKY, " | |||
| lt_osteummtab | TYPE STANDARD TABLE OF MG03STEUMM, " | |||
| lt_tprow | TYPE STANDARD TABLE OF PROWFA, " | |||
| lv_upd_mpgd | TYPE SY-MARKY, " | |||
| lt_oprow | TYPE STANDARD TABLE OF PROWFA, " | |||
| lv_upd_mvke | TYPE SY-MARKY, " | |||
| lv_upd_mpop | TYPE SY-MARKY, " | |||
| lt_tges_verbtab | TYPE STANDARD TABLE OF SVERBTABA, " | |||
| lv_upd_dmlan | TYPE SY-MARKY, " | |||
| lt_oges_verbtab | TYPE STANDARD TABLE OF SVERBTABA, " | |||
| lv_upd_dmarm | TYPE SY-MARKY, " | |||
| lt_tung_verbtab | TYPE STANDARD TABLE OF SVERBTABA, " | |||
| lv_upd_dmean | TYPE SY-MARKY, " | |||
| lt_oung_verbtab | TYPE STANDARD TABLE OF SVERBTABA, " | |||
| lv_upd_dmakt | TYPE SY-MARKY, " | |||
| lt_tmean_me_tab | TYPE STANDARD TABLE OF MEANI, " | |||
| lv_upd_dgesv | TYPE SY-MARKY, " | |||
| lt_omean_me_tab | TYPE STANDARD TABLE OF MEANI, " | |||
| lt_tmapetab | TYPE STANDARD TABLE OF MAPE, " | |||
| lv_upd_dungv | TYPE SY-MARKY, " | |||
| lv_irmmg2 | TYPE RMMG2, " | |||
| lt_wcdtxt_material | TYPE STANDARD TABLE OF CDTXT, " | |||
| lv_flg_aenderung_aen | TYPE SY-MARKY, " | |||
| lt_omapetab | TYPE STANDARD TABLE OF MAPE, " | |||
| lv_upd_dprow | TYPE SY-MARKY, " | |||
| lv_upd_dmkal | TYPE SY-MARKY, " | |||
| lv_upd_dmape | TYPE SY-MARKY, " | |||
| lv_upd_progn_messages | TYPE SY-MARKY, " | |||
| lv_upd_dqmat | TYPE SY-MARKY, " | |||
| lv_lhmg1_bme | TYPE MLGN-LHMG1, " | |||
| lv_lhmg2_bme | TYPE MLGN-LHMG2, " | |||
| lv_lhmg3_bme | TYPE MLGN-LHMG3, " | |||
| lt_meinh | TYPE STANDARD TABLE OF SMEINH, " | |||
| lv_flg_uebernahme | TYPE T130F-KZREF, " SPACE | |||
| lv_flg_aenderung_mat | TYPE SY-MARKY, " | |||
| lt_omeinh | TYPE STANDARD TABLE OF SMEINH, " | |||
| lv_upd_mara | TYPE SY-MARKY, " | |||
| lv_flg_alles_pruefen | TYPE SY-DATAR, " | |||
| lv_aktyp | TYPE T130M-AKTYP, " | |||
| lt_ktext | TYPE STANDARD TABLE OF SKTEXT, " | |||
| lv_upd_marc | TYPE SY-MARKY, " | |||
| lt_oktext | TYPE STANDARD TABLE OF SKTEXT, " | |||
| lv_upd_mard | TYPE SY-MARKY, " | |||
| lv_mara_meins | TYPE MARA-MEINS, " | |||
| lv_upd_mbew | TYPE SY-MARKY, " | |||
| lv_marc_perkz | TYPE MARC-PERKZ, " | |||
| lt_tsteuertab | TYPE STANDARD TABLE OF MG03STEUER, " | |||
| lv_upd_mfhm | TYPE SY-MARKY, " | |||
| lt_osteuertab | TYPE STANDARD TABLE OF MG03STEUER, " | |||
| lv_omarc_perkz | TYPE MARC-PERKZ, " | |||
| lv_upd_mlgn | TYPE SY-MARKY, " | |||
| lv_flg_puffer | TYPE SY-DATAR, " | |||
| lt_tsteummtab | TYPE STANDARD TABLE OF MG03STEUMM. " |
|   CALL FUNCTION 'MATERIAL_CHANGE_CHECK' "Check whether changes made to material |
| EXPORTING | ||
| IRMMG1 | = lv_irmmg1 | |
| IRMMG2 | = lv_irmmg2 | |
| FLG_UEBERNAHME | = lv_flg_uebernahme | |
| FLG_ALLES_PRUEFEN | = lv_flg_alles_pruefen | |
| AKTYP | = lv_aktyp | |
| MARA_MEINS | = lv_mara_meins | |
| MARC_PERKZ | = lv_marc_perkz | |
| OMARC_PERKZ | = lv_omarc_perkz | |
| FLG_PUFFER | = lv_flg_puffer | |
| IMPORTING | ||
| FLG_AENDERUNG_GES | = lv_flg_aenderung_ges | |
| UPD_MLGT | = lv_upd_mlgt | |
| UPD_MPGD | = lv_upd_mpgd | |
| UPD_MVKE | = lv_upd_mvke | |
| UPD_MPOP | = lv_upd_mpop | |
| UPD_DMLAN | = lv_upd_dmlan | |
| UPD_DMARM | = lv_upd_dmarm | |
| UPD_DMEAN | = lv_upd_dmean | |
| UPD_DMAKT | = lv_upd_dmakt | |
| UPD_DGESV | = lv_upd_dgesv | |
| UPD_DUNGV | = lv_upd_dungv | |
| FLG_AENDERUNG_AEN | = lv_flg_aenderung_aen | |
| UPD_DPROW | = lv_upd_dprow | |
| UPD_DMKAL | = lv_upd_dmkal | |
| UPD_DMAPE | = lv_upd_dmape | |
| UPD_PROGN_MESSAGES | = lv_upd_progn_messages | |
| UPD_DQMAT | = lv_upd_dqmat | |
| LHMG1_BME | = lv_lhmg1_bme | |
| LHMG2_BME | = lv_lhmg2_bme | |
| LHMG3_BME | = lv_lhmg3_bme | |
| FLG_AENDERUNG_MAT | = lv_flg_aenderung_mat | |
| UPD_MARA | = lv_upd_mara | |
| UPD_MARC | = lv_upd_marc | |
| UPD_MARD | = lv_upd_mard | |
| UPD_MBEW | = lv_upd_mbew | |
| UPD_MFHM | = lv_upd_mfhm | |
| UPD_MLGN | = lv_upd_mlgn | |
| CHANGING | ||
| KZTEXT_SICHERN | = lv_kztext_sichern | |
| TABLES | ||
| MTAB | = lt_mtab | |
| OSTEUMMTAB | = lt_osteummtab | |
| TPROW | = lt_tprow | |
| OPROW | = lt_oprow | |
| TGES_VERBTAB | = lt_tges_verbtab | |
| OGES_VERBTAB | = lt_oges_verbtab | |
| TUNG_VERBTAB | = lt_tung_verbtab | |
| OUNG_VERBTAB | = lt_oung_verbtab | |
| TMEAN_ME_TAB | = lt_tmean_me_tab | |
| OMEAN_ME_TAB | = lt_omean_me_tab | |
| TMAPETAB | = lt_tmapetab | |
| WCDTXT_MATERIAL | = lt_wcdtxt_material | |
| OMAPETAB | = lt_omapetab | |
| MEINH | = lt_meinh | |
| OMEINH | = lt_omeinh | |
| KTEXT | = lt_ktext | |
| OKTEXT | = lt_oktext | |
| TSTEUERTAB | = lt_tsteuertab | |
| OSTEUERTAB | = lt_osteuertab | |
| TSTEUMMTAB | = lt_tsteummtab | |
| . " MATERIAL_CHANGE_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM MATERIAL_CHANGE_CHECK
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 MARKY FROM SY INTO @DATA(ld_kztext_sichern). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_flg_aenderung_ges). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_mlgt). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_mpgd). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_mvke). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_mpop). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_dmlan). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_dmarm). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_dmean). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_dmakt). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_dgesv). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_dungv). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_flg_aenderung_aen). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_dprow). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_dmkal). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_dmape). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_progn_messages). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_dqmat). | ||||
| "SELECT single LHMG1 FROM MLGN INTO @DATA(ld_lhmg1_bme). | ||||
| "SELECT single LHMG2 FROM MLGN INTO @DATA(ld_lhmg2_bme). | ||||
| "SELECT single LHMG3 FROM MLGN INTO @DATA(ld_lhmg3_bme). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flg_uebernahme). | ||||
| DATA(ld_flg_uebernahme) | = ' '. | |||
| "SELECT single MARKY FROM SY INTO @DATA(ld_flg_aenderung_mat). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_mara). | ||||
| "SELECT single DATAR FROM SY INTO @DATA(ld_flg_alles_pruefen). | ||||
| "SELECT single AKTYP FROM T130M INTO @DATA(ld_aktyp). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_marc). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_mard). | ||||
| "SELECT single MEINS FROM MARA INTO @DATA(ld_mara_meins). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_mbew). | ||||
| "SELECT single PERKZ FROM MARC INTO @DATA(ld_marc_perkz). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_mfhm). | ||||
| "SELECT single PERKZ FROM MARC INTO @DATA(ld_omarc_perkz). | ||||
| "SELECT single MARKY FROM SY INTO @DATA(ld_upd_mlgn). | ||||
| "SELECT single DATAR FROM SY INTO @DATA(ld_flg_puffer). | ||||
Search for further information about these or an SAP related objects