介绍一个PP模块的BAPI, “BAPI_PRODORD_GET_DETAIL”,通过这个BAPI能取得PP订单的详细信息.

[BAPI]取得生产订单详细信息[BAPI_PRODORD_GET_DETAIL]

具体能读取的详细信息包括:

  • 抬头(Header)
  • 行项目(Item)
  • 工序中的Sequence
  • 工序(Operation)
  • 子工序(Suboperation or secondary resource)
  • 触发点(Trigger point)
  • 组件(Component)
  • Production resource/tool

可以通过输入参数ORDER_OBJECTS指定:

[BAPI]取得生产订单详细信息[BAPI_PRODORD_GET_DETAIL]

其他:执行这个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查看。

[BAPI]取得生产订单详细信息[BAPI_PRODORD_GET_DETAIL]

以上。

相关文章:

  • 2021-07-10
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
  • 2021-08-12
  • 2022-01-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-05
  • 2021-08-12
  • 2021-11-24
  • 2021-07-25
  • 2021-12-18
  • 2021-07-10
相关资源
相似解决方案