AcfUpDownload
Use
- uploaded
- downloaded
Upload/download from and to the local file system. The actual data exchange between the content server and Web Dynpro takes place using the ACF protocol.
- SAP Content Server
- Knowledge Provider (BC-SRV-KPR)
- Active Component Framework (ACF)
Methods
Like for OfficeControl methods can be executed; the CL_WDR_ACFUPDOWNLOAD_HNDL method handler is required for this.
Unlike other Web Dynpro ABAP UI elements, AcfUpDownload is implemented in a way that means the action can only be triggered by a method call. For AcfUpDownload, an upload/download only takes place with one of the following method calls:
-
IF_WD_ACFUPDOWNLOAD_SCMS~HTTP_PUT
-
IF_WD_ACFUPDOWNLOAD_SCMS~HTTP_GET
File Selection Dialog
Some properties of the AcfUpDownload UI element are not set with the UI element properties but with IF_WD_ACFUPDOWNLOAD_SWFS instead. Here you can display a file selection dialog.
Notes
If the application calls get with AcfUpDownload and the file is already available on the client, process as follows:
-
For each method, a large number of files can be downloaded; for each file, another error could occur.
However, there is only one error string with one error code. This means that only the first error is ever returned and written to the context.
-
There are two different get methods: With and without the override flag
-
There is an onCompleted event for which an application can register for with Action.
Case 1
The application calls get without the override flag, and has not registered on onCompleted.
-
In this case, the value 210 (FILE_PRESENT) is contained in the error string of the context, followed by a space and a comma-separated list of existing files.
-
If another error occurs beforehand, this other error is in the context instead.
Case 2
The application calls get without the override flag, and has registered on onCompleted.
-
In this case, the value 210 (FILE_PRESENT) is contained in the error string of the context, followed by a space and a comma-separated list of existing files.
In addition, the application receives an event with status 210 plus the comma-separated list as a statusMessage.
-
If another error occurs beforehand, this other error is in the event instead.
Case 3
The application calls get with the override flag = true.
-
The local file is replaced by a newly downloaded file.
-
This does not influence the error string for the context or the event value.
Case 4
The application calls get with the override flag = false.
-
The existing local file is retained.
-
This does not affect the error string for the context, nor the value of the event.
Implementation Details
|
Runtime Class |
CL_WD_ACF_UP_DOWNLOAD |
|
Name |
Type |
Initial Value |
Bindable |
|---|---|---|---|
|
STRING |
(automatic) |
No |
|
|
STRING |
Yes |
||
|
STRING |
Yes |
||
|
WDUI_CONTEXT_MENU_BEHAVIOUR |
inherit |
No |
|
|
WDY_MD_UI_ELEMENT_REFERENCE |
No |
||
|
WDY_BOOLEAN |
true |
Yes |
|
|
STRING |
Yes |
||
|
WDUI_LIFE_TIME |
whenVisible |
Yes |
|
| styleClassName | STRING | Yes | |
|
Translatable text |
Yes |
||
| virusScanProfile | VSCAN_PROFILE | Yes | |
|
WDUI_VISIBILITY |
visible |
Yes |
|
|
STRING |
Yes |
|
Name |
|---|
|
onCompletedAcfUpDownload Events |
Other properties that can be inherited are defined in the related higher-level classes. The related UI elements are:
-
ViewElementViewElement
Dynamic Programming
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.
|
View Designer Name |
Runtime Name |
Type |
|---|---|---|
|
ARCHIVES |
STRING |
|
|
CLASS |
STRING |
|
|
CONTEXT_MENU_BEHAVIOUR |
WDUI_CONTEXT_MENU_BEHAVIOUR |
|
|
contextMenuBehaviour: inherit |
CL_WD_ACF_UP_DOWNLOAD=>E_CONTEXT_MENU_BEHAVIOUR-INHERIT |
|
|
contextMenuBehaviour: provide |
CL_WD_ACF_UP_DOWNLOAD=>E_CONTEXT_MENU_BEHAVIOUR-PROVIDE |
|
|
contextMenuBehaviour: suppress |
CL_WD_ACF_UP_DOWNLOAD=>E_CONTEXT_MENU_BEHAVIOUR-SUPPRESS |
|
|
CONTEXT_MENU_ID |
WDY_MD_UI_ELEMENT_REFERENCE |
|
|
ENABLED |
WDY_BOOLEAN |
|
|
HEIGHT |
STRING |
|
|
LIFE_TIME |
WDUI_LIFE_TIME |
|
|
lifeTime: whenAlive |
CL_WD_ACF_UP_DOWNLOAD=>E_LIFE_TIME-WHEN_ALIVE |
|
|
lifeTime: whenVisible |
CL_WD_ACF_UP_DOWNLOAD=>E_LIFE_TIME-WHEN_VISIBLE |
|
| styleClassName | STYLE_CLASS_NAME | STRING |
|
TOOLTIP |
WDY_MD_TRANSLATABLE_TEXT |
|
| virusScanProfile | VIRUS_SCAN_PROFILE | VSCAN_PROFILE |
|
VISIBLE |
WDUI_VISIBILITY |
|
|
visible: none |
CL_WD_ACF_UP_DOWNLOAD=>E_VISIBLE-NONE |
|
|
visible: visible |
CL_WD_ACF_UP_DOWNLOAD=>E_VISIBLE-VISIBLE |
|
|
WIDTH |
STRING |
|
View Designer Name |
Runtime Name |
|---|---|
|
ON_COMPLETED |
Prerequisites
The following prerequisites must be fulfilled to enable AcfUpDownload to function smoothly on a client:
-
Installation of a Sun Java plug-in (Java 5 or higher)
See also SAP Note 1178747
. -
Presence of a valid white list XML file (see Working with White Lists).
Under Microsoft Windows this is %APPDATA%\SAP
Example
You can find a test example of this UI element in the system in the SWDP_TEST_ACTIVE_COMPONENT package in the WD_TEST_APPL_ACFUPDOWN component.