SAP Tables

BAPI_MATERIAL_MAINTAINDATA_RT SAP Function module - Create and change material master data (retail)




BAPI_MATERIAL_MAINTAINDATA_RTis a standard SAP function module available within R/3 SAPsystems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import/export parameters, exceptions etc as well as any documentation contributions specific to the object. See here to view full function module documentation and code listing, simply by entering the name BAPI_MATERIAL_MAINTAINDATA_RT into the relevant SAP transaction such as SE37 or SE80.

Contribute (Add Comments)
Please help keep this info upto date and use the comments section below 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.


Pattern for FM BAPI_MATERIAL_MAINTAINDATA_RT - BAPI MATERIAL MAINTAINDATA RT
Associated Function Group: 1001
Released Date: 24.10.1997
CALL FUNCTION 'BAPI_MATERIAL_MAINTAINDATA_RT' "Create and change material master data (retail)
  EXPORTING
    headdata =                  " bapie1mathead  Header segment with control information
  IMPORTING
    return =                    " bapireturn1   Return parameters
* TABLES
*   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
    .  "  BAPI_MATERIAL_MAINTAINDATA_RT

ABAP code example for Function Module BAPI_MATERIAL_MAINTAINDATA_RT

The ABAP code below is a full code listing to execute function module BAPI_MATERIAL_MAINTAINDATA_RT including all data declarations. The code uses the latest in-line data declaration syntax but I have included an abap code snipet at the end to show how declarations would look using the original method of declaring data variables up front. 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).
DATA:
ld_return   TYPE BAPIRETURN1,
it_variantskeys   TYPE STANDARD TABLE OF BAPIE1VARKEY,"tables param
wa_variantskeys LIKE LINE OF it_variantskeys  ,
it_characteristicvalue   TYPE STANDARD TABLE OF BAPIE1AUSPRT,"tables param
wa_characteristicvalue LIKE LINE OF it_characteristicvalue  ,
it_characteristicvaluex   TYPE STANDARD TABLE OF BAPIE1AUSPRTX,"tables param
wa_characteristicvaluex LIKE LINE OF it_characteristicvaluex  ,
it_clientdata   TYPE STANDARD TABLE OF BAPIE1MARART,"tables param
wa_clientdata LIKE LINE OF it_clientdata  ,
it_clientdatax   TYPE STANDARD TABLE OF BAPIE1MARARTX,"tables param
wa_clientdatax LIKE LINE OF it_clientdatax  ,
it_clientext   TYPE STANDARD TABLE OF BAPIE1MARAEXTRT,"tables param
wa_clientext LIKE LINE OF it_clientext  ,
it_clientextx   TYPE STANDARD TABLE OF BAPIE1MARAEXTRTX,"tables param
wa_clientextx LIKE LINE OF it_clientextx  ,
it_addnlclientdata   TYPE STANDARD TABLE OF BAPIE1MAW1RT,"tables param
wa_addnlclientdata LIKE LINE OF it_addnlclientdata  ,
it_addnlclientdatax   TYPE STANDARD TABLE OF BAPIE1MAW1RTX,"tables param
wa_addnlclientdatax LIKE LINE OF it_addnlclientdatax  ,
it_materialdescription   TYPE STANDARD TABLE OF BAPIE1MAKTRT,"tables param
wa_materialdescription LIKE LINE OF it_materialdescription  ,
it_plantdata   TYPE STANDARD TABLE OF BAPIE1MARCRT,"tables param
wa_plantdata LIKE LINE OF it_plantdata  ,
it_plantdatax   TYPE STANDARD TABLE OF BAPIE1MARCRTX,"tables param
wa_plantdatax LIKE LINE OF it_plantdatax  ,
it_plantext   TYPE STANDARD TABLE OF BAPIE1MARCEXTRT,"tables param
wa_plantext LIKE LINE OF it_plantext  ,
it_plantextx   TYPE STANDARD TABLE OF BAPIE1MARCEXTRTX,"tables param
wa_plantextx LIKE LINE OF it_plantextx  ,
it_forecastparameters   TYPE STANDARD TABLE OF BAPIE1MPOPRT,"tables param
wa_forecastparameters LIKE LINE OF it_forecastparameters  ,
it_forecastparametersx   TYPE STANDARD TABLE OF BAPIE1MPOPRTX,"tables param
wa_forecastparametersx LIKE LINE OF it_forecastparametersx  ,
it_forecastvalues   TYPE STANDARD TABLE OF BAPIE1MPRWRT,"tables param
wa_forecastvalues LIKE LINE OF it_forecastvalues  ,
it_totalconsumption   TYPE STANDARD TABLE OF BAPIE1MVEGRT,"tables param
wa_totalconsumption LIKE LINE OF it_totalconsumption  ,
it_unplndconsumption   TYPE STANDARD TABLE OF BAPIE1MVEURT,"tables param
wa_unplndconsumption LIKE LINE OF it_unplndconsumption  ,
it_planningdata   TYPE STANDARD TABLE OF BAPIE1MPGDRT,"tables param
wa_planningdata LIKE LINE OF it_planningdata  ,
it_planningdatax   TYPE STANDARD TABLE OF BAPIE1MPGDRTX,"tables param
wa_planningdatax LIKE LINE OF it_planningdatax  ,
it_storagelocationdata   TYPE STANDARD TABLE OF BAPIE1MARDRT,"tables param
wa_storagelocationdata LIKE LINE OF it_storagelocationdata  ,
it_storagelocationdatax   TYPE STANDARD TABLE OF BAPIE1MARDRTX,"tables param
wa_storagelocationdatax LIKE LINE OF it_storagelocationdatax  ,
it_storagelocationext   TYPE STANDARD TABLE OF BAPIE1MARDEXTRT,"tables param
wa_storagelocationext LIKE LINE OF it_storagelocationext  ,
it_storagelocationextx   TYPE STANDARD TABLE OF BAPIE1MARDEXTRTX,"tables param
wa_storagelocationextx LIKE LINE OF it_storagelocationextx  ,
it_unitsofmeasure   TYPE STANDARD TABLE OF BAPIE1MARMRT,"tables param
wa_unitsofmeasure LIKE LINE OF it_unitsofmeasure  ,
it_unitsofmeasurex   TYPE STANDARD TABLE OF BAPIE1MARMRTX,"tables param
wa_unitsofmeasurex LIKE LINE OF it_unitsofmeasurex  ,
it_unitofmeasuretexts   TYPE STANDARD TABLE OF BAPIE1MAMTRT,"tables param
wa_unitofmeasuretexts LIKE LINE OF it_unitofmeasuretexts  ,
it_internationalartnos   TYPE STANDARD TABLE OF BAPIE1MEANRT,"tables param
wa_internationalartnos LIKE LINE OF it_internationalartnos  ,
it_vendorean   TYPE STANDARD TABLE OF BAPIE1MLEART,"tables param
wa_vendorean LIKE LINE OF it_vendorean  ,
it_layoutmoduleassgmt   TYPE STANDARD TABLE OF BAPIE1MALGRT,"tables param
wa_layoutmoduleassgmt LIKE LINE OF it_layoutmoduleassgmt  ,
it_layoutmoduleassgmtx   TYPE STANDARD TABLE OF BAPIE1MALGRTX,"tables param
wa_layoutmoduleassgmtx LIKE LINE OF it_layoutmoduleassgmtx  ,
it_taxclassifications   TYPE STANDARD TABLE OF BAPIE1MLANRT,"tables param
wa_taxclassifications LIKE LINE OF it_taxclassifications  ,
it_valuationdata   TYPE STANDARD TABLE OF BAPIE1MBEWRT,"tables param
wa_valuationdata LIKE LINE OF it_valuationdata  ,
it_valuationdatax   TYPE STANDARD TABLE OF BAPIE1MBEWRTX,"tables param
wa_valuationdatax LIKE LINE OF it_valuationdatax  ,
it_valuationext   TYPE STANDARD TABLE OF BAPIE1MBEWEXTRT,"tables param
wa_valuationext LIKE LINE OF it_valuationext  ,
it_valuationextx   TYPE STANDARD TABLE OF BAPIE1MBEWEXTRTX,"tables param
wa_valuationextx LIKE LINE OF it_valuationextx  ,
it_warehousenumberdata   TYPE STANDARD TABLE OF BAPIE1MLGNRT,"tables param
wa_warehousenumberdata LIKE LINE OF it_warehousenumberdata  ,
it_warehousenumberdatax   TYPE STANDARD TABLE OF BAPIE1MLGNRTX,"tables param
wa_warehousenumberdatax LIKE LINE OF it_warehousenumberdatax  ,
it_warehousenumberext   TYPE STANDARD TABLE OF BAPIE1MLGNEXTRT,"tables param
wa_warehousenumberext LIKE LINE OF it_warehousenumberext  ,
it_warehousenumberextx   TYPE STANDARD TABLE OF BAPIE1MLGNEXTRTX,"tables param
wa_warehousenumberextx LIKE LINE OF it_warehousenumberextx  ,
it_storagetypedata   TYPE STANDARD TABLE OF BAPIE1MLGTRT,"tables param
wa_storagetypedata LIKE LINE OF it_storagetypedata  ,
it_storagetypedatax   TYPE STANDARD TABLE OF BAPIE1MLGTRTX,"tables param
wa_storagetypedatax LIKE LINE OF it_storagetypedatax  ,
it_storagetypeext   TYPE STANDARD TABLE OF BAPIE1MLGTEXTRT,"tables param
wa_storagetypeext LIKE LINE OF it_storagetypeext  ,
it_storagetypeextx   TYPE STANDARD TABLE OF BAPIE1MLGTEXTRTX,"tables param
wa_storagetypeextx LIKE LINE OF it_storagetypeextx  ,
it_salesdata   TYPE STANDARD TABLE OF BAPIE1MVKERT,"tables param
wa_salesdata LIKE LINE OF it_salesdata  ,
it_salesdatax   TYPE STANDARD TABLE OF BAPIE1MVKERTX,"tables param
wa_salesdatax LIKE LINE OF it_salesdatax  ,
it_salesext   TYPE STANDARD TABLE OF BAPIE1MVKEEXTRT,"tables param
wa_salesext LIKE LINE OF it_salesext  ,
it_salesextx   TYPE STANDARD TABLE OF BAPIE1MVKEEXTRTX,"tables param
wa_salesextx LIKE LINE OF it_salesextx  ,
it_posdata   TYPE STANDARD TABLE OF BAPIE1WLK2RT,"tables param
wa_posdata LIKE LINE OF it_posdata  ,
it_posdatax   TYPE STANDARD TABLE OF BAPIE1WLK2RTX,"tables param
wa_posdatax LIKE LINE OF it_posdatax  ,
it_posext   TYPE STANDARD TABLE OF BAPIE1WLK2EXTRT,"tables param
wa_posext LIKE LINE OF it_posext  ,
it_posextx   TYPE STANDARD TABLE OF BAPIE1WLK2EXTRTX,"tables param
wa_posextx LIKE LINE OF it_posextx  ,
it_materiallongtext   TYPE STANDARD TABLE OF BAPIE1MLTXRT,"tables param
wa_materiallongtext LIKE LINE OF it_materiallongtext  ,
it_plantkeys   TYPE STANDARD TABLE OF BAPIE1WRKKEY,"tables param
wa_plantkeys LIKE LINE OF it_plantkeys  ,
it_storagelocationkeys   TYPE STANDARD TABLE OF BAPIE1LGOKEY,"tables param
wa_storagelocationkeys LIKE LINE OF it_storagelocationkeys  ,
it_distrchainkeys   TYPE STANDARD TABLE OF BAPIE1VTLKEY,"tables param
wa_distrchainkeys LIKE LINE OF it_distrchainkeys  ,
it_warehousenokeys   TYPE STANDARD TABLE OF BAPIE1LGNKEY,"tables param
wa_warehousenokeys LIKE LINE OF it_warehousenokeys  ,
it_storagetypekeys   TYPE STANDARD TABLE OF BAPIE1LGTKEY,"tables param
wa_storagetypekeys LIKE LINE OF it_storagetypekeys  ,
it_valuationtypekeys   TYPE STANDARD TABLE OF BAPIE1BWAKEY,"tables param
wa_valuationtypekeys LIKE LINE OF it_valuationtypekeys  .

DATA(ld_headdata) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_variantskeys to it_variantskeys.

"populate fields of struture and append to itab
append wa_characteristicvalue to it_characteristicvalue.

"populate fields of struture and append to itab
append wa_characteristicvaluex to it_characteristicvaluex.

"populate fields of struture and append to itab
append wa_clientdata to it_clientdata.

"populate fields of struture and append to itab
append wa_clientdatax to it_clientdatax.

"populate fields of struture and append to itab
append wa_clientext to it_clientext.

"populate fields of struture and append to itab
append wa_clientextx to it_clientextx.

"populate fields of struture and append to itab
append wa_addnlclientdata to it_addnlclientdata.

"populate fields of struture and append to itab
append wa_addnlclientdatax to it_addnlclientdatax.

"populate fields of struture and append to itab
append wa_materialdescription to it_materialdescription.

"populate fields of struture and append to itab
append wa_plantdata to it_plantdata.

"populate fields of struture and append to itab
append wa_plantdatax to it_plantdatax.

"populate fields of struture and append to itab
append wa_plantext to it_plantext.

"populate fields of struture and append to itab
append wa_plantextx to it_plantextx.

"populate fields of struture and append to itab
append wa_forecastparameters to it_forecastparameters.

"populate fields of struture and append to itab
append wa_forecastparametersx to it_forecastparametersx.

"populate fields of struture and append to itab
append wa_forecastvalues to it_forecastvalues.

"populate fields of struture and append to itab
append wa_totalconsumption to it_totalconsumption.

"populate fields of struture and append to itab
append wa_unplndconsumption to it_unplndconsumption.

"populate fields of struture and append to itab
append wa_planningdata to it_planningdata.

"populate fields of struture and append to itab
append wa_planningdatax to it_planningdatax.

"populate fields of struture and append to itab
append wa_storagelocationdata to it_storagelocationdata.

"populate fields of struture and append to itab
append wa_storagelocationdatax to it_storagelocationdatax.

"populate fields of struture and append to itab
append wa_storagelocationext to it_storagelocationext.

"populate fields of struture and append to itab
append wa_storagelocationextx to it_storagelocationextx.

"populate fields of struture and append to itab
append wa_unitsofmeasure to it_unitsofmeasure.

"populate fields of struture and append to itab
append wa_unitsofmeasurex to it_unitsofmeasurex.

"populate fields of struture and append to itab
append wa_unitofmeasuretexts to it_unitofmeasuretexts.

"populate fields of struture and append to itab
append wa_internationalartnos to it_internationalartnos.

"populate fields of struture and append to itab
append wa_vendorean to it_vendorean.

"populate fields of struture and append to itab
append wa_layoutmoduleassgmt to it_layoutmoduleassgmt.

"populate fields of struture and append to itab
append wa_layoutmoduleassgmtx to it_layoutmoduleassgmtx.

"populate fields of struture and append to itab
append wa_taxclassifications to it_taxclassifications.

"populate fields of struture and append to itab
append wa_valuationdata to it_valuationdata.

"populate fields of struture and append to itab
append wa_valuationdatax to it_valuationdatax.

"populate fields of struture and append to itab
append wa_valuationext to it_valuationext.

"populate fields of struture and append to itab
append wa_valuationextx to it_valuationextx.

"populate fields of struture and append to itab
append wa_warehousenumberdata to it_warehousenumberdata.

"populate fields of struture and append to itab
append wa_warehousenumberdatax to it_warehousenumberdatax.

"populate fields of struture and append to itab
append wa_warehousenumberext to it_warehousenumberext.

"populate fields of struture and append to itab
append wa_warehousenumberextx to it_warehousenumberextx.

"populate fields of struture and append to itab
append wa_storagetypedata to it_storagetypedata.

"populate fields of struture and append to itab
append wa_storagetypedatax to it_storagetypedatax.

"populate fields of struture and append to itab
append wa_storagetypeext to it_storagetypeext.

"populate fields of struture and append to itab
append wa_storagetypeextx to it_storagetypeextx.

"populate fields of struture and append to itab
append wa_salesdata to it_salesdata.

"populate fields of struture and append to itab
append wa_salesdatax to it_salesdatax.

"populate fields of struture and append to itab
append wa_salesext to it_salesext.

"populate fields of struture and append to itab
append wa_salesextx to it_salesextx.

"populate fields of struture and append to itab
append wa_posdata to it_posdata.

"populate fields of struture and append to itab
append wa_posdatax to it_posdatax.

"populate fields of struture and append to itab
append wa_posext to it_posext.

"populate fields of struture and append to itab
append wa_posextx to it_posextx.

"populate fields of struture and append to itab
append wa_materiallongtext to it_materiallongtext.

"populate fields of struture and append to itab
append wa_plantkeys to it_plantkeys.

"populate fields of struture and append to itab
append wa_storagelocationkeys to it_storagelocationkeys.

"populate fields of struture and append to itab
append wa_distrchainkeys to it_distrchainkeys.

"populate fields of struture and append to itab
append wa_warehousenokeys to it_warehousenokeys.

"populate fields of struture and append to itab
append wa_storagetypekeys to it_storagetypekeys.

"populate fields of struture and append to itab
append wa_valuationtypekeys to it_valuationtypekeys.. CALL FUNCTION 'BAPI_MATERIAL_MAINTAINDATA_RT' EXPORTING headdata = ld_headdata IMPORTING return = ld_return * TABLES * variantskeys = it_variantskeys * characteristicvalue = it_characteristicvalue * characteristicvaluex = it_characteristicvaluex * clientdata = it_clientdata * clientdatax = it_clientdatax * clientext = it_clientext * clientextx = it_clientextx * addnlclientdata = it_addnlclientdata * addnlclientdatax = it_addnlclientdatax * materialdescription = it_materialdescription * plantdata = it_plantdata * plantdatax = it_plantdatax * plantext = it_plantext * plantextx = it_plantextx * forecastparameters = it_forecastparameters * forecastparametersx = it_forecastparametersx * forecastvalues = it_forecastvalues * totalconsumption = it_totalconsumption * unplndconsumption = it_unplndconsumption * planningdata = it_planningdata * planningdatax = it_planningdatax * storagelocationdata = it_storagelocationdata * storagelocationdatax = it_storagelocationdatax * storagelocationext = it_storagelocationext * storagelocationextx = it_storagelocationextx * unitsofmeasure = it_unitsofmeasure * unitsofmeasurex = it_unitsofmeasurex * unitofmeasuretexts = it_unitofmeasuretexts * internationalartnos = it_internationalartnos * vendorean = it_vendorean * layoutmoduleassgmt = it_layoutmoduleassgmt * layoutmoduleassgmtx = it_layoutmoduleassgmtx * taxclassifications = it_taxclassifications * valuationdata = it_valuationdata * valuationdatax = it_valuationdatax * valuationext = it_valuationext * valuationextx = it_valuationextx * warehousenumberdata = it_warehousenumberdata * warehousenumberdatax = it_warehousenumberdatax * warehousenumberext = it_warehousenumberext * warehousenumberextx = it_warehousenumberextx * storagetypedata = it_storagetypedata * storagetypedatax = it_storagetypedatax * storagetypeext = it_storagetypeext * storagetypeextx = it_storagetypeextx * salesdata = it_salesdata * salesdatax = it_salesdatax * salesext = it_salesext * salesextx = it_salesextx * posdata = it_posdata * posdatax = it_posdatax * posext = it_posext * posextx = it_posextx * materiallongtext = it_materiallongtext * plantkeys = it_plantkeys * storagelocationkeys = it_storagelocationkeys * distrchainkeys = it_distrchainkeys * warehousenokeys = it_warehousenokeys * storagetypekeys = it_storagetypekeys * valuationtypekeys = it_valuationtypekeys . " BAPI_MATERIAL_MAINTAINDATA_RT
IF SY-SUBRC EQ 0.   "All OK ENDIF.

ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
ld_return TYPE BAPIRETURN1 ,
ld_headdata TYPE BAPIE1MATHEAD ,
it_variantskeys TYPE STANDARD TABLE OF BAPIE1VARKEY ,
wa_variantskeys LIKE LINE OF it_variantskeys,
it_characteristicvalue TYPE STANDARD TABLE OF BAPIE1AUSPRT ,
wa_characteristicvalue LIKE LINE OF it_characteristicvalue,
it_characteristicvaluex TYPE STANDARD TABLE OF BAPIE1AUSPRTX ,
wa_characteristicvaluex LIKE LINE OF it_characteristicvaluex,
it_clientdata TYPE STANDARD TABLE OF BAPIE1MARART ,
wa_clientdata LIKE LINE OF it_clientdata,
it_clientdatax TYPE STANDARD TABLE OF BAPIE1MARARTX ,
wa_clientdatax LIKE LINE OF it_clientdatax,
it_clientext TYPE STANDARD TABLE OF BAPIE1MARAEXTRT ,
wa_clientext LIKE LINE OF it_clientext,
it_clientextx TYPE STANDARD TABLE OF BAPIE1MARAEXTRTX ,
wa_clientextx LIKE LINE OF it_clientextx,
it_addnlclientdata TYPE STANDARD TABLE OF BAPIE1MAW1RT ,
wa_addnlclientdata LIKE LINE OF it_addnlclientdata,
it_addnlclientdatax TYPE STANDARD TABLE OF BAPIE1MAW1RTX ,
wa_addnlclientdatax LIKE LINE OF it_addnlclientdatax,
it_materialdescription TYPE STANDARD TABLE OF BAPIE1MAKTRT ,
wa_materialdescription LIKE LINE OF it_materialdescription,
it_plantdata TYPE STANDARD TABLE OF BAPIE1MARCRT ,
wa_plantdata LIKE LINE OF it_plantdata,
it_plantdatax TYPE STANDARD TABLE OF BAPIE1MARCRTX ,
wa_plantdatax LIKE LINE OF it_plantdatax,
it_plantext TYPE STANDARD TABLE OF BAPIE1MARCEXTRT ,
wa_plantext LIKE LINE OF it_plantext,
it_plantextx TYPE STANDARD TABLE OF BAPIE1MARCEXTRTX ,
wa_plantextx LIKE LINE OF it_plantextx,
it_forecastparameters TYPE STANDARD TABLE OF BAPIE1MPOPRT ,
wa_forecastparameters LIKE LINE OF it_forecastparameters,
it_forecastparametersx TYPE STANDARD TABLE OF BAPIE1MPOPRTX ,
wa_forecastparametersx LIKE LINE OF it_forecastparametersx,
it_forecastvalues TYPE STANDARD TABLE OF BAPIE1MPRWRT ,
wa_forecastvalues LIKE LINE OF it_forecastvalues,
it_totalconsumption TYPE STANDARD TABLE OF BAPIE1MVEGRT ,
wa_totalconsumption LIKE LINE OF it_totalconsumption,
it_unplndconsumption TYPE STANDARD TABLE OF BAPIE1MVEURT ,
wa_unplndconsumption LIKE LINE OF it_unplndconsumption,
it_planningdata TYPE STANDARD TABLE OF BAPIE1MPGDRT ,
wa_planningdata LIKE LINE OF it_planningdata,
it_planningdatax TYPE STANDARD TABLE OF BAPIE1MPGDRTX ,
wa_planningdatax LIKE LINE OF it_planningdatax,
it_storagelocationdata TYPE STANDARD TABLE OF BAPIE1MARDRT ,
wa_storagelocationdata LIKE LINE OF it_storagelocationdata,
it_storagelocationdatax TYPE STANDARD TABLE OF BAPIE1MARDRTX ,
wa_storagelocationdatax LIKE LINE OF it_storagelocationdatax,
it_storagelocationext TYPE STANDARD TABLE OF BAPIE1MARDEXTRT ,
wa_storagelocationext LIKE LINE OF it_storagelocationext,
it_storagelocationextx TYPE STANDARD TABLE OF BAPIE1MARDEXTRTX ,
wa_storagelocationextx LIKE LINE OF it_storagelocationextx,
it_unitsofmeasure TYPE STANDARD TABLE OF BAPIE1MARMRT ,
wa_unitsofmeasure LIKE LINE OF it_unitsofmeasure,
it_unitsofmeasurex TYPE STANDARD TABLE OF BAPIE1MARMRTX ,
wa_unitsofmeasurex LIKE LINE OF it_unitsofmeasurex,
it_unitofmeasuretexts TYPE STANDARD TABLE OF BAPIE1MAMTRT ,
wa_unitofmeasuretexts LIKE LINE OF it_unitofmeasuretexts,
it_internationalartnos TYPE STANDARD TABLE OF BAPIE1MEANRT ,
wa_internationalartnos LIKE LINE OF it_internationalartnos,
it_vendorean TYPE STANDARD TABLE OF BAPIE1MLEART ,
wa_vendorean LIKE LINE OF it_vendorean,
it_layoutmoduleassgmt TYPE STANDARD TABLE OF BAPIE1MALGRT ,
wa_layoutmoduleassgmt LIKE LINE OF it_layoutmoduleassgmt,
it_layoutmoduleassgmtx TYPE STANDARD TABLE OF BAPIE1MALGRTX ,
wa_layoutmoduleassgmtx LIKE LINE OF it_layoutmoduleassgmtx,
it_taxclassifications TYPE STANDARD TABLE OF BAPIE1MLANRT ,
wa_taxclassifications LIKE LINE OF it_taxclassifications,
it_valuationdata TYPE STANDARD TABLE OF BAPIE1MBEWRT ,
wa_valuationdata LIKE LINE OF it_valuationdata,
it_valuationdatax TYPE STANDARD TABLE OF BAPIE1MBEWRTX ,
wa_valuationdatax LIKE LINE OF it_valuationdatax,
it_valuationext TYPE STANDARD TABLE OF BAPIE1MBEWEXTRT ,
wa_valuationext LIKE LINE OF it_valuationext,
it_valuationextx TYPE STANDARD TABLE OF BAPIE1MBEWEXTRTX ,
wa_valuationextx LIKE LINE OF it_valuationextx,
it_warehousenumberdata TYPE STANDARD TABLE OF BAPIE1MLGNRT ,
wa_warehousenumberdata LIKE LINE OF it_warehousenumberdata,
it_warehousenumberdatax TYPE STANDARD TABLE OF BAPIE1MLGNRTX ,
wa_warehousenumberdatax LIKE LINE OF it_warehousenumberdatax,
it_warehousenumberext TYPE STANDARD TABLE OF BAPIE1MLGNEXTRT ,
wa_warehousenumberext LIKE LINE OF it_warehousenumberext,
it_warehousenumberextx TYPE STANDARD TABLE OF BAPIE1MLGNEXTRTX ,
wa_warehousenumberextx LIKE LINE OF it_warehousenumberextx,
it_storagetypedata TYPE STANDARD TABLE OF BAPIE1MLGTRT ,
wa_storagetypedata LIKE LINE OF it_storagetypedata,
it_storagetypedatax TYPE STANDARD TABLE OF BAPIE1MLGTRTX ,
wa_storagetypedatax LIKE LINE OF it_storagetypedatax,
it_storagetypeext TYPE STANDARD TABLE OF BAPIE1MLGTEXTRT ,
wa_storagetypeext LIKE LINE OF it_storagetypeext,
it_storagetypeextx TYPE STANDARD TABLE OF BAPIE1MLGTEXTRTX ,
wa_storagetypeextx LIKE LINE OF it_storagetypeextx,
it_salesdata TYPE STANDARD TABLE OF BAPIE1MVKERT ,
wa_salesdata LIKE LINE OF it_salesdata,
it_salesdatax TYPE STANDARD TABLE OF BAPIE1MVKERTX ,
wa_salesdatax LIKE LINE OF it_salesdatax,
it_salesext TYPE STANDARD TABLE OF BAPIE1MVKEEXTRT ,
wa_salesext LIKE LINE OF it_salesext,
it_salesextx TYPE STANDARD TABLE OF BAPIE1MVKEEXTRTX ,
wa_salesextx LIKE LINE OF it_salesextx,
it_posdata TYPE STANDARD TABLE OF BAPIE1WLK2RT ,
wa_posdata LIKE LINE OF it_posdata,
it_posdatax TYPE STANDARD TABLE OF BAPIE1WLK2RTX ,
wa_posdatax LIKE LINE OF it_posdatax,
it_posext TYPE STANDARD TABLE OF BAPIE1WLK2EXTRT ,
wa_posext LIKE LINE OF it_posext,
it_posextx TYPE STANDARD TABLE OF BAPIE1WLK2EXTRTX ,
wa_posextx LIKE LINE OF it_posextx,
it_materiallongtext TYPE STANDARD TABLE OF BAPIE1MLTXRT ,
wa_materiallongtext LIKE LINE OF it_materiallongtext,
it_plantkeys TYPE STANDARD TABLE OF BAPIE1WRKKEY ,
wa_plantkeys LIKE LINE OF it_plantkeys,
it_storagelocationkeys TYPE STANDARD TABLE OF BAPIE1LGOKEY ,
wa_storagelocationkeys LIKE LINE OF it_storagelocationkeys,
it_distrchainkeys TYPE STANDARD TABLE OF BAPIE1VTLKEY ,
wa_distrchainkeys LIKE LINE OF it_distrchainkeys,
it_warehousenokeys TYPE STANDARD TABLE OF BAPIE1LGNKEY ,
wa_warehousenokeys LIKE LINE OF it_warehousenokeys,
it_storagetypekeys TYPE STANDARD TABLE OF BAPIE1LGTKEY ,
wa_storagetypekeys LIKE LINE OF it_storagetypekeys,
it_valuationtypekeys TYPE STANDARD TABLE OF BAPIE1BWAKEY ,
wa_valuationtypekeys LIKE LINE OF it_valuationtypekeys.

ld_return = 'Check type of data required'.
ld_headdata = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_variantskeys to it_variantskeys.

"populate fields of struture and append to itab
append wa_characteristicvalue to it_characteristicvalue.

"populate fields of struture and append to itab
append wa_characteristicvaluex to it_characteristicvaluex.

"populate fields of struture and append to itab
append wa_clientdata to it_clientdata.

"populate fields of struture and append to itab
append wa_clientdatax to it_clientdatax.

"populate fields of struture and append to itab
append wa_clientext to it_clientext.

"populate fields of struture and append to itab
append wa_clientextx to it_clientextx.

"populate fields of struture and append to itab
append wa_addnlclientdata to it_addnlclientdata.

"populate fields of struture and append to itab
append wa_addnlclientdatax to it_addnlclientdatax.

"populate fields of struture and append to itab
append wa_materialdescription to it_materialdescription.

"populate fields of struture and append to itab
append wa_plantdata to it_plantdata.

"populate fields of struture and append to itab
append wa_plantdatax to it_plantdatax.

"populate fields of struture and append to itab
append wa_plantext to it_plantext.

"populate fields of struture and append to itab
append wa_plantextx to it_plantextx.

"populate fields of struture and append to itab
append wa_forecastparameters to it_forecastparameters.

"populate fields of struture and append to itab
append wa_forecastparametersx to it_forecastparametersx.

"populate fields of struture and append to itab
append wa_forecastvalues to it_forecastvalues.

"populate fields of struture and append to itab
append wa_totalconsumption to it_totalconsumption.

"populate fields of struture and append to itab
append wa_unplndconsumption to it_unplndconsumption.

"populate fields of struture and append to itab
append wa_planningdata to it_planningdata.

"populate fields of struture and append to itab
append wa_planningdatax to it_planningdatax.

"populate fields of struture and append to itab
append wa_storagelocationdata to it_storagelocationdata.

"populate fields of struture and append to itab
append wa_storagelocationdatax to it_storagelocationdatax.

"populate fields of struture and append to itab
append wa_storagelocationext to it_storagelocationext.

"populate fields of struture and append to itab
append wa_storagelocationextx to it_storagelocationextx.

"populate fields of struture and append to itab
append wa_unitsofmeasure to it_unitsofmeasure.

"populate fields of struture and append to itab
append wa_unitsofmeasurex to it_unitsofmeasurex.

"populate fields of struture and append to itab
append wa_unitofmeasuretexts to it_unitofmeasuretexts.

"populate fields of struture and append to itab
append wa_internationalartnos to it_internationalartnos.

"populate fields of struture and append to itab
append wa_vendorean to it_vendorean.

"populate fields of struture and append to itab
append wa_layoutmoduleassgmt to it_layoutmoduleassgmt.

"populate fields of struture and append to itab
append wa_layoutmoduleassgmtx to it_layoutmoduleassgmtx.

"populate fields of struture and append to itab
append wa_taxclassifications to it_taxclassifications.

"populate fields of struture and append to itab
append wa_valuationdata to it_valuationdata.

"populate fields of struture and append to itab
append wa_valuationdatax to it_valuationdatax.

"populate fields of struture and append to itab
append wa_valuationext to it_valuationext.

"populate fields of struture and append to itab
append wa_valuationextx to it_valuationextx.

"populate fields of struture and append to itab
append wa_warehousenumberdata to it_warehousenumberdata.

"populate fields of struture and append to itab
append wa_warehousenumberdatax to it_warehousenumberdatax.

"populate fields of struture and append to itab
append wa_warehousenumberext to it_warehousenumberext.

"populate fields of struture and append to itab
append wa_warehousenumberextx to it_warehousenumberextx.

"populate fields of struture and append to itab
append wa_storagetypedata to it_storagetypedata.

"populate fields of struture and append to itab
append wa_storagetypedatax to it_storagetypedatax.

"populate fields of struture and append to itab
append wa_storagetypeext to it_storagetypeext.

"populate fields of struture and append to itab
append wa_storagetypeextx to it_storagetypeextx.

"populate fields of struture and append to itab
append wa_salesdata to it_salesdata.

"populate fields of struture and append to itab
append wa_salesdatax to it_salesdatax.

"populate fields of struture and append to itab
append wa_salesext to it_salesext.

"populate fields of struture and append to itab
append wa_salesextx to it_salesextx.

"populate fields of struture and append to itab
append wa_posdata to it_posdata.

"populate fields of struture and append to itab
append wa_posdatax to it_posdatax.

"populate fields of struture and append to itab
append wa_posext to it_posext.

"populate fields of struture and append to itab
append wa_posextx to it_posextx.

"populate fields of struture and append to itab
append wa_materiallongtext to it_materiallongtext.

"populate fields of struture and append to itab
append wa_plantkeys to it_plantkeys.

"populate fields of struture and append to itab
append wa_storagelocationkeys to it_storagelocationkeys.

"populate fields of struture and append to itab
append wa_distrchainkeys to it_distrchainkeys.

"populate fields of struture and append to itab
append wa_warehousenokeys to it_warehousenokeys.

"populate fields of struture and append to itab
append wa_storagetypekeys to it_storagetypekeys.

"populate fields of struture and append to itab
append wa_valuationtypekeys to it_valuationtypekeys..

SAP Documentation for FM BAPI_MATERIAL_MAINTAINDATA_RT


You use this method to create new material master data or to change existing material master data. ...See here for full SAP fm documentation