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.