本文共 1584 字,大约阅读时间需要 5 分钟。
BASIC_VIEW 基本数据视图 标志
MATNR 物料编码MAKTX 物料描述MEINS 单位MTART 物料类型MBRSH 行业领域调用BAPI
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA' EXPORTING headdata = pw_header "BASIC_VIEW 、MATNR、MBRSH、MTART clientdata = pw_mara "MEINS、MAKTX clientdatax = pw_marax plantdata = pw_marc plantdatax = pw_marcx forecastparameters = pw_mpop forecastparametersx = pw_mpopx planningdata = pw_mpgd planningdatax = pw_mpgdx storagelocationdata = pw_mard storagelocationdatax = pw_mardx valuationdata = pw_mbew valuationdatax = pw_mbewx warehousenumberdata = pw_mlgn warehousenumberdatax = pw_mlgnx salesdata = pw_mvke salesdatax = pw_mvkex storagetypedata = pw_mlgt storagetypedatax = pw_mlgtx IMPORTING return = lw_return TABLES materialdescription = pt_makt unitsofmeasure = pt_marm unitsofmeasurex = pt_marmx internationalartnos = pt_mean materiallongtext = pt_mltx taxclassifications = pt_mlan returnmessages = pt_matreturn2 prtdata = pt_mfhm prtdatax = pt_mfhmx extensionin = gt_extensionin extensioninx = gt_extensioninx. IF lw_return-type = 'E'. CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'. ELSE. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = 'X'. ENDIF.
如上述代码所示,只有前两个参数是必须得,就可以创建出【仅包含基本视图的】物料主数据
为上述FM提供返回值,如下图所示转载地址:http://qwdxx.baihongyu.com/