Fonction SAP BAPI_DOCUMENT_CHECKOUTMODIFY - Check out document for processing

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
DOCUMENTFILE BAPI_DOC_AUX-FILENAME C 255 SPACE X File Name that Document is Stored Under
DOCUMENTNUMBER BAPI_DOC_AUX-DOCNUMBER C 25 Document Number
DOCUMENTPART BAPI_DOC_AUX-DOCPART C 3 Document Part
DOCUMENTTYPE BAPI_DOC_AUX-DOCTYPE C 3 Document Type
DOCUMENTVERSION BAPI_DOC_AUX-DOCVERSION C 2 Document Version
HOSTNAME BAPI_DOC_AUX-HOSTNAME C 20 SPACE X Name of Frontend
ORIGINALPATH BAPI_DOC_AUX-FILENAME C 255 SPACE X Path / Data Carrier Where Original Is Stored
ORIGINALTYPE BAPI_DOC_AUX-FLAG C 1 Original Number (1,2)
STATUSEXTERN BAPI_DOC_DRAW-STATUSEXTERN C 2 SPACE X New Status (External)
STATUSINTERN BAPI_DOC_DRAW-STATUSINTERN C 2 SPACE X New Status (Internal)
STATUSLOG BAPI_DOC_DRAW-STATUSLOG C 20 SPACE X Status Log

Paramètre Reférence Type Long. Description
DOCUMENTFILE BAPI_DOC_AUX-FILENAME C 255 File Name that Document is Stored Under
RETURN BAPIRET2 u 548 BAPI Return

Functionality
This function module is out of date. Use Bapi_Document_Checkoutmodify2.
This method is used to check out a document for processing.
Restrictions:

  • Additional files are not supported.

  • You cannot check out several documents for processing at the same time.

  • **..... Document key
    DATA: lf_doctype LIKE bapi_doc_draw-documenttype,
    lf_docnumber LIKE bapi_doc_draw-documentnumber,
    lf_docpart LIKE bapi_doc_draw-documenttype,
    lf_docversion LIKE bapi_doc_draw-documenttype,
    lf_filename LIKE bapi_doc_draw-docfile1,
    lf_status LIKE bapi_doc_draw-statusextern,
    **.... Bapi-Return structure
    ls_return LIKE bapiret2.
    **----------------------------------------------------------------------
    ** Assign document data
    lf_doctype = 'DRW'.
    lf_docnumber = '4711'.
    lf_docversion = '000'.
    lf_docpart = '00'.
    REFRESH lt_files.
    CLEAR lt_files.
    ** Define path where you want original to be stored
    lf_filename = 'c:\temp\work.dwg'.
    ** Set new status for document
    lf_status = 'IA'.
    ** Check out document (original 1) for processing
    CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTMODIFY'
    EXPORTING: documenttype = lf_doctype
    documentnumber = lf_docnumber
    documentpart = lf_docpart
    documentversion = lf_docversion
    originaltype = '1'
    documentfile = lf_filename
    statusextern = lf_status
    IMPORTING: return = ls_return.
    ** Errors ??
    IF ls_return-type CA 'EA'.
    ROLLBACK WORK.
    MESSAGE ID '26' TYPE 'I' NUMBER '000'
    WITH ls_return-message.
    ELSE.
    COMMIT WORK.
    ENDIF.

    Description
    File name indicating where the original is stored
    - If an ORIGINALPATH and DOCUMENTFILE has been defined, the originalis stored under the given path and with this file name
    - If the ORIGINALPATH has been defined, but not the DOCUMENTFILE, thenthe original is stored under the given path but with the file namefrom the DMS
    - If neither the ORIGINALPATH nor the DOCUMENTFILE has been defined,the original is stored under the path and file name from the DMS

    Description
    Return structure for messages

    Description
    File name indicating where the original is stored
    - If an ORIGINALPATH and DOCUMENTFILE has been defined, the originalis stored under the given path and with this file name
    - If the ORIGINALPATH has been defined, but not the DOCUMENTFILE, thenthe original is stored under the given path but with the file namefrom the DMS
    - If neither the ORIGINALPATH nor the DOCUMENTFILE has been defined,the original is stored under the path and file name from the DMS

    Description
    Computer name of front end that BAPI has been called from.
    This is only required if the function module is called from an externalsystem. The computer name is used for determining the correct front endtype in Customizing for the Document Management System.

    Description
    Path or data carrier name of server where the document is stored.

    Description
    Original that should be checked out (original 1 or 2).

    Description
    New (external) status abbreviation for the document after the checkout.
    If the internal status is copied, it always has priority over the
    external status abbreviation.

    Description
    New (internal) status for document after it has been checked out.
    If the internal status is copied, it always has priority over the
    external status abbreviation.

    Description
    Entry in status log if a new status is set.

729800Checkin/checkout with document BAPIs in Unicode systems