[ABAP] Einkaufsbeleg freigeben

PARAMETERS: p_ebeln TYPE ebeln.

* ME29N
CALL FUNCTION 'ME_RELEASE_PURCHASE_DOCUMENT'
  EXPORTING
    i_ebeln      = p_ebeln
  EXCEPTIONS
    not_found    = 1
    no_authority = 2
    invalid_call = 3
    OTHERS       = 4.

IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.