标签:ant 采购 类别 集成 uitable 调用函数 lis ini png
此文档使用函数:ME_DIRECT_INPUT_SOURCE_LIST创建货源清单
事务代码:ME01
输入抬头信息
保存即可
定义参数
字段
调用函数
DATA:LT_EORD TYPE TABLE OF EORDU,
LS_EORD TYPE EORDU,
LV_MATNR TYPE EORD-MATNR,
LV_WERKS TYPE EORD-WERKS.
LV_MATNR = ‘000000000000000431‘."物料
LV_WERKS = ‘2000‘."工厂
CLEAR:LS_EORD.
LS_EORD-MATNR = ‘000000000000000431‘."物料
LS_EORD-WERKS = ‘2000‘."工厂
LS_EORD-VDATU = ‘20191210‘."有效期从
LS_EORD-BDATU = ‘20191230‘."有效期至
LS_EORD-LIFNR = ‘0070003311‘."供应商
LS_EORD-EKORG = ‘2000‘."采购组织
LS_EORD-RESWK = ‘‘."采购物料的工厂
LS_EORD-EORTP = ‘0‘."资源清单记录的类别
LS_EORD-AUTET = ‘‘."WA_INPUT-AUTET."物料计划中的资源清单使用
LS_EORD-ERDAT = SY-DATUM."记录的创建日期
LS_EORD-ERNAM = SY-UNAME."创建人
LS_EORD-ZEORD = ‘00001‘."RECORD-ZEORD."资源清单记录号
LS_EORD-KZ = ‘I‘."复选框 I新增 U更新
APPEND LS_EORD TO LT_EORD.
CALL FUNCTION ‘ME_INITIALIZE_SOURCE_LIST‘."源清单维护初始化
CALL FUNCTION ‘ME_DIRECT_INPUT_SOURCE_LIST‘
EXPORTING
I_MATNR = LV_MATNR
I_WERKS = LV_WERKS
* I_MT06E =
* I_NO_MATERIAL_READ =
* ACTIVITY = ‘V‘
* I_VORGA =
* I_LOGSY =
TABLES
T_EORD = LT_EORD
EXCEPTIONS
PLANT_MISSING = 1
MATERIAL_MISSING = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
MESSAGE ‘创建货源清单失败‘ TYPE ‘S‘ DISPLAY LIKE ‘E‘.
RETURN.
ELSE.
CALL FUNCTION ‘ME_POST_SOURCE_LIST_NEW‘ "在集成商品维护中过帐订单
EXPORTING
I_MATNR = LV_MATNR
* O_MATNR =
.
CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT‘
EXPORTING
WAIT = ‘X‘.
MESSAGE ‘创建货源清单成功‘ TYPE ‘S‘.
ENDIF.
标签:ant 采购 类别 集成 uitable 调用函数 lis ini png
原文地址:https://www.cnblogs.com/BinGeneral/p/12858427.html