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

how to attach a file in webdynpro component

Hi all

i got a requirement that in webdynpro component i have to develop a functionality which is used to attach a file for example in our mail how we will attach file how we can achieve this functionality is there any ui elements are there or we have to write any code for this kindly help me how to proceed

thanks & regards

naveen

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Oct 07, 2010 at 10:25 AM

    Hello Naveen,

    if I understand your question correctly - you are interested in attaching a file into an email. You would like to know if there are any standard WDA utilities for doing this.

    The answer is no. There are WDA UI elements that can help you retrieve a file - as many others here have posted. But to send an email is not really a WDA function.

    I would suggest you do a search of SCN, as there are many references about how to send emails from ABAP - but these are not WDA specific, although you could use them in a WDA application.

    Good luck in solving your problem.

    Chris

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 09:36 AM

    hi,

    u may upload a file from the desktop in ur webdynpro .. thn u can save it in database and can download accordingly..

    1.create a node 'FILEUPLOAD' with 2 attributes

    a) FILECONTENT type XSTRING

    b) FILENAME type STRING

    2. Create a fileuplaod uielement

    a) bind the data property with attribute 'FILECONTENT'

    b) bind the filename property with attribute 'FILENAME'

    3. Create a button 'UPLOAD'

    a) create the action method for this button and save the contents of file in database

    Data l_node type ref to if_wd_context_node.
    Data l_stru type wd_this->elements_cn_fileupload.
     
    l_node = wd_context->get_child_node( 'FILEUPLOAD' ).
    l_node->get_static_attributes( importing static_attributes = l_stru ).
    "save l_stru-fielcontent in database. Your file will be saved in the database in XSTRING format.
    
    

    Now when you want to display this file;

    1. Create a Node 'FILEDOWNLOAD' with 1 attribute

    a) FILE type XSTRING

    2. Create a filedownload uielement

    a) bind the data property with the attribute 'FILE'

    Fetch the file from database and set the File attribute of the filedownload uielemnt to display the file.

    regards,

    Amit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 09:01 AM

    Hi ,

    Have a look at the fileUpload UI element.It allows you to select a file from the system and store the contents like file's data,file path,mime type etc in context nodes.

    [FileUpload|http://help.sap.com/erp2005_ehp_04/helpdata/EN/b3/be7941601b1d09e10000000a155106/frameset.htm]

    Thanks,

    aditya.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 09:21 AM

    Hi Naveen,

    Where Do u want to File Data to be stored...???

    Add a comment
    10|10000 characters needed characters exceeded

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.