[ABAP] BANF freigeben

PARAMETERS: p_banfn TYPE eban-banfn.

DATA(lv_updated) = VALUE char1( ).

* ME54N
CALL FUNCTION 'ME_RELEASE_REQUISITION'
  EXPORTING
    im_banfn     = p_banfn
  IMPORTING
    ex_updkz     = lv_updated
  EXCEPTIONS
    no_authority = 1
    OTHERS       = 2.

IF sy-subrc = 0.
  IF lv_updated = abap_true.
    WRITE: / 'Updated.'.
  ELSE.
    WRITE: / 'Not updated.'.
  ENDIF.
ELSE.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.