ABAP—生产订单锁(CO_ZF_ORDER_LOCK)

 

    clear:lv_message.
    CALL FUNCTION 'CO_ZF_ORDER_LOCK'
      EXPORTING
        aufnr                = gt_data-aufnr
        autyp                = '10'
        client               = sy-mandt
        scope                = '2'
*      SIMULATE             = ' '
      EXCEPTIONS
        order_already_locked = 1
        system_failure       = 2
        OTHERS               = 3.
    IF sy-subrc <> 0.
* Implement suitable error handling here
      CONCATENATE gt_data-aufnr '' SY-MSGV1 '正在处理' INTO lv_message.
      MESSage lv_message TYPE  'E' .
    ENDIF.

 

posted @ 2021-07-13 14:03  cqyyck  阅读(375)  评论(0编辑  收藏  举报