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

Function UPDATE_MATERIAL 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 'UPDATE_MATERIAL'"Update function module material master.
EXPORTING
AKTVSTATUS = "Maintenance status
* FLG_AENDERUNG_MAT = ' ' "Propose Field Content from the Reference
* FLG_KALK_LOSGR = ' ' "Propose Field Content from the Reference
* FLG_KONFIGBEW = ' ' "Propose Field Content from the Reference
FLG_LVORM_BWKEY = "Propose Field Content from the Reference
FLG_LVORM_LGNUM = "Propose Field Content from the Reference
FLG_LVORM_WERKS = "Propose Field Content from the Reference
FLG_LVORM_ZENTRAL = "Propose Field Content from the Reference
FLG_PROW = "Propose Field Content from the Reference
* FLG_REVLEV = ' ' "Propose Field Content from the Reference
IMARA = "General Material Data
* ALT_MARA = "General Material Data
* IMARC = "Plant Data for Material
* IMARD = "Storage Location Data for Material
* IMBEW = "Material Valuation
* IMARV = "Material Control Record
* IMFHM = "Production Resource Tool (PRT) Fields in the Material Master
* IMLGN = "Material Data for Each Warehouse Number
* IMLGT = "Material Data for Each Storage Type
* IMVKE = "Sales Data for Material
* IMYMS = "LIFO-relevant materials
* IPGDATA = "Transfer Structure for Material Master/Product Group Dialog
* ALT_MARC = "Plant Data for Material
IT001W = "Plants/Branches
IT130M = "Transaction control parameters: material master maintenance
ITCURM = "Customizing: MM Configuration
* KZMARA_XCHPF = ' ' "Propose Field Content from the Reference
* KZ_BATCH = ' ' "ABAP System Field: Background Processing Active
MAX_PFSTATUS = "Maintenance status
MPOP = "Forecast Parameters
* NEUFLAG = ' ' "Propose Field Content from the Reference
* UPD_DGESV = ' ' "Propose Field Content from the Reference
* UPD_DPROW = ' ' "Propose Field Content from the Reference
* ALT_MARD = "Storage Location Data for Material
* UPD_DUNGV = ' ' "Propose Field Content from the Reference
* UPD_PGDATA = ' ' "Propose Field Content from the Reference
* UPD_SPDATA_V = ' ' "Propose Field Content from the Reference
* UPD_SPDATA = ' ' "Propose Field Content from the Reference
* UPD_SPDATA_A = ' ' "Propose Field Content from the Reference
* UPD_NFMAT = ' ' "Propose Field Content from the Reference
* DATAB_REVLEV = ' ' "Valid-From Date
FLGBWTTY = "Propose Field Content from the Reference
FLGMVER = "Propose Field Content from the Reference
FLGXCHAR_BEW = "Propose Field Content from the Reference
FLGXCHAR_CHPF = "Propose Field Content from the Reference
TABLES
GES_VERBTAB = "Structure of Int. Consumption Tables (for Update Program)
KTEXT = "Structure of int. table KTEXT (created for update program)
MEINH = "Structure of Table MEINH (Created for Update Program)
PTAB = "Structure of table PTAB (created for update program)
* STEUMMTAB = "Control Table: Purchasing
STEUERTAB = "Control Table
TPROWF = "Forecast Values
UNG_VERBTAB = "Structure of Int. Consumption Tables (for Update Program)
IMPORTING Parameters details for UPDATE_MATERIAL
AKTVSTATUS - Maintenance status
Data type: T130C-PSTATOptional: No
Call by Reference: No ( called with pass by value option)
FLG_AENDERUNG_MAT - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_KALK_LOSGR - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_KONFIGBEW - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_LVORM_BWKEY - Propose Field Content from the Reference
Data type: T130F-KZREFOptional: No
Call by Reference: No ( called with pass by value option)
FLG_LVORM_LGNUM - Propose Field Content from the Reference
Data type: T130F-KZREFOptional: No
Call by Reference: No ( called with pass by value option)
FLG_LVORM_WERKS - Propose Field Content from the Reference
Data type: T130F-KZREFOptional: No
Call by Reference: No ( called with pass by value option)
FLG_LVORM_ZENTRAL - Propose Field Content from the Reference
Data type: T130F-KZREFOptional: No
Call by Reference: No ( called with pass by value option)
FLG_PROW - Propose Field Content from the Reference
Data type: T130F-KZREFOptional: No
Call by Reference: No ( called with pass by value option)
FLG_REVLEV - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IMARA - General Material Data
Data type: MARAOptional: No
Call by Reference: No ( called with pass by value option)
ALT_MARA - General Material Data
Data type: MARAOptional: Yes
Call by Reference: No ( called with pass by value option)
IMARC - Plant Data for Material
Data type: MARCOptional: Yes
Call by Reference: No ( called with pass by value option)
IMARD - Storage Location Data for Material
Data type: MARDOptional: Yes
Call by Reference: No ( called with pass by value option)
IMBEW - Material Valuation
Data type: MBEWOptional: Yes
Call by Reference: No ( called with pass by value option)
IMARV - Material Control Record
Data type: MARVOptional: Yes
Call by Reference: No ( called with pass by value option)
IMFHM - Production Resource Tool (PRT) Fields in the Material Master
Data type: MFHMOptional: Yes
Call by Reference: No ( called with pass by value option)
IMLGN - Material Data for Each Warehouse Number
Data type: MLGNOptional: Yes
Call by Reference: No ( called with pass by value option)
IMLGT - Material Data for Each Storage Type
Data type: MLGTOptional: Yes
Call by Reference: No ( called with pass by value option)
IMVKE - Sales Data for Material
Data type: MVKEOptional: Yes
Call by Reference: No ( called with pass by value option)
IMYMS - LIFO-relevant materials
Data type: MYMSOptional: Yes
Call by Reference: No ( called with pass by value option)
IPGDATA - Transfer Structure for Material Master/Product Group Dialog
Data type: PGDATAOptional: Yes
Call by Reference: No ( called with pass by value option)
ALT_MARC - Plant Data for Material
Data type: MARCOptional: Yes
Call by Reference: No ( called with pass by value option)
IT001W - Plants/Branches
Data type: T001WOptional: No
Call by Reference: No ( called with pass by value option)
IT130M - Transaction control parameters: material master maintenance
Data type: T130MOptional: No
Call by Reference: No ( called with pass by value option)
ITCURM - Customizing: MM Configuration
Data type: TCURMOptional: No
Call by Reference: No ( called with pass by value option)
KZMARA_XCHPF - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
KZ_BATCH - ABAP System Field: Background Processing Active
Data type: SY-BATCHDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
MAX_PFSTATUS - Maintenance status
Data type: T130C-PSTATOptional: No
Call by Reference: No ( called with pass by value option)
MPOP - Forecast Parameters
Data type: MPOPOptional: No
Call by Reference: No ( called with pass by value option)
NEUFLAG - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
UPD_DGESV - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
UPD_DPROW - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ALT_MARD - Storage Location Data for Material
Data type: MARDOptional: Yes
Call by Reference: No ( called with pass by value option)
UPD_DUNGV - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
UPD_PGDATA - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
UPD_SPDATA_V - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
UPD_SPDATA - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
UPD_SPDATA_A - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
UPD_NFMAT - Propose Field Content from the Reference
Data type: T130F-KZREFDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATAB_REVLEV - Valid-From Date
Data type: AENR-DATUVDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLGBWTTY - Propose Field Content from the Reference
Data type: T130F-KZREFOptional: No
Call by Reference: No ( called with pass by value option)
FLGMVER - Propose Field Content from the Reference
Data type: T130F-KZREFOptional: No
Call by Reference: No ( called with pass by value option)
FLGXCHAR_BEW - Propose Field Content from the Reference
Data type: T130F-KZREFOptional: No
Call by Reference: No ( called with pass by value option)
FLGXCHAR_CHPF - Propose Field Content from the Reference
Data type: T130F-KZREFOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for UPDATE_MATERIAL
GES_VERBTAB - Structure of Int. Consumption Tables (for Update Program)
Data type: SVERBTABOptional: No
Call by Reference: No ( called with pass by value option)
KTEXT - Structure of int. table KTEXT (created for update program)
Data type: SKTEXTOptional: No
Call by Reference: No ( called with pass by value option)
MEINH - Structure of Table MEINH (Created for Update Program)
Data type: SMEINHOptional: No
Call by Reference: No ( called with pass by value option)
PTAB - Structure of table PTAB (created for update program)
Data type: SPTAPOptional: No
Call by Reference: No ( called with pass by value option)
STEUMMTAB - Control Table: Purchasing
Data type: MG03STEUMMOptional: Yes
Call by Reference: No ( called with pass by value option)
STEUERTAB - Control Table
Data type: MG03STEUEROptional: No
Call by Reference: No ( called with pass by value option)
TPROWF - Forecast Values
Data type: PROWFOptional: No
Call by Reference: No ( called with pass by value option)
UNG_VERBTAB - Structure of Int. Consumption Tables (for Update Program)
Data type: SVERBTABOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for UPDATE_MATERIAL 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_aktvstatus | TYPE T130C-PSTAT, " | |||
| lt_ges_verbtab | TYPE STANDARD TABLE OF SVERBTAB, " | |||
| lv_flg_aenderung_mat | TYPE T130F-KZREF, " SPACE | |||
| lv_flg_kalk_losgr | TYPE T130F-KZREF, " ' ' | |||
| lv_flg_konfigbew | TYPE T130F-KZREF, " SPACE | |||
| lv_flg_lvorm_bwkey | TYPE T130F-KZREF, " | |||
| lv_flg_lvorm_lgnum | TYPE T130F-KZREF, " | |||
| lv_flg_lvorm_werks | TYPE T130F-KZREF, " | |||
| lv_flg_lvorm_zentral | TYPE T130F-KZREF, " | |||
| lv_flg_prow | TYPE T130F-KZREF, " | |||
| lv_flg_revlev | TYPE T130F-KZREF, " SPACE | |||
| lv_imara | TYPE MARA, " | |||
| lt_ktext | TYPE STANDARD TABLE OF SKTEXT, " | |||
| lv_alt_mara | TYPE MARA, " | |||
| lv_imarc | TYPE MARC, " | |||
| lv_imard | TYPE MARD, " | |||
| lv_imbew | TYPE MBEW, " | |||
| lv_imarv | TYPE MARV, " | |||
| lv_imfhm | TYPE MFHM, " | |||
| lv_imlgn | TYPE MLGN, " | |||
| lv_imlgt | TYPE MLGT, " | |||
| lv_imvke | TYPE MVKE, " | |||
| lv_imyms | TYPE MYMS, " | |||
| lv_ipgdata | TYPE PGDATA, " | |||
| lt_meinh | TYPE STANDARD TABLE OF SMEINH, " | |||
| lv_alt_marc | TYPE MARC, " | |||
| lv_it001w | TYPE T001W, " | |||
| lv_it130m | TYPE T130M, " | |||
| lv_itcurm | TYPE TCURM, " | |||
| lv_kzmara_xchpf | TYPE T130F-KZREF, " SPACE | |||
| lv_kz_batch | TYPE SY-BATCH, " ' ' | |||
| lv_max_pfstatus | TYPE T130C-PSTAT, " | |||
| lv_mpop | TYPE MPOP, " | |||
| lv_neuflag | TYPE T130F-KZREF, " ' ' | |||
| lv_upd_dgesv | TYPE T130F-KZREF, " SPACE | |||
| lv_upd_dprow | TYPE T130F-KZREF, " SPACE | |||
| lt_ptab | TYPE STANDARD TABLE OF SPTAP, " | |||
| lv_alt_mard | TYPE MARD, " | |||
| lv_upd_dungv | TYPE T130F-KZREF, " SPACE | |||
| lv_upd_pgdata | TYPE T130F-KZREF, " SPACE | |||
| lv_upd_spdata_v | TYPE T130F-KZREF, " SPACE | |||
| lv_upd_spdata | TYPE T130F-KZREF, " SPACE | |||
| lv_upd_spdata_a | TYPE T130F-KZREF, " SPACE | |||
| lv_upd_nfmat | TYPE T130F-KZREF, " SPACE | |||
| lt_steummtab | TYPE STANDARD TABLE OF MG03STEUMM, " | |||
| lv_datab_revlev | TYPE AENR-DATUV, " SPACE | |||
| lv_flgbwtty | TYPE T130F-KZREF, " | |||
| lt_steuertab | TYPE STANDARD TABLE OF MG03STEUER, " | |||
| lt_tprowf | TYPE STANDARD TABLE OF PROWF, " | |||
| lv_flgmver | TYPE T130F-KZREF, " | |||
| lt_ung_verbtab | TYPE STANDARD TABLE OF SVERBTAB, " | |||
| lv_flgxchar_bew | TYPE T130F-KZREF, " | |||
| lv_flgxchar_chpf | TYPE T130F-KZREF. " |
|   CALL FUNCTION 'UPDATE_MATERIAL' "Update function module material master |
| EXPORTING | ||
| AKTVSTATUS | = lv_aktvstatus | |
| FLG_AENDERUNG_MAT | = lv_flg_aenderung_mat | |
| FLG_KALK_LOSGR | = lv_flg_kalk_losgr | |
| FLG_KONFIGBEW | = lv_flg_konfigbew | |
| FLG_LVORM_BWKEY | = lv_flg_lvorm_bwkey | |
| FLG_LVORM_LGNUM | = lv_flg_lvorm_lgnum | |
| FLG_LVORM_WERKS | = lv_flg_lvorm_werks | |
| FLG_LVORM_ZENTRAL | = lv_flg_lvorm_zentral | |
| FLG_PROW | = lv_flg_prow | |
| FLG_REVLEV | = lv_flg_revlev | |
| IMARA | = lv_imara | |
| ALT_MARA | = lv_alt_mara | |
| IMARC | = lv_imarc | |
| IMARD | = lv_imard | |
| IMBEW | = lv_imbew | |
| IMARV | = lv_imarv | |
| IMFHM | = lv_imfhm | |
| IMLGN | = lv_imlgn | |
| IMLGT | = lv_imlgt | |
| IMVKE | = lv_imvke | |
| IMYMS | = lv_imyms | |
| IPGDATA | = lv_ipgdata | |
| ALT_MARC | = lv_alt_marc | |
| IT001W | = lv_it001w | |
| IT130M | = lv_it130m | |
| ITCURM | = lv_itcurm | |
| KZMARA_XCHPF | = lv_kzmara_xchpf | |
| KZ_BATCH | = lv_kz_batch | |
| MAX_PFSTATUS | = lv_max_pfstatus | |
| MPOP | = lv_mpop | |
| NEUFLAG | = lv_neuflag | |
| UPD_DGESV | = lv_upd_dgesv | |
| UPD_DPROW | = lv_upd_dprow | |
| ALT_MARD | = lv_alt_mard | |
| UPD_DUNGV | = lv_upd_dungv | |
| UPD_PGDATA | = lv_upd_pgdata | |
| UPD_SPDATA_V | = lv_upd_spdata_v | |
| UPD_SPDATA | = lv_upd_spdata | |
| UPD_SPDATA_A | = lv_upd_spdata_a | |
| UPD_NFMAT | = lv_upd_nfmat | |
| DATAB_REVLEV | = lv_datab_revlev | |
| FLGBWTTY | = lv_flgbwtty | |
| FLGMVER | = lv_flgmver | |
| FLGXCHAR_BEW | = lv_flgxchar_bew | |
| FLGXCHAR_CHPF | = lv_flgxchar_chpf | |
| TABLES | ||
| GES_VERBTAB | = lt_ges_verbtab | |
| KTEXT | = lt_ktext | |
| MEINH | = lt_meinh | |
| PTAB | = lt_ptab | |
| STEUMMTAB | = lt_steummtab | |
| STEUERTAB | = lt_steuertab | |
| TPROWF | = lt_tprowf | |
| UNG_VERBTAB | = lt_ung_verbtab | |
| . " UPDATE_MATERIAL | ||
ABAP code using 7.40 inline data declarations to call FM UPDATE_MATERIAL
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 PSTAT FROM T130C INTO @DATA(ld_aktvstatus). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flg_aenderung_mat). | ||||
| DATA(ld_flg_aenderung_mat) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flg_kalk_losgr). | ||||
| DATA(ld_flg_kalk_losgr) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flg_konfigbew). | ||||
| DATA(ld_flg_konfigbew) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flg_lvorm_bwkey). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flg_lvorm_lgnum). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flg_lvorm_werks). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flg_lvorm_zentral). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flg_prow). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flg_revlev). | ||||
| DATA(ld_flg_revlev) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_kzmara_xchpf). | ||||
| DATA(ld_kzmara_xchpf) | = ' '. | |||
| "SELECT single BATCH FROM SY INTO @DATA(ld_kz_batch). | ||||
| DATA(ld_kz_batch) | = ' '. | |||
| "SELECT single PSTAT FROM T130C INTO @DATA(ld_max_pfstatus). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_neuflag). | ||||
| DATA(ld_neuflag) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_upd_dgesv). | ||||
| DATA(ld_upd_dgesv) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_upd_dprow). | ||||
| DATA(ld_upd_dprow) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_upd_dungv). | ||||
| DATA(ld_upd_dungv) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_upd_pgdata). | ||||
| DATA(ld_upd_pgdata) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_upd_spdata_v). | ||||
| DATA(ld_upd_spdata_v) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_upd_spdata). | ||||
| DATA(ld_upd_spdata) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_upd_spdata_a). | ||||
| DATA(ld_upd_spdata_a) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_upd_nfmat). | ||||
| DATA(ld_upd_nfmat) | = ' '. | |||
| "SELECT single DATUV FROM AENR INTO @DATA(ld_datab_revlev). | ||||
| DATA(ld_datab_revlev) | = ' '. | |||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flgbwtty). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flgmver). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flgxchar_bew). | ||||
| "SELECT single KZREF FROM T130F INTO @DATA(ld_flgxchar_chpf). | ||||
Search for further information about these or an SAP related objects