zoukankan      html  css  js  c++  java
  • [函数]如何取得生产订单下的工序(operation)-[PM_ORDER_DATA_READ]

    1, 前台操作

    在前台可以通过tcode:CO03查看生产订单工序。

    选择order entered 选项,输入生产订单

    进入到工序的详细屏幕:

    2, 例子代码

    可以通过函数 PM_ORDER_DATA_READ来读取生产订单下的工序(operation),包括子工序(sub-operation),值得注意的是在调用函数 PM_ORDER_DATA_READ之前要先调用 CO_IT_SET_FLG_ITAB_NEW来reset一些内表。

    下面例子读取了1中订单 ‘000100003145’下的工序和子工序。

    REPORT ztest_get_operation.
    
    DATA: lit_afvgd TYPE afvgd_t,
          lwa_afvgd LIKE LINE OF lit_afvgd.
    
    * Reset data before calling to PM_ORDER_DATA_READ
    CALL FUNCTION 'CO_IT_SET_FLG_ITAB_NEW' .
    
    * Get operations
    CALL FUNCTION 'PM_ORDER_DATA_READ'
      EXPORTING
        order_number    = '000100003145'
    *   CALL_FROM_NOTIF =
    * IMPORTING
    *   WCAUFVD         =
    *   WILOA           =
    *   WRIWO1          =
      TABLES
    *   IAFFHD          =
        iafvgd          = lit_afvgd
    *   IRESBD          =
    *   IRIPW0          =
    *   OP_PRINT_TAB    =
    *   IHPAD_TAB       =
    *   IHSG_TAB        =
    *   IHGNS_TAB       =
    *   KBEDP_TAB       =
      EXCEPTIONS
        order_not_found = 1
        OTHERS          = 2.
    IF sy-subrc = 0.
      LOOP AT lit_afvgd INTO lwa_afvgd.
        WRITE:/ lwa_afvgd-vornr, "operation
                lwa_afvgd-uvorn. "sub-operation
      ENDLOOP.
    ENDIF.

    运行结果与CO03中的结果一致。

    以上。

  • 相关阅读:
    hihoCoder 1148 2月29日
    Java 之常用运算符(3)
    Java 之变量和常量(2)
    Codeforces Round #414 A. Bank Robbery
    Codeforces Round #413 B. T-shirt buying
    C++中 set(集合容器)的用法
    Codeforces Round #411 B. 3-palindrome
    Codeforces Round #411 A. Fake NP
    Codeforces Round #413 A. Carrot Cakes
    Codeforces Round #412 B. T-Shirt Hunt
  • 原文地址:https://www.cnblogs.com/datie/p/11433545.html
Copyright © 2011-2022 走看看