AcfUpDownload

Use

AcfUpDownload enables files to be
  • uploaded
  • downloaded
An HTTP-based content management system, for example, SAP Knowledge Provider (KPro).

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.

More information:

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

id

STRING

(automatic)

No

archives

STRING

Yes

class

STRING

Yes

contextMenuBehaviour

WDUI_CONTEXT_MENU_BEHAVIOUR

inherit

No

contextMenuId

WDY_MD_UI_ELEMENT_REFERENCE

No

enabled

WDY_BOOLEAN

true

Yes

height

STRING

Yes

lifeTime

WDUI_LIFE_TIME

whenVisible

Yes

styleClassName STRING Yes

tooltip

Translatable text

Yes

virusScanProfile VSCAN_PROFILE Yes

visible

WDUI_VISIBILITY

visible

Yes

width

STRING

Yes

Name

onCompletedAcfUpDownload Events

Other properties that can be inherited are defined in the related higher-level classes. The related UI elements are:

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

ARCHIVES

STRING

class

CLASS

STRING

contextMenuBehaviour

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

contextMenuId

CONTEXT_MENU_ID

WDY_MD_UI_ELEMENT_REFERENCE

enabled

ENABLED

WDY_BOOLEAN

height

HEIGHT

STRING

lifeTime

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

TOOLTIP

WDY_MD_TRANSLATABLE_TEXT

virusScanProfile VIRUS_SCAN_PROFILE VSCAN_PROFILE

visible

VISIBLE

WDUI_VISIBILITY

visible: none

CL_WD_ACF_UP_DOWNLOAD=>E_VISIBLE-NONE

visible: visible

CL_WD_ACF_UP_DOWNLOAD=>E_VISIBLE-VISIBLE

width

WIDTH

STRING

View Designer Name

Runtime Name

onCompleted

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 Information published on SAP site.

  • 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.