介绍一个PP模块的BAPI, “BAPI_PRODORD_GET_DETAIL”,通过这个BAPI能取得PP订单的详细信息.
具体能读取的详细信息包括:
- 子工序(Suboperation or secondary resource)
可以通过输入参数ORDER_OBJECTS指定:
其他:执行这个BAPI需要权限对象 C_AFKO_AWK有03 (display activity).
一段简单的例子代码:取得PP订单组件(Components)和工序(operations)
DATA: lwa_object TYPE bapi_pp_order_objects, "objects
lit_components TYPE TABLE OF bapi_order_component, "components.
lit_operations TYPE TABLE OF bapi_order_operation1. "operations
lwa_object-components = abap_true.
lwa_object-operations = abap_true.
CALL FUNCTION 'BAPI_PRODORD_GET_DETAIL'
EXPORTING
number = <lfs_afpo>-aufnr
order_objects = lwa_object
TABLES
component = lit_components
operation = lit_operations.
生产订单可以在前台通过tcode CO03查看。
以上。