标签:业务 inf epo 订单 .com mamicode order image art
转自:https://www.cnblogs.com/jinyin/p/10598124.html
用户希望创建采购订单时,输入行项目时,能根据采购订单类型,自动带出科目分类类别。
业务顾问看了一下配置,不能实现这个功能,所以用增强实现。
采购订单BADI增强:ME_PROCESS_PO_CUST。SE19创建BADI实现,进入实施类方法: IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM ,添加代码。
DATA: ls_item TYPE mepoitem, " 行项目 ls_header TYPE REF TO if_purchase_order_mm, " 抬头 ls_ekko TYPE mepoheader. " 抬头信息 " 获取抬头对象 CALL METHOD im_item->get_header RECEIVING re_header = ls_header. " 获取采购订单抬头信息 CALL METHOD ls_header->get_data RECEIVING re_data = ls_ekko. IF ls_ekko-bsart = ‘ZKF‘. " 获取采购行信息 CALL METHOD im_item->get_data RECEIVING re_data = ls_item. ls_item-knttp = ‘F‘. " 设置科目分配类别 " 设置采购行数据 CALL METHOD im_item->set_data EXPORTING im_data = ls_item.
ENDIF.
ME_PROCESS_PO_CUST 实现采购订单行项目增强
标签:业务 inf epo 订单 .com mamicode order image art
原文地址:https://www.cnblogs.com/rainysblog/p/10856920.html