BAPI_MATERIAL_SAVEDATA CLIENTDATA结构无此字段。
DATA:LS_TE_MARA TYPE BAPI_TE_MARA.
DATA:LS_TE_MARAX TYPE BAPI_TE_MARAX.
DATA:LT_BAPIPAREX TYPE TABLE OF BAPIPAREX.
DATA:LS_BAPIPAREX TYPE BAPIPAREX.
DATA:LT_BAPIPAREXX TYPE TABLE OF BAPIPAREXX.
DATA:LS_BAPIPAREXX TYPE BAPIPAREXX.
*生产许可证号
LS_TE_MARA-MATERIAL = PS_INFOS-MATNR .
LS_TE_MARA-MSBOOKPARTNO = PS_INFOS-MSBOOKPARTNO .
LS_BAPIPAREX-STRUCTURE = ‘BAPI_TE_MARA’ .
LS_BAPIPAREX+30(960) = LS_TE_MARA .
APPEND LS_BAPIPAREX TO LT_BAPIPAREX .
LS_TE_MARAX-MATERIAL = PS_INFOS-MATNR .
LS_TE_MARAX-MSBOOKPARTNO = ‘X’ .
LS_BAPIPAREXX-STRUCTURE = ‘BAPI_TE_MARAX’ .
LS_BAPIPAREXX+30(960) = LS_TE_MARAX .
APPEND LS_BAPIPAREXX TO LT_BAPIPAREXX .
*默认字段
CALL FUNCTION ‘BAPI_MATERIAL_SAVEDATA’
EXPORTING
HEADDATA = LS_BAPIMATHEAD
CLIENTDATA = LS_CLIENTDATA
CLIENTDATAX = LS_CLIENTDATAX
IMPORTING
RETURN = LS_BAPIRET2
TABLES
MATERIALDESCRIPTION = LT_DESCRIPTION
MATERIALLONGTEXT = LT_LONG
UNITSOFMEASURE = LT_UNITSOFMEASURE
UNITSOFMEASUREX = LT_UNITSOFMEASUREX
EXTENSIONIN = LT_BAPIPAREX
EXTENSIONINX = LT_BAPIPAREXX
RETURNMESSAGES = LT_BAPI_MATRETURN2[].
事务码OMSR 添加该字段。