Siparişin LOCKlı Olup Olmadığının Kontrolü

Siparişin bloke durumunu gösteren fonksiyon.

PERFORM f_check_if_order_locked USING p_aufnr CHANGING lv_locked.


*&---------------------------------------------------------------------*

*&      Form  F_CHECK_IF_ORDER_LOCKED
*&---------------------------------------------------------------------*
FORM f_check_if_order_locked USING p_aufnr TYPE aufnr
                          CHANGING p_locked TYPE char1.

  DATAlt_order_tab TYPE TABLE OF ord_pre,
        ls_ord       TYPE ord_pre,
        lv_flag      TYPE rc27x-flg_sel.

  CLEAR p_locked.

  CLEAR ls_ord.
  ls_ord-aufnr p_aufnr.
  APPEND ls_ord TO lt_order_tab.

  CALL FUNCTION `CO_ZF_ORDER_READ`
    EXPORTING
      flg_dialog               ` `
    IMPORTING
      flg_enqueue_ok           lv_flag
    TABLES
      aufnr_tab_imp            lt_order_tab
    EXCEPTIONS
      order_not_found          1
      release_no_change        2
      others                   3
            .
  IF sy-subrc 0.
    IF lv_flag NE `X`.
      p_locked abap_true.
    ENDIF.
  ENDIF.

ENDFORM.                    " F_CHECK_IF_ORDER_LOCKED