SAP BAPI_MATERIAL_UPLOAD_SAVE Function Module for Put CRM product data on books as material master data (industry/retail)
BAPI_MATERIAL_UPLOAD_SAVE is a standard bapi material upload save SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Put CRM product data on books as material master data (industry/retail) 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 bapi material upload save FM, simply by entering the name BAPI_MATERIAL_UPLOAD_SAVE into the relevant SAP transaction such as SE37 or SE38.
Function Group: MGUP
Program Name: SAPLMGUP
Main Program: SAPLMGUP
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_MATERIAL_UPLOAD_SAVE 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 'BAPI_MATERIAL_UPLOAD_SAVE'"Put CRM product data on books as material master data (industry/retail).
EXPORTING
IV_MARA = "
* IV_IDOCTYPE = "Basic type
* IV_MESTYPE = "Message type
IMPORTING
EV_RETURN = "
EV_MATNR_INT = "Material Number
TABLES
* IT_MAKT = "Descriptions
IT_TAB_FIELDS_UPD = "
* IT_EXTENSION = "Customer data
* IT_MARM = "Units of measure
* IT_MEAN = "EAN Data
* IT_MARC = "Plant Data
* IT_MARD = "Stor. location data
* IT_MVKE = "Sales Data
* IT_MLAN = "Tax classifications
* IT_STXH = "
* IT_STXL = "
IMPORTING Parameters details for BAPI_MATERIAL_UPLOAD_SAVE
IV_MARA -
Data type: BAPIMATMRAOptional: No
Call by Reference: No ( called with pass by value option)
IV_IDOCTYPE - Basic type
Data type: EDIDC-IDOCTPOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_MESTYPE - Message type
Data type: EDIDC-MESTYPOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_MATERIAL_UPLOAD_SAVE
EV_RETURN -
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
EV_MATNR_INT - Material Number
Data type: MARA-MATNROptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_MATERIAL_UPLOAD_SAVE
IT_MAKT - Descriptions
Data type: BAPIMATMKTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_TAB_FIELDS_UPD -
Data type: UPL_TABFLDOptional: No
Call by Reference: No ( called with pass by value option)
IT_EXTENSION - Customer data
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
IT_MARM - Units of measure
Data type: BAPIMATMRMOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_MEAN - EAN Data
Data type: BAPIMATMENOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_MARC - Plant Data
Data type: BAPIMATMRCOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_MARD - Stor. location data
Data type: BAPIMATMRDOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_MVKE - Sales Data
Data type: BAPIMATMVKOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_MLAN - Tax classifications
Data type: BAPIMATMLNOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_STXH -
Data type: BAPISTXTXHOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_STXL -
Data type: BAPISTXTXLOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_MATERIAL_UPLOAD_SAVE 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_it_makt | TYPE STANDARD TABLE OF BAPIMATMKT, " | |||
| lv_iv_mara | TYPE BAPIMATMRA, " | |||
| lv_ev_return | TYPE BAPIRET2, " | |||
| lt_it_tab_fields_upd | TYPE STANDARD TABLE OF UPL_TABFLD, " | |||
| lt_it_extension | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lt_it_marm | TYPE STANDARD TABLE OF BAPIMATMRM, " | |||
| lv_iv_idoctype | TYPE EDIDC-IDOCTP, " | |||
| lv_ev_matnr_int | TYPE MARA-MATNR, " | |||
| lt_it_mean | TYPE STANDARD TABLE OF BAPIMATMEN, " | |||
| lv_iv_mestype | TYPE EDIDC-MESTYP, " | |||
| lt_it_marc | TYPE STANDARD TABLE OF BAPIMATMRC, " | |||
| lt_it_mard | TYPE STANDARD TABLE OF BAPIMATMRD, " | |||
| lt_it_mvke | TYPE STANDARD TABLE OF BAPIMATMVK, " | |||
| lt_it_mlan | TYPE STANDARD TABLE OF BAPIMATMLN, " | |||
| lt_it_stxh | TYPE STANDARD TABLE OF BAPISTXTXH, " | |||
| lt_it_stxl | TYPE STANDARD TABLE OF BAPISTXTXL. " |
|   CALL FUNCTION 'BAPI_MATERIAL_UPLOAD_SAVE' "Put CRM product data on books as material master data (industry/retail) |
| EXPORTING | ||
| IV_MARA | = lv_iv_mara | |
| IV_IDOCTYPE | = lv_iv_idoctype | |
| IV_MESTYPE | = lv_iv_mestype | |
| IMPORTING | ||
| EV_RETURN | = lv_ev_return | |
| EV_MATNR_INT | = lv_ev_matnr_int | |
| TABLES | ||
| IT_MAKT | = lt_it_makt | |
| IT_TAB_FIELDS_UPD | = lt_it_tab_fields_upd | |
| IT_EXTENSION | = lt_it_extension | |
| IT_MARM | = lt_it_marm | |
| IT_MEAN | = lt_it_mean | |
| IT_MARC | = lt_it_marc | |
| IT_MARD | = lt_it_mard | |
| IT_MVKE | = lt_it_mvke | |
| IT_MLAN | = lt_it_mlan | |
| IT_STXH | = lt_it_stxh | |
| IT_STXL | = lt_it_stxl | |
| . " BAPI_MATERIAL_UPLOAD_SAVE | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_MATERIAL_UPLOAD_SAVE
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 IDOCTP FROM EDIDC INTO @DATA(ld_iv_idoctype). | ||||
| "SELECT single MATNR FROM MARA INTO @DATA(ld_ev_matnr_int). | ||||
| "SELECT single MESTYP FROM EDIDC INTO @DATA(ld_iv_mestype). | ||||
Search for further information about these or an SAP related objects