You use this method to close a document in the office application
CALL METHOD document->close_document
EXPORTING do_save = do_save
no_flush = no_flush
IMPORTING has_changed = has_changed
error = error
retcode = retcode
Description of parameters
Parameter |
Optional |
Description |
do_save |
X |
Determines whether the document should be saved |
has_changed |
X |
Flags whether the office application document was changed |
When you have executed the method close_document without saving the document, you must always execute the method release_document to initialize the document.
You can also call the close_document method even if the document is already closed. This does not return an error, and in this way you can retrieve a correct value for the has_changed parameter. This is safer and quicker than calling is_open followed by close_document.