SAP Function Modules

Share |

BAPI_MATERIAL_MAINTAINDATA_RT SAP Function module - Create and Change Material Master Data (Retail)

BAPI_MATERIAL_MAINTAINDATA_RT is a standard SAP function module that performs Create and Change Material Master Data (Retail) functionality. This is available within standard R/3 SAP systems depending on version and release level.

Below are the pattern details for this FM showing its interface including any import, export and tables parameters. There is also a list of Exceptions and for your convenience any standard documentation available. All this information and more can also be viewed if you enter the function module name BAPI_MATERIAL_MAINTAINDATA_RT into the relevant SAP transaction such as SE37 or SE80.

Contribute (Add Comments)
Within the comments section below there is also an opportunity for you to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_MATERIAL_MAINTAINDATA_RT or its description.

Associated Function Group: 1001
Released Date: 24.10.1997
CALL FUNCTION 'BAPI_MATERIAL_MAINTAINDATA_RT' "Create and Change Material Master Data (Retail)
    headdata =                  " bapie1mathead  Header segment with control information
    return =                    " bapireturn1   Return parameters
*   variantskeys =              " bapie1varkey  List of variants for configurable material
*   characteristicvalue =       " bapie1ausprt  Characteristic value assignment data
*   characteristicvaluex =      " bapie1ausprtx  Information on update for CHARACTERISTICVALUE
*   clientdata =                " bapie1marart  Client-specific material data
*   clientdatax =               " bapie1marartx  Information on update for CLIENTDATA
*   clientext =                 " bapie1maraextrt  Customer-defined client-specific material data
*   clientextx =                " bapie1maraextrtx  Information on update for CLIENTEXT
*   addnlclientdata =           " bapie1maw1rt  Additional client-specific material data
*   addnlclientdatax =          " bapie1maw1rtx  Information on update for ADDNLCLIENTDATA
*   materialdescription =       " bapie1maktrt  Material descriptions
*   plantdata =                 " bapie1marcrt  Plant-specific material data
*   plantdatax =                " bapie1marcrtx  Information on update for PLANTDATA
*   plantext =                  " bapie1marcextrt  Customer-defined plant-specific material data
*   plantextx =                 " bapie1marcextrtx  Information on update for PLANTEXT
*   forecastparameters =        " bapie1mpoprt  Forecast parameters
*   forecastparametersx =       " bapie1mpoprtx  Information on update for FORECASTDATA
*   forecastvalues =            " bapie1mprwrt  Forecast values
*   totalconsumption =          " bapie1mvegrt  Total consumption
*   unplndconsumption =         " bapie1mveurt  Unplanned consumption
*   planningdata =              " bapie1mpgdrt  Planning data
*   planningdatax =             " bapie1mpgdrtx  Information on update for PLANNINGDATA
*   storagelocationdata =       " bapie1mardrt  Storage-location-specific material data
*   storagelocationdatax =      " bapie1mardrtx  Information on update for STORAGELOCATIONDATA
*   storagelocationext =        " bapie1mardextrt  Customer-defined storage-location-specific material data
*   storagelocationextx =       " bapie1mardextrtx  Information on update for STORAGELOCATIONEXT
*   unitsofmeasure =            " bapie1marmrt  Units of measure
*   unitsofmeasurex =           " bapie1marmrtx  Information on update for UNITSOFMEASURE
*   unitofmeasuretexts =        " bapie1mamtrt  Unit-of-measure-specific texts
*   internationalartnos =       " bapie1meanrt  International Article Numbers (EANs)
*   vendorean =                 " bapie1mleart  Vendor-specific EANs
*   layoutmoduleassgmt =        " bapie1malgrt  Assignment of layout modules to materials
*   layoutmoduleassgmtx =       " bapie1malgrtx  Information on update for LAYOUTMODULEASSGMT
*   taxclassifications =        " bapie1mlanrt  Tax classifications
*   valuationdata =             " bapie1mbewrt  Valuation data
*   valuationdatax =            " bapie1mbewrtx  Information on update for VALUATIONDATA
*   valuationext =              " bapie1mbewextrt  Customer-defined valuation data
*   valuationextx =             " bapie1mbewextrtx  Information on update for VALUATIONEXT
*   warehousenumberdata =       " bapie1mlgnrt  Warehouse-number-specific material data
*   warehousenumberdatax =      " bapie1mlgnrtx  Information on update for WAREHOUSEDATA
*   warehousenumberext =        " bapie1mlgnextrt  Customer-defined warehouse-number-specific material data
*   warehousenumberextx =       " bapie1mlgnextrtx  Information on update for WAREHOUSENUMBEREXT
*   storagetypedata =           " bapie1mlgtrt  Storage-type-specific material data
*   storagetypedatax =          " bapie1mlgtrtx  Information on update for STORAGETYPEDATA
*   storagetypeext =            " bapie1mlgtextrt  Customer-defined storage-type-specific material data
*   storagetypeextx =           " bapie1mlgtextrtx  Information on update for STORAGETYPEEXT
*   salesdata =                 " bapie1mvkert  Sales data
*   salesdatax =                " bapie1mvkertx  Information on update for SALESDATA
*   salesext =                  " bapie1mvkeextrt  Customer-defined sales data
*   salesextx =                 " bapie1mvkeextrtx  Information on update for SALESEXT
*   posdata =                   " bapie1wlk2rt  POS data
*   posdatax =                  " bapie1wlk2rtx  Information on update for POSDATA
*   posext =                    " bapie1wlk2extrt  Customer-defined POS data
*   posextx =                   " bapie1wlk2extrtx  Information on update for POSEXT
*   materiallongtext =          " bapie1mltxrt  Long texts
*   plantkeys =                 " bapie1wrkkey  List of other plants
*   storagelocationkeys =       " bapie1lgokey  List of other storage locations
*   distrchainkeys =            " bapie1vtlkey  List of other distribution chains
*   warehousenokeys =           " bapie1lgnkey  List of other warehouse numbers
*   storagetypekeys =           " bapie1lgtkey  List of other storage types
*   valuationtypekeys =         " bapie1bwakey  List of other valuation types
*   segsalesstatus =            " bapisgtmvke   Segmentation-Dependent Sales Status
*   segweightvolume =           " bapisgtmarm   Segmentation-Dependent Weights and Volumes



You use this method to create new material master data or to change existing material master data.
Besides creating and changing material master data, you can also delete data for the following structures:







  • For the system to recognize that a data record is to be deleted, the field FUNCTION must contain the value 003 in the corresponding structure. This field is of no relevance when creating or changing data.
    If the material specified in structure HEADDATA is a generic material, you can specify data on the generic material and also on the variants in the structures concerned (CLIENTDATA, and so on). Normally, this is of use only if you want to maintain special data on the variant differently from the data on the generic material. If no explicit data on the variants exists, it is created automatically on the basis of the data on the generic material.
    If a variant is created, an entry must be defined in structure VARIANTSKEYS for this variant. This makes it possible to also create new variants for an existing generic material.
    If a structure contains fields for units of measurement (such as structure CLIENTDATA, field BASE_UOM), language indicators (such as structure MATERIALDESCRIPTION, field LANGU), or country indicators (such as structure TAXCLASSIFICATIONS, field DEPCOUNTRY), there is always a field of the same name with the ending _ISO. This makes it possible to transfer either the internally used SAP code or a standardized ISO code for the units of measurement, language indicators, or country indicators. ISO codes are converted to an SAP code internally for further processing. The ISO code is used only if the SAP code is not transferred. If you use ISO codes, you must ensure that the SAP code can be uniquely determined from the ISO code in Customizing for units of measurement, language indicators, and country indicators.
    The data transferred is updated synchronously; that is, not using an update task. This is necessary because this method is also used in distribution by Application Link Enabling (ALE), where asynchronous updating cannot be supported in inbound processing because the processing status of the assigned IDocs cannot otherwise be set reliably.
    If a serious database error occurs during synchronous updating of the application data, a rollback for all database changes made so far is triggered in the method. If the method is called in a commit unit together with other methods, the database changes of the previously executed method calls are also rolled back as a result. The rollback is necessary to prevent database inconsistencies due to only part of the application data being updated correctly.
    Any information or error messages that are issued while the data is being processed are recorded in the application log. If you want to view these messages, a commit must be performed after this method is called so that the data in the application log is written to the database. Even if the structure RETURN returns an E-type (error) message in field TYPE, a commit must be performed so that the application log is written. In the event of an error, the method itself ensures that the data is reset correctly. The commit is also necessary to trigger the updating of the classification data because the update module for the classification data is registered by means of PERFORM ON COMMIT and is started only by a COMMIT WORK.


    To create or change data, you require the necessary authorizations for maintaining the corresponding material master data.

    As of Release 4.5A, this method can also be used to distribute deletion flags correctly. Deletion flags are only set in retail for client-specific material data (parameter CLIENTDATA) and plant-specific material data (parameter PLANTDATA). If deletion flags (field DEL_FLAG) are transferred for one of these two parameters, a corresponding workflow is generated during updating. Depending on the value of the deletion indicator, this workflow triggers the discontinuation of the material for the client or for a specific plant, or the cancelling of an existing deletion flag.
    Documentation extract taken from SAP system, Copyright (c) SAP AG

    comments powered by Disqus