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

試著忘記壹切 提交于 2021-02-02 06:29:46

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

<img class="alignnone size-full wp-image-4521" src="http://www.baidusap.com/wp-content/uploads/2017-04-19_11-35-10.png" alt="" width="792" height="276" srcset="http://www.baidusap.com/wp-content/uploads/2017-04-19_11-35-10.png 792w, http://www.baidusap.com/wp-content/uploads/2017-04-19_11-35-10-740x258.png 740w, http://www.baidusap.com/wp-content/uploads/2017-04-19_11-35-10-768x268.png 768w" sizes="(max-width: 792px) 100vw, 792px" />

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

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

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

<img class="alignnone size-full wp-image-4522" src="http://www.baidusap.com/wp-content/uploads/2017-04-19_11-37-03.png" alt="" width="779" height="342" srcset="http://www.baidusap.com/wp-content/uploads/2017-04-19_11-37-03.png 779w, http://www.baidusap.com/wp-content/uploads/2017-04-19_11-37-03-740x325.png 740w, http://www.baidusap.com/wp-content/uploads/2017-04-19_11-37-03-768x337.png 768w" sizes="(max-width: 779px) 100vw, 779px" />

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

&amp;lt;img class="alignnone size-full wp-image-4527" src="http://www.baidusap.com/wp-content/uploads/2017-04-19_11-44-43.png" alt="" width="485" height="310" /&amp;gt;

以上。

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!