fileupload -  web dynpro abap - sap library

Upload: my291287

Post on 23-Feb-2018

266 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/24/2019 FileUpload - Web Dynpro ABAP - SAP Library

    1/4

    2/17/2016 FileUpload - Web Dynpro ABAP - SAP Library

    https://hel p.sap.com /saphel p_nw 73/hel pdata/en/49/7e5e66f2493e90e10000000a42189c/fr am eset.htm

    FileUpload

    Use

    You can use the FileUpload UI element to upload files from the client to the server. The UI element

    appears with an InputField, in which the directory path and the file name appear, and a Button for

    searching for the file.

    Caution

    Note that you must always specify the fully qualified path for a FileUpload UI element.Therefore,

    you cannot specify any URLs.

    More information: http://support.microsoft.com/kb/892442/en-us

    Technical Browser Details Beyond the Control of WDA

    Due to browser restrictions that are unrelated to Web Dynpro ABAP, the previously entered data path

    might disappear when a FileUpload UI element is clicked. In newer versions of the browser, it is

    therefore not possible to enter the file name in the entry field. The field always remains empty.Neither

    are any potential restrictions shown, for example, file names or file name extensions. Therefore in new

    browser versions the file name can only be selected using the Browse... button. You cannot enter the

    file name manually (using the keyboard or copy and paste functions), nor can the file name be set by the

    back end (directly or using context binding).

    For more details, read the security information in Internet Explorer 6 about handling .

    For security reasons, the browser only accepts absolute paths or a path selection using the Browse .

    switch. If the path name is incorrect, the browser will not even forward the request.

    Procedure

    There is no action available to identify a FileUpload. Generally we recommend you use a dedicated

    screen or popup for the upload, since an upload is triggered by every user interaction requiring a

    roundtrip, for example scrolling through a table. This makes a roundtrip necessary, which may irritate the

    user.

    The Best-Run Businesses Run SAP

    Technology Platform SAP NetWeaver 7.3

    http://help.sap.com/disclaimer?site=http://support.microsoft.com/kb/892442/en-ushttps://help.sap.com/https://help.sap.com/pcat_techplatformhttps://help.sap.com/netweaverhttps://help.sap.com/nw73https://help.sap.com/netweaverhttps://help.sap.com/pcat_techplatformhttps://help.sap.com/http://sap.com/http://help.sap.com/disclaimer?site=http://support.microsoft.com/kb/892442/en-us
  • 7/24/2019 FileUpload - Web Dynpro ABAP - SAP Library

    2/4

    2/17/2016 FileUpload - Web Dynpro ABAP - SAP Library

    https://hel p.sap.com /saphel p_nw 73/hel pdata/en/49/7e5e66f2493e90e10000000a42189c/fr am eset.htm

    Check with every action whether data has been downloaded by reading the data from the context.

    The delete the data immediately from the context.Otherwise the file will be kept in the memory until the

    context is deleted or a new upload is triggered.

    Note

    Note also the Security Notes for FileUpload UI Elements .

    When copying from XSTRING to XSTRING no copy of the data is made due to ABAP string sharing. A

    copy is not created until the data is modified in one of the XSTRINGs.

    Implementation Details

    Runtime Class CL_WD_FILE_UPLOAD

    Name Type Initial Value Bindable

    ID STRING (automatic) No

    activateAccessKey WDY_BOOLEAN false No

    contextMenuBehaviour WDUI_CONTEXT_MENU_BE

    HAVIOUR

    inherit No

    contextMenuId WDY_MD_UI_ELEMENT_RE

    FERENCE

    No

    data XSTRING Yes

    enabled WDY_BOOLEAN true Yes

    explanation Translatable text No

    fileName STRING Yes

    mimeType STRING Yes

    state WDUI_STATE normal Yes

    textDirection WDUI_TEXT_DIRECTION inherit Yes

    tooltip Translatable text Yes

    visible WDUI_VISIBILITY visible Yes

    width STRING Yes

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

    elements are:

    UIElement

    ContextMenuProvider

    ViewElement

    Acc essibilit y

    https://help.sap.com/saphelp_nw73/helpdata/en/49/7fe13e2e316a50e10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/44/93d4352e8c60d6e10000000a114a6b/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/8d/af8841349e1909e10000000a155106/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/57/fa8b41bce2a609e10000000a155106/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/57/fa8b41bce2a609e10000000a155106/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/57/fa8b41bce2a609e10000000a155106/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/45/16068d22c852d5e10000000a1553f7/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/45/16068d22c852d5e10000000a1553f7/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/7f9ab5135c200ce10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/48/69ef8be8a607d6e10000000a42189c/frameset.htm
  • 7/24/2019 FileUpload - Web Dynpro ABAP - SAP Library

    3/4

    2/17/2016 FileUpload - Web Dynpro ABAP - SAP Library

    https://hel p.sap.com /saphel p_nw 73/hel pdata/en/49/7e5e66f2493e90e10000000a42189c/fr am eset.htm

    To enable the development of accessibleapplications the property label is checked during the syntax

    check.

    If no label has been set, and no descriptive text has been specified for the appropriate bound context

    element in the ABAP Dictionary, the property tooltip is checked.

    Dynamic Programming

    For dynamic programming, the same properties, events and aggregations are available as in the View

    Designer.But note that the spelling format and use of upper/lower case is different.

    View Designer Name Runtime Name 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_BEHAVIOUR-INHERIT

    contextMenuBehaviour:

    provide

    CL_WD_FILE_UPLOAD=>E_CONTEX

    T_MENU_BEHAVIOUR-PROVIDE

    contextMenuBehaviour:

    suppress

    CL_WD_FILE_UPLOAD=>E_CONTEX

    T_MENU_BEHAVIOUR-SUPPRESS

    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 WDUI_TEXT_DIRECTION

    textDirection: inherit CL_WD_FILE_UPLOAD=>E_TEXT_D

    IRECTION-INHERIT

    textDirection: ltr CL_WD_FILE_UPLOAD=>E_TEXT_D

    IRECTION-LTR

    textDirection: rtl CL_WD_FILE_UPLOAD=>E_TEXT_D

    IRECTION-RTL

    tooltip TOOLTIP WDY_MD_TRANSLATABLE_TEXT

    visible VISIBLE WDUI_VISIBILITY

    https://help.sap.com/saphelp_nw73/helpdata/en/57/fa8b41bce2a609e10000000a155106/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/57/fa8b41bce2a609e10000000a155106/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/57/fa8b41bce2a609e10000000a155106/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/45/16068d22c852d5e10000000a1553f7/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/45/16068d22c852d5e10000000a1553f7/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htmhttps://help.sap.com/saphelp_nw73/helpdata/en/4e/057b88facb455fe10000000a421bc1/content.htm
  • 7/24/2019 FileUpload - Web Dynpro ABAP - SAP Library

    4/4

    2/17/2016 FileUpload - Web Dynpro ABAP - SAP Library

    https://hel p.sap.com /saphel p_nw 73/hel pdata/en/49/7e5e66f2493e90e10000000a42189c/fr am eset.htm

    visible: none CL_WD_FILE_UPLOAD=>E_VISIBL

    E-NONE

    visible: visible CL_WD_FILE_UPLOAD=>E_VISIBL

    E-VISIBLE

    width WIDTH STRING

    Example

    For test purposes 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 FileUpload

    view.

    COPYRIGHT BY SAP SE OR AN SAP AFFILIATE COMPANY. ALL RIGHTS RESERVED.

    PRINTED FROM SAP HELP PORTAL. (http:/ /help.sap.com)

    https://help.sap.com/saphelp_nw73/helpdata/en/49/6be1fc70cf200de10000000a42189c/content.htm