SAP BAPI_MATERIAL_SAVEREPLICA Function Module for BAPI for Mass Maintenance of Material Data









BAPI_MATERIAL_SAVEREPLICA is a standard bapi material savereplica SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for BAPI for Mass Maintenance of Material Data 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 savereplica FM, simply by entering the name BAPI_MATERIAL_SAVEREPLICA into the relevant SAP transaction such as SE37 or SE38.

Function Group: 1001MASSUEB
Program Name: SAPL1001MASSUEB
Main Program: SAPL1001MASSUEB
Appliation area:
Release date: 30-Apr-2003
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_MATERIAL_SAVEREPLICA 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_SAVEREPLICA'"BAPI for Mass Maintenance of Material Data
EXPORTING
NOAPPLLOG = "Do Not Write an Application Log
NOCHANGEDOC = "Do not write change documents
TESTRUN = "Switch to Simulation Session for Write BAPIs
INPFLDCHECK = "Response if Fields Are Inactive
* FLAG_CAD_CALL = ' ' "Call From CAD System
* NO_ROLLBACK_WORK = ' ' "Override Rollback Work
* FLAG_ONLINE = ' ' "No ALE Field Selection

IMPORTING
RETURN = "Return Parameter

TABLES
HEADDATA = "Header Segment with Control Information
* STORAGELOCATIONDATA = "Material Data at Storage Location Level
* STORAGELOCATIONDATAX = "Update Information for STORAGELOCATIONDATA
* VALUATIONDATA = "Valuation Data
* VALUATIONDATAX = "Update Information for VALUATIONDATA
* WAREHOUSENUMBERDATA = "Warehouse Number Data
* WAREHOUSENUMBERDATAX = "Update Information for WAREHOUSENUMBERDATA
* SALESDATA = "Sales Data
* SALESDATAX = "Update Information for SALESDATA
* STORAGETYPEDATA = "Storage type data
* STORAGETYPEDATAX = "Update Information for STORAGETYPEDATA
* CLIENTDATA = "Material Data at Client Level
* MATERIALDESCRIPTION = "Material Descriptions
* UNITSOFMEASURE = "Units of Measure
* UNITSOFMEASUREX = "Update Information for UNITSOFMEASURE
* INTERNATIONALARTNOS = "International Article Numbers (EANs)
* MATERIALLONGTEXT = "Long Texts
* TAXCLASSIFICATIONS = "Control Data
* PRTDATA = "Production Resource Tool (PRT) Fields in the Material Master
* PRTDATAX = "Update Information for PRTDATA
* EXTENSIONIN = "Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
* EXTENSIONINX = "Checkbox Structure for Extension In/Extension Out
* CLIENTDATAX = "Update Information for CLIENTDATA
* FORECASTVALUES = "Data Transfer for Forecast Values
* UNPLNDCONSUMPTION = "Data Transfer for Unplanned Consumption
* TOTALCONSUMPTION = "Data Transfer for Total Consumption of Material
* RETURNMESSAGES = "Substitute Structure for Return Parameter BAPIRET2
* PLANTDATA = "Material Data at Plant Level
* PLANTDATAX = "Update Information for PLANTDATA
* FORECASTPARAMETERS = "Forecast Parameters
* FORECASTPARAMETERSX = "Update Information for FORECASTPARAMETERS
* PLANNINGDATA = "Change Document Structure for Material Master/Product Group
* PLANNINGDATAX = "Update Information for PLANNINGDATA
.



IMPORTING Parameters details for BAPI_MATERIAL_SAVEREPLICA

NOAPPLLOG - Do Not Write an Application Log

Data type: BAPIE1GLOBAL_DATA-NO_APPL_LOG
Optional: No
Call by Reference: No ( called with pass by value option)

NOCHANGEDOC - Do not write change documents

Data type: BAPIE1GLOBAL_DATA-NO_CHANGE_DOC
Optional: No
Call by Reference: No ( called with pass by value option)

TESTRUN - Switch to Simulation Session for Write BAPIs

Data type: BAPIE1GLOBAL_DATA-TESTRUN
Optional: No
Call by Reference: No ( called with pass by value option)

INPFLDCHECK - Response if Fields Are Inactive

Data type: BAPIE1GLOBAL_DATA-INP_FLD_CHECK
Optional: No
Call by Reference: No ( called with pass by value option)

FLAG_CAD_CALL - Call From CAD System

Data type: BAPIE1GLOBAL_DATA-TESTRUN
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_ROLLBACK_WORK - Override Rollback Work

Data type: BAPIE1GLOBAL_DATA-TESTRUN
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

FLAG_ONLINE - No ALE Field Selection

Data type: BAPIE1GLOBAL_DATA-TESTRUN
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BAPI_MATERIAL_SAVEREPLICA

RETURN - Return Parameter

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

TABLES Parameters details for BAPI_MATERIAL_SAVEREPLICA

HEADDATA - Header Segment with Control Information

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

STORAGELOCATIONDATA - Material Data at Storage Location Level

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

STORAGELOCATIONDATAX - Update Information for STORAGELOCATIONDATA

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

VALUATIONDATA - Valuation Data

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

VALUATIONDATAX - Update Information for VALUATIONDATA

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

WAREHOUSENUMBERDATA - Warehouse Number Data

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

WAREHOUSENUMBERDATAX - Update Information for WAREHOUSENUMBERDATA

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

SALESDATA - Sales Data

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

SALESDATAX - Update Information for SALESDATA

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

STORAGETYPEDATA - Storage type data

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

STORAGETYPEDATAX - Update Information for STORAGETYPEDATA

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

CLIENTDATA - Material Data at Client Level

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

MATERIALDESCRIPTION - Material Descriptions

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

UNITSOFMEASURE - Units of Measure

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

UNITSOFMEASUREX - Update Information for UNITSOFMEASURE

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

INTERNATIONALARTNOS - International Article Numbers (EANs)

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

MATERIALLONGTEXT - Long Texts

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

TAXCLASSIFICATIONS - Control Data

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

PRTDATA - Production Resource Tool (PRT) Fields in the Material Master

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

PRTDATAX - Update Information for PRTDATA

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

EXTENSIONIN - Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT

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

EXTENSIONINX - Checkbox Structure for Extension In/Extension Out

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

CLIENTDATAX - Update Information for CLIENTDATA

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

FORECASTVALUES - Data Transfer for Forecast Values

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

UNPLNDCONSUMPTION - Data Transfer for Unplanned Consumption

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

TOTALCONSUMPTION - Data Transfer for Total Consumption of Material

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

RETURNMESSAGES - Substitute Structure for Return Parameter BAPIRET2

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

PLANTDATA - Material Data at Plant Level

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

PLANTDATAX - Update Information for PLANTDATA

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

FORECASTPARAMETERS - Forecast Parameters

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

FORECASTPARAMETERSX - Update Information for FORECASTPARAMETERS

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

PLANNINGDATA - Change Document Structure for Material Master/Product Group

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

PLANNINGDATAX - Update Information for PLANNINGDATA

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

Copy and paste ABAP code example for BAPI_MATERIAL_SAVEREPLICA 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_return  TYPE BAPIRET2, "   
lt_headdata  TYPE STANDARD TABLE OF BAPIE1MATHEADER, "   
lv_noappllog  TYPE BAPIE1GLOBAL_DATA-NO_APPL_LOG, "   
lt_storagelocationdata  TYPE STANDARD TABLE OF BAPIE1MARD, "   
lt_storagelocationdatax  TYPE STANDARD TABLE OF BAPIE1MARDX, "   
lt_valuationdata  TYPE STANDARD TABLE OF BAPIE1MBEW, "   
lt_valuationdatax  TYPE STANDARD TABLE OF BAPIE1MBEWX, "   
lt_warehousenumberdata  TYPE STANDARD TABLE OF BAPIE1MLGN, "   
lt_warehousenumberdatax  TYPE STANDARD TABLE OF BAPIE1MLGNX, "   
lt_salesdata  TYPE STANDARD TABLE OF BAPIE1MVKE, "   
lt_salesdatax  TYPE STANDARD TABLE OF BAPIE1MVKEX, "   
lt_storagetypedata  TYPE STANDARD TABLE OF BAPIE1MLGT, "   
lt_storagetypedatax  TYPE STANDARD TABLE OF BAPIE1MLGTX, "   
lt_clientdata  TYPE STANDARD TABLE OF BAPIE1MARA, "   
lv_nochangedoc  TYPE BAPIE1GLOBAL_DATA-NO_CHANGE_DOC, "   
lt_materialdescription  TYPE STANDARD TABLE OF BAPIE1MAKT, "   
lt_unitsofmeasure  TYPE STANDARD TABLE OF BAPIE1MARM, "   
lt_unitsofmeasurex  TYPE STANDARD TABLE OF BAPIE1MARMX, "   
lt_internationalartnos  TYPE STANDARD TABLE OF BAPIE1MEAN, "   
lt_materiallongtext  TYPE STANDARD TABLE OF BAPIE1MLTX, "   
lt_taxclassifications  TYPE STANDARD TABLE OF BAPIE1MLAN, "   
lt_prtdata  TYPE STANDARD TABLE OF BAPIE1MFHM, "   
lt_prtdatax  TYPE STANDARD TABLE OF BAPIE1MFHMX, "   
lt_extensionin  TYPE STANDARD TABLE OF BAPIE1PAREX, "   
lt_extensioninx  TYPE STANDARD TABLE OF BAPIE1PAREXX, "   
lv_testrun  TYPE BAPIE1GLOBAL_DATA-TESTRUN, "   
lt_clientdatax  TYPE STANDARD TABLE OF BAPIE1MARAX, "   
lt_forecastvalues  TYPE STANDARD TABLE OF BAPIE1MPRW, "   
lt_unplndconsumption  TYPE STANDARD TABLE OF BAPIE1MVEU, "   
lt_totalconsumption  TYPE STANDARD TABLE OF BAPIE1MVEG, "   
lt_returnmessages  TYPE STANDARD TABLE OF BAPIE1RET2, "   
lt_plantdata  TYPE STANDARD TABLE OF BAPIE1MARC, "   
lv_inpfldcheck  TYPE BAPIE1GLOBAL_DATA-INP_FLD_CHECK, "   
lt_plantdatax  TYPE STANDARD TABLE OF BAPIE1MARCX, "   
lv_flag_cad_call  TYPE BAPIE1GLOBAL_DATA-TESTRUN, "   SPACE
lv_no_rollback_work  TYPE BAPIE1GLOBAL_DATA-TESTRUN, "   SPACE
lt_forecastparameters  TYPE STANDARD TABLE OF BAPIE1MPOP, "   
lv_flag_online  TYPE BAPIE1GLOBAL_DATA-TESTRUN, "   SPACE
lt_forecastparametersx  TYPE STANDARD TABLE OF BAPIE1MPOPX, "   
lt_planningdata  TYPE STANDARD TABLE OF BAPIE1MPGD, "   
lt_planningdatax  TYPE STANDARD TABLE OF BAPIE1MPGDX. "   

  CALL FUNCTION 'BAPI_MATERIAL_SAVEREPLICA'  "BAPI for Mass Maintenance of Material Data
    EXPORTING
         NOAPPLLOG = lv_noappllog
         NOCHANGEDOC = lv_nochangedoc
         TESTRUN = lv_testrun
         INPFLDCHECK = lv_inpfldcheck
         FLAG_CAD_CALL = lv_flag_cad_call
         NO_ROLLBACK_WORK = lv_no_rollback_work
         FLAG_ONLINE = lv_flag_online
    IMPORTING
         RETURN = lv_return
    TABLES
         HEADDATA = lt_headdata
         STORAGELOCATIONDATA = lt_storagelocationdata
         STORAGELOCATIONDATAX = lt_storagelocationdatax
         VALUATIONDATA = lt_valuationdata
         VALUATIONDATAX = lt_valuationdatax
         WAREHOUSENUMBERDATA = lt_warehousenumberdata
         WAREHOUSENUMBERDATAX = lt_warehousenumberdatax
         SALESDATA = lt_salesdata
         SALESDATAX = lt_salesdatax
         STORAGETYPEDATA = lt_storagetypedata
         STORAGETYPEDATAX = lt_storagetypedatax
         CLIENTDATA = lt_clientdata
         MATERIALDESCRIPTION = lt_materialdescription
         UNITSOFMEASURE = lt_unitsofmeasure
         UNITSOFMEASUREX = lt_unitsofmeasurex
         INTERNATIONALARTNOS = lt_internationalartnos
         MATERIALLONGTEXT = lt_materiallongtext
         TAXCLASSIFICATIONS = lt_taxclassifications
         PRTDATA = lt_prtdata
         PRTDATAX = lt_prtdatax
         EXTENSIONIN = lt_extensionin
         EXTENSIONINX = lt_extensioninx
         CLIENTDATAX = lt_clientdatax
         FORECASTVALUES = lt_forecastvalues
         UNPLNDCONSUMPTION = lt_unplndconsumption
         TOTALCONSUMPTION = lt_totalconsumption
         RETURNMESSAGES = lt_returnmessages
         PLANTDATA = lt_plantdata
         PLANTDATAX = lt_plantdatax
         FORECASTPARAMETERS = lt_forecastparameters
         FORECASTPARAMETERSX = lt_forecastparametersx
         PLANNINGDATA = lt_planningdata
         PLANNINGDATAX = lt_planningdatax
. " BAPI_MATERIAL_SAVEREPLICA




ABAP code using 7.40 inline data declarations to call FM BAPI_MATERIAL_SAVEREPLICA

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 NO_APPL_LOG FROM BAPIE1GLOBAL_DATA INTO @DATA(ld_noappllog).
 
 
 
 
 
 
 
 
 
 
 
 
"SELECT single NO_CHANGE_DOC FROM BAPIE1GLOBAL_DATA INTO @DATA(ld_nochangedoc).
 
 
 
 
 
 
 
 
 
 
 
"SELECT single TESTRUN FROM BAPIE1GLOBAL_DATA INTO @DATA(ld_testrun).
 
 
 
 
 
 
 
"SELECT single INP_FLD_CHECK FROM BAPIE1GLOBAL_DATA INTO @DATA(ld_inpfldcheck).
 
 
"SELECT single TESTRUN FROM BAPIE1GLOBAL_DATA INTO @DATA(ld_flag_cad_call).
DATA(ld_flag_cad_call) = ' '.
 
"SELECT single TESTRUN FROM BAPIE1GLOBAL_DATA INTO @DATA(ld_no_rollback_work).
DATA(ld_no_rollback_work) = ' '.
 
 
"SELECT single TESTRUN FROM BAPIE1GLOBAL_DATA INTO @DATA(ld_flag_online).
DATA(ld_flag_online) = ' '.
 
 
 
 


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!