You can use the FileUpload UI element to upload files from the client to the server. The UI element appears with an input field, in which the directory path and the file name appear, and a button for searching for the file.
To ensure Accessibility a check is made during design time that the label property has been specified.
If no label has been set, and no descriptive text has been specified for the appropriate bound context element in the ABAP Dictionary, a check is made for the tooltip property.
Example (with Label):
|
|
Runtime Class |
CL_WD_FILE_UPLOAD |
Properties in the View Designer
Name |
Type |
Initial Value |
Bindable |
ID |
STRING |
(automatic) |
No |
XSTRING |
|
mandatory |
|
WDY_BOOLEAN |
true |
Yes |
|
Text |
|
No |
|
STRING |
|
Yes |
|
STRING |
|
Yes |
|
WDUI_TEXT_DIRECTION |
inherit |
Yes |
|
Text |
|
Yes |
|
WDUI_VISIBILITY |
visible |
Yes |
|
STRING |
|
Yes |
Further properties that can be inherited are defined in the associated higher-level class. The associated interface elements are:
For dynamic programming the same properties, events, and aggregations are provided in the View Designer. Bear in mind the different spellings.
Dynamic Programming of Properties
View Designer Name |
Runtime Name |
Type |
DATA |
XSTRING |
|
ENABLED |
WDY_BOOLEAN |
|
EXPLANATION |
WDY_MD_TRANSLATABLE_TEXT |
|
FILE_NAME |
STRING |
|
MIME_TYPE |
STRING |
|
TEXT_DIRECTION |
WDUI_TEXT_DIRECTION |
|
textDirection: inherit |
CL_WD_FILE_UPLOAD=>E_TEXT_DIRECTION-INHERIT |
|
textDirection: ltr |
CL_WD_FILE_UPLOAD=>E_TEXT_DIRECTION-LTR |
|
textDirection: rtl |
CL_WD_FILE_UPLOAD=>E_TEXT_DIRECTION-RTL |
|
TOOLTIP |
WDY_MD_TRANSLATABLE_TEXT |
|
VISIBLE |
WDUI_VISIBILITY |
|
visible: none |
CL_WD_FILE_UPLOAD=>E_VISIBLE-NONE |
|
visible: visible |
CL_WD_FILE_UPLOAD=>E_VISIBLE-VISIBLE |
|
WIDTH |
STRING |
You can find examples of this interface element in the system in the Web Dynpro application WDR_TEST_UI_ELEMENTS, and in the component WDR_TEST_EVENTS in the View FileUpload.