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
**..... 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 Description Description Description Description Description Description Description Description |
729800 | Checkin/checkout with document BAPIs in Unicode systems |