需求:
Bapi:BAPI_MATERIAL_SAVEREPLICA
代码:
DATA:
CLIENTDATA LIKE TABLE OF BAPIE1MARA WITH HEADER LINE,
CLIENTDATAX LIKE TABLE OF BAPIE1MARAX WITH HEADER LINE,
"默认采购价值代码为20%
CLIENTDATA-PUR_VALKEY = '5'.
CLIENTDATAX-PUR_VALKEY = 'X'.
调用:
CALL FUNCTION 'BAPI_MATERIAL_SAVEREPLICA'
EXPORTING
NOAPPLLOG = ''
NOCHANGEDOC = ''
TESTRUN = TESTRUN
INPFLDCHECK = INP_FLD_CHECK
IMPORTING
RETURN = RETURN
TABLES
HEADDATA = HEADDATA
CLIENTDATA = CLIENTDATA
CLIENTDATAX = CLIENTDATAX
PLANTDATA = PLANTDATA
PLANTDATAX = PLANTDATAX
FORECASTPARAMETERS = FORECASTPARAMETERS
FORECASTPARAMETERSX = FORECASTPARAMETERSX
STORAGELOCATIONDATA = STORAGELOCATIONDATA
STORAGELOCATIONDATAX = STORAGELOCATIONDATAX
VALUATIONDATA = VALUATIONDATA
VALUATIONDATAX = VALUATIONDATAX
SALESDATA = SALESDATA
SALESDATAX = SALESDATAX
MATERIALDESCRIPTION = MATERIALDESCRIPTION
UNITSOFMEASURE = UNITSOFMEASURE
UNITSOFMEASUREX = UNITSOFMEASUREX
TAXCLASSIFICATIONS = TAXCLASSIFICATIONS
EXTENSIONIN = EXTENSIONIN
EXTENSIONINX = EXTENSIONINX
RETURNMESSAGES = RETURNMESSAGES.
LOOP AT RETURNMESSAGES WHERE TYPE = 'E' OR TYPE = 'A'.
E_SUCC = 'E'.
E_MESSAGE = E_MESSAGE && RETURNMESSAGES-MESSAGE.
ENDLOOP.