在S/4HANA事务码CO03显示的Production Order里,我希望用ABAP代码显示出该订单的operation(工序)ID,描述和状态Status,如下图所示:

用ABAP代码读取S/4HANA生产订单工序明细-LMLPHP

很简单的几行ABAP代码:

DATA: lt_operation TYPE TABLE OF afvgd.

CALL FUNCTION 'PM_ORDER_DATA_READ'
EXPORTING
order_number = '000001000381'
TABLES
iafvgd = lt_operation
EXCEPTIONS
order_not_found = 1. IF sy-subrc <> 0.
WRITE:/ 'not exist'.
RETURN.
ENDIF.

需要读取的数据都在这里:

用ABAP代码读取S/4HANA生产订单工序明细-LMLPHP

用ABAP代码读取S/4HANA生产订单工序明细-LMLPHP

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

用ABAP代码读取S/4HANA生产订单工序明细-LMLPHP

05-02 21:52