Entering content frameSyntax documentation open_document Locate the document in its SAP Library structure

You use this method to open an existing document:

CALL METHOD document->open_document
     EXPORTING document_title   = document_title
               document_url     = document_url
               open_inplace     = open_inplace
               open_readonly    = open_readonly
               onsave_macro     = onsave_macro
               startup_macro    = startup_macro
               protect_document = protect_document
               user_info        = user_info
               no_flush         = no_flush
     IMPORTING error            = error
               retcode          = retcode.

Description of parameters

Parameter

Optional

Description

document_title

X

Title to be displayed in the title bar of the desktop application.

document_url

 

The URL address of the document

open_inplace

X

'X': Document is opened within the R/3 window (only if the parameter inplace = ‘X’ was set when you called the method get_document_proxy).

' ': Document is opened in a separate window.

open_readonly

X

Open in display mode (the close_event event is not triggered when the document is closed, and the parameter has_changed is always initial).

onsave_macro

X

The name of a macro that is called if the document has been changed and one of the following conditions applies:

  • The user closes the application (if it is not running in-place)
  • You use one of the following methods:
    • save_document
    • reopen_document with do_save = 'X'
    • close_document with do_save = 'X'

The Macro must be stored in the document.

Note: What constitutes a change to the document differs from application to application:

  • MS Project and MS Excel almost always consider the document to have been changed, so the macro is called even if you have not made any physical changes
  • In MS Word and MS Powerpoint, you must physically change the document in order for the macro to be called

startup_macro

X

Macro to be run when you open the document.

protect_document

X

Flags whether to protect document against changes. It is still possible to select within the document.

user_info

X

Logon and proxy data for accessing an HTTP or FTP server.

Caution

You can only start one document in the R/3 window (in place).

URLs of documents in the local file system must be prefaced with ‘file://’.

 

 

Leaving content frame