You use this method to create an instance for
Managing a DocumentCALL METHOD control->get_document_proxy
EXPORTING document_type = document_type
document_format = document_format
register_container = register_container
no_flush = no_flush
IMPORTING document_proxy = document_proxy
retcode = retcode
error = error.
Description of parameters
Parameter |
Optional |
Description |
document_type |
The type of document. The corresponding application is started using this identifier. | |
document_format |
X |
One of the following formats: OLE: Microsoft's Compound Document Format NATIVE: Application-specific format RTF: Rich Text Format |
register_container |
X |
You need to register a container for office applications that do not support a container property (see note). |
document_proxy |
Creates an instance for document management. You define this instance with reference to the interface i_oi_document_proxy: |
Do not hard-code the document type. Instead, use customizing tables or a user dialog to set it. To view possible document types, use the method get_registered_doc_types.
Examples of document types:
Word.Document.8: |
Word97 |
Excel.Sheet.8 |
Excel97 Worksheet |
Excel.Chart.8 |
Excel97 Chart |
Word.Document |
The current latest version of Word. |
Many office applications either do not have a hierarchic object model for internal objects (application, document, sheet, cell, and so on) or, if they do have one, do not have a property in the document object that points to the OLE document container. However, this is required for message communication with the R/3 System and for data exchange using the Table Collection.
To allow you to use these desktop applications, you can register the SAP Document Container for the relevant document using the optional register_container parameter. You can then access it using the GetObject() function, as demonstrated in the following VBA example:
Sub R3Test
Dim cont as Object
Set cont = GetObject(, "SAP.DocumentContainer")
cont.SendCustomEvent("ON_DATA_CHANGE")
End Sub