You can use the OfficeControl UI element to add an Office document to a view. This means you can display the following Office documents within a Web Dynpro application:
Microsoft Word documents with the doc file extension
Microsoft Excel document with the xls file extension
Microsoft Project documents with the mpp file extension
When MS Project documents (IF_IOS_PROJECT~EXPORT_XML and IF_IOS_PROJECT~IMPORT_XML) are imported and exported, for security reasons a whitelist is evaluated. A reference is made to the name of the whitelist on the IF_IOS_PROJECT~SET_WHITELIST interface. It is the same whitelist as used for AcfUpDownload. The Download/Upload paths are used.
The OfficeControl UI element is made available as an Active UI Element (ActiveX control element), so that the UI element can be displayed in browsers that support ActiveX controls.
If Microsoft Office and browsers that do not support ActiveX controls are used, the following runtime exception is raised: Office Integration through Applet is not supported.
The integration of active controls like OfficeControl in Web Dynpro ABAP popups is not supported.
Prerequisites
Installation of Microsoft Office. For more information about the Office versions supported by SAP, see SAP Note 892638.
ActiveX must be activated in the browser.
Details
The implementation of the OfficeControl UI element supports the following functions for the Office documents mentioned earlier:
Open
Close
Save
Create new documents
Note that you can open and close a document by setting the visible property of the OfficeControl UI elements to visible or none.
Also note that the OfficeControl is only active when the visible property is set to visible. Background processing is activated when the visible property is set, and width and height = 0.
In the Expert Mode additional method calls for complex operations are provided.
Runtime Class |
CL_WD_OFFICE_CONTROL |
Properties in View Designer
Name |
Type |
Initial Value |
Bindable |
STRING |
(automatic) |
No |
|
WDY_BOOLEAN |
true |
Yes |
|
STRING |
No |
||
STRING |
No |
||
STRING |
No |
||
STRING |
No |
||
WDUI_CONTEXT_MENU_BEHAVIOUR |
inherit |
No |
|
WDY_MD_UI_ELEMENT_REFERENCE |
No |
||
STRING |
No |
||
XSTRING |
Yes |
||
STRING |
Yes |
||
WDUI_OFFICE_DOC_TYPE |
ms_word |
Yes |
|
WDY_BOOLEAN |
true |
Yes |
|
WDY_BOOLEAN |
true |
Yes |
|
WDY_BOOLEAN |
false |
Yes |
|
STRING |
300px |
Yes |
|
WDY_BOOLEAN |
true |
Yes |
|
Translatable text |
Yes |
||
STRING |
No |
||
WDUI_VISIBILITY |
visible |
Yes |
|
STRING |
300px |
Yes |
Events in View Designer
Other properties that can be inherited are defined in the related higher-level classes. The related UI elements are:
For dynamic programming, the same properties, events, and aggregations as in the View Designer are available. But note that the spelling format and use of upper/lower case is different.
Dynamic Programming of Properties
View Designer Name |
Runtime Name |
Type |
ACTIVATE_IN_PLACE |
WDY_BOOLEAN |
|
ADDITIONAL_ARCHIVES |
STRING |
|
ARCHIVE |
STRING |
|
CLASS_ID |
STRING |
|
CODE_BASE |
STRING |
|
CONTEXT_MENU_BEHAVIOUR |
WDUI_CONTEXT_MENU_BEHAVIOUR |
|
contextMenuBehaviour: inherit |
CL_WD_OFFICE_CONTROL=>E_CONTEXT_MENU_BEHAVIOUR-INHERIT |
|
contextMenuBehaviour: provide |
CL_WD_OFFICE_CONTROL=>E_CONTEXT_MENU_BEHAVIOUR-PROVIDE |
|
contextMenuBehaviour: suppress |
CL_WD_OFFICE_CONTROL=>E_CONTEXT_MENU_BEHAVIOUR-SUPPRESS |
|
CONTEXT_MENU_ID |
WDY_MD_UI_ELEMENT_REFERENCE |
|
CONTROL_ID |
STRING |
|
DATA_SOURCE |
XSTRING |
|
DOCUMENT_NAME |
STRING |
|
DOCUMENT_TYPE |
WDUI_OFFICE_DOC_TYPE |
|
documentType: ms_excel |
CL_WD_OFFICE_CONTROL=>E_DOCUMENT_TYPE-MS_EXCEL |
|
documentType: ms_word |
CL_WD_OFFICE_CONTROL=>E_DOCUMENT_TYPE-MS_WORD |
|
documentType: ms_project |
CL_WD_OFFICE_CONTROL=>E_DOCUMENT_TYPE-MS_PROJECT |
|
ENABLED |
WDY_BOOLEAN |
|
ENABLE_READ_WRITE |
WDY_BOOLEAN |
|
EXPERT_MODE |
WDY_BOOLEAN |
|
HEIGHT |
STRING |
|
SHOW_DECORATION |
WDY_BOOLEAN |
|
TOOLTIP |
WDY_MD_TRANSLATABLE_TEXT |
|
TYPE |
STRING |
|
VISIBLE |
WDUI_VISIBILITY |
|
visible: none |
CL_WD_OFFICE_CONTROL=>E_VISIBLE-NONE |
|
visible: visible |
CL_WD_OFFICE_CONTROL=>E_VISIBLE-VISIBLE |
|
WIDTH |
STRING |
Dynamic Programming of Events
You can find examples of this UI element in the system in collection sios.