You are on page 1of 4

2/17/2016

FileUploadWebDynproABAPSAPLibrary

TheBestRunBusinessesRunSAP

TechnologyPlatform

SAPNetWeaver

7.3

FileUpload
Use
YoucanusetheFileUploadUIelementtouploadfilesfromtheclienttotheserver.TheUIelement
appearswithanInputField,inwhichthedirectorypathandthefilenameappear,andaButtonfor
searchingforthefile.

Caution
NotethatyoumustalwaysspecifythefullyqualifiedpathforaFileUploadUIelement.Therefore,
youcannotspecifyanyURLs.
Moreinformation:http://support.microsoft.com/kb/892442/enus

TechnicalBrowserDetailsBeyondtheControlofWDA
DuetobrowserrestrictionsthatareunrelatedtoWebDynproABAP,thepreviouslyentereddatapath
mightdisappearwhenaFileUploadUIelementisclicked.Innewerversionsofthebrowser,itis
thereforenotpossibletoenterthefilenameintheentryfield.Thefieldalwaysremainsempty.Neither
areanypotentialrestrictionsshown,forexample,filenamesorfilenameextensions.Thereforeinnew
browserversionsthefilenamecanonlybeselectedusingthe Browse... button.Youcannotenterthe
filenamemanually(usingthekeyboardorcopyandpastefunctions),norcanthefilenamebesetbythe
backend(directlyorusingcontextbinding).
Formoredetails,readthesecurityinformationinInternetExplorer6abouthandling<input
type=file>.
Forsecurityreasons,thebrowseronlyacceptsabsolutepathsorapathselectionusingthe Browse .
switch.Ifthepathnameisincorrect,thebrowserwillnotevenforwardtherequest.
Procedure
ThereisnoactionavailabletoidentifyaFileUpload.Generallywerecommendyouuseadedicated
screenorpopupfortheupload,sinceanuploadistriggeredbyeveryuserinteractionrequiringa
roundtrip,forexamplescrollingthroughatable.Thismakesaroundtripnecessary,whichmayirritatethe
user.

https://help.sap.com/saphelp_nw73/helpdata/en/49/7e5e66f2493e90e10000000a42189c/frameset.htm

1/4

2/17/2016

FileUploadWebDynproABAPSAPLibrary

Checkwitheveryactionwhetherdatahasbeendownloadedbyreadingthedatafromthecontext.
Thedeletethedataimmediatelyfromthecontext.Otherwisethefilewillbekeptinthememoryuntilthe
contextisdeletedoranewuploadistriggered.

Note
NotealsotheSecurityNotesforFileUploadUIElements.
WhencopyingfromXSTRINGtoXSTRINGnocopyofthedataismadeduetoABAPstringsharing.A
copyisnotcreateduntilthedataismodifiedinoneoftheXSTRINGs.
ImplementationDetails
RuntimeClass

CL_WD_FILE_UPLOAD

Name

Type

InitialValue

Bindable

ID

STRING

(automatic)

No

activateAccessKey

WDY_BOOLEAN

false

No

contextMenuBehaviour

WDUI_CONTEXT_MENU_BE inherit

No

HAVIOUR
contextMenuId

No

WDY_MD_UI_ELEMENT_RE
FERENCE

data

XSTRING

Yes

enabled

WDY_BOOLEAN

explanation

Translatabletext

No

fileName

STRING

Yes

mimeType

STRING

Yes

state

WDUI_STATE

normal

Yes

textDirection

WDUI_TEXT_DIRECTION

inherit

Yes

tooltip

Translatabletext

visible

WDUI_VISIBILITY

width

STRING

true

Yes

Yes
visible

Yes
Yes

Otherpropertiesthatcanbeinheritedaredefinedintherelatedhigherlevelclasses.TherelatedUI
elementsare:
UIElement
ContextMenuProvider
ViewElement
Accessibility

https://help.sap.com/saphelp_nw73/helpdata/en/49/7e5e66f2493e90e10000000a42189c/frameset.htm

2/4

2/17/2016

FileUploadWebDynproABAPSAPLibrary

Toenablethedevelopmentofaccessibleapplicationsthepropertylabelischeckedduringthesyntax
check.
Ifnolabelhasbeenset,andnodescriptivetexthasbeenspecifiedfortheappropriateboundcontext
elementintheABAPDictionary,thepropertytooltipischecked.
DynamicProgramming
Fordynamicprogramming,thesameproperties,eventsandaggregationsareavailableasintheView
Designer.Butnotethatthespellingformatanduseofupper/lowercaseisdifferent.
ViewDesignerName

RuntimeName

Type

activateAccessKey

ACTIVATE_ACCESS_KEY

WDY_BOOLEAN

contextMenuBehaviour

CONTEXT_MENU_BEHAVIOUR

WDUI_CONTEXT_MENU_BEHAVIOUR

contextMenuBehaviour:
inherit

CL_WD_FILE_UPLOAD=>E_CONTEX
T_MENU_BEHAVIOURINHERIT

contextMenuBehaviour:
provide

CL_WD_FILE_UPLOAD=>E_CONTEX
T_MENU_BEHAVIOURPROVIDE

contextMenuBehaviour:
suppress

CL_WD_FILE_UPLOAD=>E_CONTEX
T_MENU_BEHAVIOURSUPPRESS

contextMenuId

CONTEXT_MENU_ID

WDY_MD_UI_ELEMENT_REFERENCE

data

DATA

XSTRING

enabled

ENABLED

WDY_BOOLEAN

explanation

EXPLANATION

WDY_MD_TRANSLATABLE_TEXT

fileName

FILE_NAME

STRING

mimeType

MIME_TYPE

STRING

state

STATE

WDUI_STATE

state:normal

CL_WD_FILE_UPLOAD=>E_STATE
NORMAL

state:required

CL_WD_FILE_UPLOAD=>E_STATE
REQUIRED

textDirection

TEXT_DIRECTION

textDirection:inherit

CL_WD_FILE_UPLOAD=>E_TEXT_D

WDUI_TEXT_DIRECTION

IRECTIONINHERIT
textDirection:ltr

CL_WD_FILE_UPLOAD=>E_TEXT_D
IRECTIONLTR

textDirection:rtl

CL_WD_FILE_UPLOAD=>E_TEXT_D
IRECTIONRTL

tooltip

TOOLTIP

WDY_MD_TRANSLATABLE_TEXT

visible

VISIBLE

WDUI_VISIBILITY

https://help.sap.com/saphelp_nw73/helpdata/en/49/7e5e66f2493e90e10000000a42189c/frameset.htm

3/4

2/17/2016

FileUploadWebDynproABAPSAPLibrary

visible:none

CL_WD_FILE_UPLOAD=>E_VISIBL
ENONE

visible:visible

CL_WD_FILE_UPLOAD=>E_VISIBL
EVISIBLE

width

WIDTH

STRING

Example
FortestpurposesyoucanfindexamplesofthisinterfaceelementinthesystemintheWebDynpro
applicationWDR_TEST_UI_ELEMENTS,andinthecomponentWDR_TEST_EVENTSintheFileUpload
view.

C OPYR I GH T BY SAP SE OR AN SAP AF F I LI AT E C OM PAN Y. ALL R I GH T S R ESER VED .


PR I N T ED F R OM SAP H ELP POR T AL. (ht t p: / / help. s ap. c om )

https://help.sap.com/saphelp_nw73/helpdata/en/49/7e5e66f2493e90e10000000a42189c/frameset.htm

4/4

You might also like