OfficeControl 
With the OfficeControl UI element, you can insert an Office document into a view (see also, Office integration). This enables you to display the following Office documents in a Web Dynpro application:
Microsoft Word
Microsoft Excel
Microsoft Project
OfficeControl is provided as an Active UI Element (ActiveX control element), which means that the UI element can be displayed by browsers that support ActiveX controls.
When using Microsoft Office and browsers that do not support ActiveX controls, the user receives the runtime exception Office Integration through Applet is not supported.
Caution
The integration of active controls like OfficeControl in Web Dynpro ABAP popups is not supported.
The implementation of the OfficeControl UI element supports the following functions for the Office documents mentioned above:
Open
Close
Save
Create new documents
Note
A document can be opened and closed only by setting the OfficeControl.visible property to visible or none and OfficeControl.expertMode=false. It is a pure display scenario (OfficeControl.expertMode=false), which is especially suitable for prototyping. Keep in mind that this type of scenario can cause performance bottlenecks.
Documents can be edited only if OfficeControl.expertMode=true.
Note that OfficeControl is only active if the visible property is set to visible. Processing is done in the background with visible, and width, height = 0.
In expertMode additional method calls are provided for complex operations.
Example of the Visualization
(See Web Dynpro application IOS_TEST_EXCEL in the system)
Runtime Class |
CL_WD_OFFICE_CONTROL |
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 |
|
WDUI_LIFE_TIME |
whenVisible |
Yes |
|
WDY_BOOLEAN |
true |
Yes |
|
Translatable text |
Yes |
||
STRING |
No |
||
WDUI_VISIBILITY |
visible |
Yes |
|
STRING |
300px |
Yes |
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 are available as in the View Designer. Note the different spellings.
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 |
|
LIFE_TIME |
WDUI_LIFE_TIME |
|
lifeTime: whenAlive |
CL_WD_OFFICE_CONTROL=>E_LIFE_TIME-WHEN_ALIVE |
|
lifeTime: whenVisible |
CL_WD_OFFICE_CONTROL=>E_LIFE_TIME-WHEN_VISIBLE |
|
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 |
|
You can find examples of this UI element in the system in package SIOS: