Skip to Content
author's profile photo Former Member
Former Member

Upload file in webdynpro abap

Hello All,

I have a requirement to upload the file (of all types) in webynpro abap. I am aware that i can use File Upload UI element that can be used to upload files but client want to have button to upload files.

I wan to create a button in a view, when button is clicked popup or dialog box should be opened to path of file. I tried to do it using GUI function module such has GUI_UPLOAD, method such has CL_GUI_FRONTEND_SERVICE methods but error is displayed that NOT_SUPPORT_GUI. When i searched forum for this error, expert say that we can not use above methods in webynpro.

I want to have some method to perform above operation.

Otherwise, can i change the text and position of button from right of to left of input field and display text in input field and the time of display.


Faiz Khan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Dec 26, 2013 at 01:19 PM

    Dear Khan,

    You can create a popup window and embed a view which contains File Upload UI element in the pop window. Call this popup window in action of the button. you can use component controller's context to make the data global.



    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Faiz khan,

      What is the reason why you didn't use the GUI upload button.

      Define attribute in the note Data with type xstring & Filename type cfilename & bind the data attribute with the data property of the element.

      & define one action for the button.

      DATA lo_el_upload_file TYPE REF TO if_wd_context_element.

      DATA ls_upload_file TYPE wd_this->element_upload_file.

      DATA ls_upload_file_tmp TYPE wd_this->element_upload_file.

      * navigate from <CONTEXT> to <UPLOAD_FILE> via lead selection

      lo_nd_upload_file = wd_context->get_child_node( name = wd_this->wdctx_upload_file ).

      * get element via lead selection

      lo_el_upload_file = lo_nd_upload_file->get_element( ).

      * get all declared attributes



      static_attributes = ls_upload_file ).

      * get all declared attributes

      Automatic data in coming in the ls_upload_File with XSTRING value & convert the Xstring data to string data



      im_xstring = ls_upload_file-data


      ex_string = lw_dstring.

      SPLIT lw_dstring AT cl_abap_char_utilities=>newline INTO TABLE lt_string.


      Nishant Bansal

  • Posted on Dec 27, 2013 at 05:53 PM
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Ronaldo,

      The client is ready to use the FileUpload UI element and we have implemented the steps mentioned above link. But the requirement is more then Uploading file, as mentioned below:

      1. To upload multiple files, add a link or a button that create FileUpload UI element dynamically.

      2, To display error message if file selected is other than word, excel, ppt, and PDF. The error message should be displayed at the time of file selection i.e. when i click on browser button of FileUpload button and select the file.

      3. when a file is selected for upload and click on button (to dynamically create File Uplaod UI element to upload another file as mentioned in first requirement) the first file which i selected is cleared. How the issue can be solved.

      4. Since a node named File_upload with filename, filetype, filesize & filecontent attribute is created, and same node is getting bind with more then one File Upload button how can we retrieve from node multiple file to store.


      Faiz Khan

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.