SAP MM取消採購訂單審批--- BAPI_PO_RESET_RELEASE

dicksonjyl560101發表於2015-07-13

SAP MM取消採購訂單審--- BAPI_PO_RESET_RELEASE

http://blog.chinaunix.net/uid-15016030-id-12238.html

 

REPORT Z_RESET_RELEASE_PO.

SELECTION-SCREEN BEGIN OF BLOCK BLK1
                          WITH FRAME TITLE TEXT-001.
  PARAMETERS:P_EBELN TYPE EBELN,
             P_FRGCO TYPE FRGCO.
SELECTION-SCREEN END OF BLOCK BLK1.

CALL FUNCTION 'BAPI_PO_RESET_RELEASE'
  EXPORTING
    purchaseorder                  = P_EBELN
    po_rel_code                    = P_FRGCO
   USE_EXCEPTIONS                 = 'X'
* IMPORTING
*   REL_STATUS_NEW                 =
*   REL_INDICATOR_NEW              =
* TABLES
*   RETURN                         =
 EXCEPTIONS
   AUTHORITY_CHECK_FAIL           = 1
   DOCUMENT_NOT_FOUND             = 2
   ENQUEUE_FAIL                   = 3
   PREREQUISITE_FAIL              = 4
   RELEASE_ALREADY_POSTED         = 5
   RESPONSIBILITY_FAIL            = 6
   NO_RELEASE_ALREADY             = 7
   NO_NEW_RELEASE_INDICATOR       = 8
   OTHERS                         9
          .
IF sy-subrc <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
  WRITE:'取消
批成功!'.
ENDIF.

 

微信JINYULIN_SH_

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29829936/viewspace-1731442/,如需轉載,請註明出處,否則將追究法律責任。

相關文章