SAP MATERIAL_MAINTAIN_MATERIALTYPE Function Module for NOTRANSL: Änderung der Materialart eines Materials









MATERIAL_MAINTAIN_MATERIALTYPE is a standard material maintain materialtype SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Änderung der Materialart eines Materials 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 maintain materialtype FM, simply by entering the name MATERIAL_MAINTAIN_MATERIALTYPE into the relevant SAP transaction such as SE37 or SE38.

Function Group: MGMD
Program Name: SAPLMGMD
Main Program: SAPLMGMD
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MATERIAL_MAINTAIN_MATERIALTYPE 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_MAINTAIN_MATERIALTYPE'"NOTRANSL: Änderung der Materialart eines Materials
EXPORTING
IT_MTART = "Table Type Material + Material Type
IV_TEST = "Indicator: Make checks, but do not update data
* IV_CHANGE_DOC_TCODE = "Character Field Length = 10
* SPERRMODUS = 'E' "Type of block (shared, exclusive)

TABLES
AMERRDAT = "DI: Structure for Returning Error Messages
* AMARA_UEB = "Couple of Fields Added to MARA
* AMARC_UEB = "Field TRANC Added to MARC
* AMARD_UEB = "Field TRANC Added to MARD
* AMBEW_UEB = "Field TRANC Added to MBEW
* AMLGN_UEB = "Field TRANC Added to MLGN
* AMLGT_UEB = "Field TRANC Added to MLGT
* AMPGD_UEB = "Field TRANC Added to MPGD
* AMVKE_UEB = "Field TRANC Added to MVKE
.



IMPORTING Parameters details for MATERIAL_MAINTAIN_MATERIALTYPE

IT_MTART - Table Type Material + Material Type

Data type: MAT_MTART_TT
Optional: No
Call by Reference: Yes

IV_TEST - Indicator: Make checks, but do not update data

Data type: MD_TEST
Optional: No
Call by Reference: Yes

IV_CHANGE_DOC_TCODE - Character Field Length = 10

Data type: CHAR10
Optional: Yes
Call by Reference: No ( called with pass by value option)

SPERRMODUS - Type of block (shared, exclusive)

Data type: TVGVI-SPERA
Default: 'E'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for MATERIAL_MAINTAIN_MATERIALTYPE

AMERRDAT - DI: Structure for Returning Error Messages

Data type: MERRDAT
Optional: No
Call by Reference: Yes

AMARA_UEB - Couple of Fields Added to MARA

Data type: MARA_UEB
Optional: Yes
Call by Reference: Yes

AMARC_UEB - Field TRANC Added to MARC

Data type: MARC_UEB
Optional: Yes
Call by Reference: Yes

AMARD_UEB - Field TRANC Added to MARD

Data type: MARD_UEB
Optional: Yes
Call by Reference: Yes

AMBEW_UEB - Field TRANC Added to MBEW

Data type: MBEW_UEB
Optional: Yes
Call by Reference: Yes

AMLGN_UEB - Field TRANC Added to MLGN

Data type: MLGN_UEB
Optional: Yes
Call by Reference: Yes

AMLGT_UEB - Field TRANC Added to MLGT

Data type: MLGT_UEB
Optional: Yes
Call by Reference: Yes

AMPGD_UEB - Field TRANC Added to MPGD

Data type: MPGD_UEB
Optional: Yes
Call by Reference: Yes

AMVKE_UEB - Field TRANC Added to MVKE

Data type: MVKE_UEB
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for MATERIAL_MAINTAIN_MATERIALTYPE 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_amerrdat  TYPE STANDARD TABLE OF MERRDAT, "   
lv_it_mtart  TYPE MAT_MTART_TT, "   
lv_iv_test  TYPE MD_TEST, "   
lt_amara_ueb  TYPE STANDARD TABLE OF MARA_UEB, "   
lt_amarc_ueb  TYPE STANDARD TABLE OF MARC_UEB, "   
lv_iv_change_doc_tcode  TYPE CHAR10, "   
lt_amard_ueb  TYPE STANDARD TABLE OF MARD_UEB, "   
lv_sperrmodus  TYPE TVGVI-SPERA, "   'E'
lt_ambew_ueb  TYPE STANDARD TABLE OF MBEW_UEB, "   
lt_amlgn_ueb  TYPE STANDARD TABLE OF MLGN_UEB, "   
lt_amlgt_ueb  TYPE STANDARD TABLE OF MLGT_UEB, "   
lt_ampgd_ueb  TYPE STANDARD TABLE OF MPGD_UEB, "   
lt_amvke_ueb  TYPE STANDARD TABLE OF MVKE_UEB. "   

  CALL FUNCTION 'MATERIAL_MAINTAIN_MATERIALTYPE'  "NOTRANSL: Änderung der Materialart eines Materials
    EXPORTING
         IT_MTART = lv_it_mtart
         IV_TEST = lv_iv_test
         IV_CHANGE_DOC_TCODE = lv_iv_change_doc_tcode
         SPERRMODUS = lv_sperrmodus
    TABLES
         AMERRDAT = lt_amerrdat
         AMARA_UEB = lt_amara_ueb
         AMARC_UEB = lt_amarc_ueb
         AMARD_UEB = lt_amard_ueb
         AMBEW_UEB = lt_ambew_ueb
         AMLGN_UEB = lt_amlgn_ueb
         AMLGT_UEB = lt_amlgt_ueb
         AMPGD_UEB = lt_ampgd_ueb
         AMVKE_UEB = lt_amvke_ueb
. " MATERIAL_MAINTAIN_MATERIALTYPE




ABAP code using 7.40 inline data declarations to call FM MATERIAL_MAINTAIN_MATERIALTYPE

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 SPERA FROM TVGVI INTO @DATA(ld_sperrmodus).
DATA(ld_sperrmodus) = 'E'.
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!