Sending Web Dynpro table contents via Email

Hi,
I have a requirement where in I need to send an email from the Web Dynpro Application.
I am using JavaMail for this purpose. And I am able to send text messages to the required Email Id.
But my requirement is that I need to send the contents of one of the Web Dynpro table along with the text message.
Is it possible to send the table contents via mail?
Kindly let me know if there is any other approach.
Regards,
Shilpa B.V

Hi,
I don't think there are any methods in IWDTable or the IWDNode which can dump entire data on to something which we can pickup.
The only way is to iterate through the elements in the node and construct a big string buffer with HTML Table code and include the other part of the mail also in the same string buffer as html. Then set the MIME type of your mail to HTML and send the mail.
Check sending HTML content via email
http://java.sun.com/developer/onlineTraining/JavaMail/contents.html#ProcessingHTMLMessages
Regards
Srini

Similar Messages

  • To send an Internal Table Content as email with type 'XLS'

    Hi,
    I have an Internal Table with 1000 records and would like to send them as an email with type as EXCEL.
    Please share your experience.
    Thank You,
    Tk.
    Moderator Message: Please (re)search before posting your question.
    Edited by: Suhas Saha on Nov 11, 2011 10:44 AM

    Hi,
    Please check below link. This will give you many examples to do that.
    [http://www.google.com.au/search?q=site%3Asap.comsendexcelasattachment&ie=utf-8&oe=utf-8]
    Thanks.
    Ravi

  • Display data in Web DynPro table from database via EJB

    I have a JavaBeans model which has a method populateDataToTable()to retrieve data from database via Session bean (calling entity bean, returning ArrayList of data) and the data needed to be display in the Web DynPro table.
    User Interface (Web DynPro) <-> JavaBeans Model <-> Busineess Logic (session bean) <-> Persistence (Entity Bean)<-> DB table.
    The context bindiing and table part is ok. How do i load the data to the table ? what the coding to put in wdDoInit() ?
    Any help would be appreciated.

    in wdinit(),
    Collection col = new ArrayList();
    try{                    
      MyCommandBean bean = new MyCommandBean();
      col = bean.getDataFromDbViaEJB();
      wdContext.nodeMyCommandBean().bind(col);
    } catch (Exception ex) {
       ex.printStackTrace(ex); 
    in your JavaBean model class, MyCommandBean getDatafromDbViaEJB() method:
    Collection col = new ArrayList();
    Collection newcol = new ArrayList();
    //include your own context initialization etc...
    col = local.getDataViaSessionBean(param);
    // if your returned result also a bean class, reassigned it to current MyCommandBean
    for (Iterator iterator = col.iterator(); iterator.hasNext();) {
        MyOtherBean otherBean=(MyOtherBean)iterator.next();
        MyCommmandBean bean = new MyCommandBean();
        bean.attribute1 = outBean.getAttirbute1();
        // get other attibutes
        newcol.add(bean);
    return newcol;

  • Want to send a text in BOLD via email

    Hi all,
    I want to send a text in BOLD via email,
    Right now i ma using the Function Module: SO_NEW_DOCUMENT_ATT_SEND_API1 for sending attachments via mail.
    But i do not know how i can send some text in BOLD.
    <b>****NOTE: I want the text in BOLD is in the BODY of the mail</b>
    I checked the Import and tables parameters inthat FM.But there is no option in those parameters.
    So, can any one plz help me to solve this issue.
    Thanks&Regards,
    Srikanth T
    Message was edited by:
            srikanth T
    Message was edited by:
            srikanth T

    Convert them into smartform or SAP Script from report then convert into pdf format and then send an email ...
    See the example code :
    report zemail.
    data: itcpo like itcpo,
          tab_lines like sy-tabix.
    Variables for EMAIL functionality
    data: maildata   like sodocchgi1.
    data: mailpack   like sopcklsti1 occurs 2 with header line.
    data: mailhead   like solisti1 occurs 1 with header line.
    data: mailbin    like solisti1 occurs 10 with header line.
    data: mailtxt    like solisti1 occurs 10 with header line.
    data: mailrec    like somlrec90 occurs 0  with header line.
    data: solisti1   like solisti1 occurs 0 with header line.
    perform send_form_via_email.
          FORM  SEND_FORM_VIA_EMAIL                                      *
    form  send_form_via_email.
      clear:    maildata, mailtxt, mailbin, mailpack, mailhead, mailrec.
      refresh:  mailtxt, mailbin, mailpack, mailhead, mailrec.
    Creation of the document to be sent File Name
      maildata-obj_name = 'TEST'.
    Mail Subject
      maildata-obj_descr = 'Subject'.
    Mail Contents
      mailtxt-line = 'Here is your file'.
      append mailtxt.
    Prepare Packing List
      perform prepare_packing_list.
    Set recipient - email address here!!!
      mailrec-receiver = '[email protected]'.
      mailrec-rec_type  = 'U'.
      append mailrec.
    Sending the document
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = maildata
                put_in_outbox              = ' '
           tables
                packing_list               = mailpack
                object_header              = mailhead
                contents_bin               = mailbin
                contents_txt               = mailtxt
                receivers                  = mailrec
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                operation_no_authorization = 4
                others                     = 99.
    if sy-subrc = 0.
    submit rsconn01 with mode = 'INT' and return.
    endif.
    endform.
         Form  PREPARE_PACKING_LIST
    form prepare_packing_list.
      clear:    mailpack, mailbin, mailhead.
      refresh:  mailpack, mailbin, mailhead.
      describe table mailtxt lines tab_lines.
      read table mailtxt index tab_lines.
      maildata-doc_size = ( tab_lines - 1 ) * 255 + strlen( mailtxt ).
    Creation of the entry for the compressed document
      clear mailpack-transf_bin.
      mailpack-head_start = 1.
      mailpack-head_num = 0.
      mailpack-body_start = 1.
      mailpack-body_num = tab_lines.
      mailpack-doc_type = 'RAW'.
      append mailpack.
      mailhead = 'TEST.TXT'.
      append mailhead.
    File 1
      mailbin = 'This is file 1'.
      append mailbin.
      describe table mailbin lines tab_lines.
      mailpack-transf_bin = 'X'.
      mailpack-head_start = 1.
      mailpack-head_num = 1.
      mailpack-body_start = 1.
      mailpack-body_num = tab_lines.
      mailpack-doc_type = 'TXT'.
      mailpack-obj_name = 'TEST1'.
      mailpack-obj_descr = 'Subject'.
      mailpack-doc_size = tab_lines * 255.
      append mailpack.
    *File 2
      mailbin = 'This is file 2'.
      append mailbin.
      data: start type i.
      data: end type i.
      start = tab_lines + 1.
      describe table mailbin lines end.
      mailpack-transf_bin = 'X'.
      mailpack-head_start = 1.
      mailpack-head_num = 1.
      mailpack-body_start = start.
      mailpack-body_num = end.
      mailpack-doc_type = 'TXT'.
      mailpack-obj_name = 'TEST2'.
      mailpack-obj_descr = 'Subject'.
      mailpack-doc_size = tab_lines * 255.
      append mailpack.
    endform.
    With PDF Attachment:CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'Z_TEST'
    IMPORTING
    fm_name = v_fname.
    CALL FUNCTION v_fname
    EXPORTING
    control_parameters = x_ctrl_p
    IMPORTING
    job_output_info = x_output_data.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 134
    IMPORTING
    bin_filesize = v_size
    TABLES
    otf = x_output_data-otfdata
    lines = it_lines
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    OTHERS = 4.
    CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
    EXPORTING
    line_width_dst = 255
    TABLES
    content_in = it_lines
    content_out = it_soli
    EXCEPTIONS
    err_line_width_src_too_long = 1
    err_line_width_dst_too_long = 2
    err_conv_failed = 3
    OTHERS = 4.
    CALL FUNCTION 'FUNC_CONVERT_DATA_ODC01'
    EXPORTING
    iv_byte_mode = 'X'
    TABLES
    it_data = it_lines
    et_data = it_table.
    *-----To caluculate total number of lines of internal table
    DESCRIBE TABLE it_table LINES v_lines.
    *-----Create Message Body and Title and Description
    it_mess = 'successfully converted smartform from otf format to pdf' .
    APPEND it_mess.
    wa_doc_data-obj_name = 'smartform'.
    wa_doc_data-expiry_dat = sy-datum + 10.
    wa_doc_data-obj_descr = 'smartform'.
    wa_doc_data-sensitivty = 'F'.
    wa_doc_data-doc_size = v_lines * 255.
    APPEND it_pcklist.
    *-----PDF Attachment
    it_pcklist-transf_bin = 'X'.
    it_pcklist-head_start = 1.
    it_pcklist-head_num = 0.
    it_pcklist-body_start = 1.
    it_pcklist-doc_size = v_lines_bin * 255 .
    it_pcklist-body_num = v_lines.
    it_pcklist-doc_type = 'PDF'.
    it_pcklist-obj_name = 'smartform'.
    it_pcklist-obj_descr = 'smart_desc'.
    it_pcklist-obj_langu = 'E'.
    it_pcklist-doc_size = v_lines * 255.
    APPEND it_pcklist.
    *-----Giving the receiver email-id
    CLEAR it_receivers.
    it_receivers-receiver = [email protected]'.
    it_receivers-rec_type = 'U'.
    APPEND it_receivers.
    *-----Calling the function module to sending email
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = wa_doc_data
    put_in_outbox = 'X'
    commit_work = 'X'
    TABLES
    packing_list = it_pcklist
    contents_txt = it_mess
    contents_hex = it_table
    receivers = it_receivers
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.

  • Internet Explorer limitation for Web Dynpro Table Data

    Hello everybody,
    I am having a trouble while trying to display a Web Dynpro table in Internet Explorer. This table is bound to a Context Node that is filled up manually with code, and for example if I passed more than 116 elements to the node the table only shows 116. Since this issue only happens with IE, I consider that it is related to the client part, something related with JavaScript. Any idea/suggestion?
    Many thanks in advance,
    Jesus

    Hello Siva,
    Thank you very much for your response. There is no message error, it is just not showing the entire node content, the weirdest thing is that even though WD is client independent this only happens with Internet Explorer. It works properly with any other browser such as Mozilla FF, Chrome and Safari browsers when the table has above 116 elements. When the table has below 116 elements it works properly with any browser. I have tried with IE6.0 and 7.0 using NWDS 7.0 and EP 7.0 SP 18.
    The table is child of a Group element which in turn is child of the Root Element.
    Best Regards,
    Baez

  • How to use EVS with different data in each row, in a Java Web Dynpro table?

    Hi all,
    I am using EVS in a column of java web dynpro table.
    Let's say the name, and context attribute, of this column is column1.
    It's filled dynamically using an RFC, that uses as input parameter the value of another column, and related context attribute, from the same table (Let's call it column2).  Obviously, from the same row. So, in other words: the values of the EVS in column1 of row1, are dependent of the value of column2 of row1. And the values of the EVS in column1 of row2, are dependent of the value of column2 of row2. And so on... Hope i could explain myself ok.
    The code I'm using works great for filling the EVS dynamically:
    IWDAttributeInfo attrInfo = wdContext.nodeDetail().getNodeInfo().getAttribute(nodeElement.COLUMN1);
    ISimpleTypeModifiable siType = attrInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet<String> value = siType.getSVServices().getModifiableSimpleValueSet();
    value.clear();
    if(this.initRFC_Input(nodeElement.getColumn2())){
         for (int i = 0; i < wdContext.nodeRFCresult().size(); i++){
              value.put(wdContext.nodeRFCresult().getRFCresultElementAt(i).getLgort()
                 , wdContext.nodeRFCresult().getRFCresultElementAt(i).getLgobe());
    In this code, nodeElement is the context row of the table that is passed dynamically to the method when the value of colum2 is changed.
    HOWEVER, the problem I'm having is that after executing this code, EACH NEW ROW that is added to the table has by default the same values as the first row, in the column1 EVS. And, for example, if I refresh the values of the column1 EVS in row 2, all EVS values in the other rows are also refreshed with the same values as the ones of EVS in row 2.
    How can I make sure each row EVS has its own set of independent values, so they don't mess with each other?
    Hope you guys can help me. And please, let me know if I didn't explain myself correctly!
    Thanks!

    I just did as you said (I think), but it's still having the same behaviour as before (same data for all EVS in the table).
    Here´s what I did:
    I
    In node "Detail" (cardinality 0...n, singleton set to true), which is binded to the table, I created a child node named "Column1Values" wth cardinality 1...1 and singleton set to false.
    "Column1Values" node has an attribute called "column1", of type String.
    I did the binding between attribute "column1" and the column1 inputfield celleditor in the table.
    I created an event called Column2Changed and binded it to the column2 celleditor of the table. I added a parameter called nodeElement of type IPrivateCompView.IDetailElement to this event, and mapped it to the column2 editor in the table so that I can dynamically get the nodeElement that is being affected.
    I added the following code to the onActionColumn2Changed(wdEvent, nodeElement) method that gets created in the view:
    IWDAttributeInfo attrInfo = nodeElement.nodeColumn1Values().getNodeInfo().getAttribute("column1");
    ISimpleTypeModifiable siType = attrInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet<String> value = siType.getSVServices().getModifiableSimpleValueSet();
    if(this.initRFC_Input(nodeElement.getColumn2())){
         for(int i =0; i < wdContext.nodeRFCresults().size(); i++){
              value.put(wdContext.nodeRFCresults().getRFCresultsElementAt(i).getId(),
                                  wdContext.nodeRFCresults().getRFCresultsElementAt(i).getDesc());
    And with this, I still get the original problem... When the EVS of one row is updated, ALL other EVS of the table get also updated with the same values.
    What am I missing? Sorry Govardan, I bet I'm not seeing something really obvious... hopefully you can point me in the right direction.
    Thanks!

  • Load and Display Multiple Images in a Web Dynpro Table

    I am new to Web Dynpro and I am wondering if anyone can help me with an application that I am currently developing. I have a particular requirement to store images in a database table (not MIME repository) and then display them in a WD table element. An image can be of JPEG, PNG or TIFF format and is associated with an employee record.
    I want to create a view in my application that displays multiple images in a table, one image per row. I want to do this using Web Dynpro for ABAP, not Java. I have looked into pretty much all examples available for Web Dynpro and came to the conclusion that Components such as WDR_TEST_EVENTS and WDR_TEST_UI_ELEMENTS do not have any examples of images being stored in a database table and viewed in/from a Web Dynpro table element. Programs such as RSDEMO_PICTURE_CONTROL, DEMO_PICTURE_CONTROL and SAP_PICTURE_DEMO do not show this either.
    The images to be displayed in the Dynpro table are to come from a z-type table, stored in a column of data type XSTRING (RAW STRING). So I would also like to know how to upload these images into this z-type table using ABAP code (not Java).
    Your help would be greatly appreciated.
    Kenn

    Hi,
    May be this is the is the correct place to post your query.
    Web Dynpro ABAP
    Regards,
    Swarna Munukoti.
    Edited by: Swarna Munukoti on Jul 16, 2009 3:52 PM

  • When trying to send a link off firefox via email the system looks for a g mail account that I do not have nor want to have. I've told the settings to use my outlook account but it keeps looking for g mail. how do i correct?

    when trying to send a link off firefox via email the system looks for a g mail account that I do not have nor want to have. I've told the settings to use my outlook account but it keeps looking for g mail. how do i correct?

    http://support.mozilla.com/en-US/kb/Changing+the+e-mail+program+used+by+Firefox

  • Drag and Drop between Web Dynpro Tables on Cell Basis

    Hi Experts,
    I need to develop a Drag and Drop Functionality as follows:
    I have two tables. I want to drag a row of the first table and drop it in a particular cell of the second table.
    Is it possible to implement this using the Web Dynpro Drap and Drop Functionality?
    If not, does anybody have an idea of how to implement this using other concepts (Flash Integration, Building up a Grid of Images and defining those as drop tragets, etc..)??
    Valuable Advice is highly appreciated!
    THANKS, Johannes

    Thanks for the Video.. It gives some information about Drag and Drop, but still, it does not say what I need to know.
    Again:
    I need to know if there is a way to drag particular cells in a Web Dynpro Table to other locations in that same table. Plus: I need to know if there is a way to drag and drop rows of one table into particular cell of another table.
    Similar to what we do in our Outlook Calendars: We have a week in view and we see our appointments as blocks within that week view. Now, we can drag and drop these blocks to other locations. That is what I need to implement!
    Does anybody have an idea?
    THANKS, Johannes

  • Sender in payment advice notes Via Email

    Hi, All,
    Is there any body know how to set up an specific sender in payment advice notes Via Email? Sounds like the e-mail-address of the sender always corresponds to the current user. Is there any way to set it as a pre defined email address? Thanks.
    Meiying

    Hi,
    If you want to have the same E-mail address given on the form, then I can advise.
    The one e-mail address can be put in the address detail field or the heather as a fix text,
    so the same will be displayed to them every time.
    We had the same problem and this was the easiest way to get it done.
    Maybe this helps to you.
    Good luck!
    Regards,
    Endre

  • Copy from clipboard and paste in Web Dynpro table

    Hi
    I have a client requirement where the client wants to copy the table from some already existing application and paste the data  directly in web dynpro java table.  It is similiar to copy the data from clipboard and paste it directly in web dynpro table.
    I would like to know is it feasible. If yes, please provide some links or guide me on achieving the same.
    Thanks
    Harsimran

    Hi
    I think one way you can do it,
      1 . try to export the table dato to excel sheet.(copy and paste to excel)
       2. Importing the excel data to WD table.
      for more details about reading excel data, there is many blog on sdn just check it.
    Hope will help you
    Thanks

  • Integration of a Tree Structure in a Web Dynpro Table

    Hi,
    I am implementing an Integration of a Tree Structure in a Web Dynpro Table.
    The Tree-Table os working as required, but I can not work with the OnLeadSelect Action of the table.
    The Action does not work as required, meanning, it returns all the time the first row and not the "lead select".
    As far as I read I should add some code to the wdDoModifyView method, but I did not figure out exactly what...
    Thanks in advance,
    Aviad

    check this URL:
    /people/valery.silaev/blog/2005/06/20/master-of-columns-part-ii

  • Tree Structure in a CE Web Dynpro Table

    Hi,
    Anyone has any idea how to do it in the CE Edition?
    I've tried to follow the steps of the older versions and it didn't work:
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/bc/601c420d84db2ce10000000a1550b0/frameset.htm
    Thanks and regards,
    Eduardo

    Hi Armin,
    The tutorial asks me to: "Insert a Web Dynpro table, including the UI element TreeByNestingTableColumn (also known as the master column) in the layout of the TreeTableView."
    I didn't find this TreeByNestingTableColumn, do you have any idea what i'm doing wrong?
    Thanks and Regards,
    Eduardo

  • Using portal theme in web dynpro tables

    We are currently running EP6 (NW04).  Is there a way to make our java web dynpro table ui elements use the portal theme?  All tables appear blue unless they are checked as readonly in which case they are white. 
    I see there is a TableCellDesign ui element, but that is not available until NW04s and we are not there yet.
    Please assist. (and thank you!)
    Jeff Karls

    hi
    You are right about NW04s portal theme editor and we are able to change colour
    the tablecelleditor ui. But as far as i remember i was able to change properties like selected cell colour, non selected cell colour and mulitselected cell colour.
    However if you are not able to change it in EP 6.0 (NW04) then use the webdynpro themes. I suppose you will be able to do everything there.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d2b1d790-0201-0010-25b7-d1fb059a8ad9">How to edit webdynpro themes</a>
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/1e/535d420447e054e10000000a155106/frameset.htm">Setting the theme in Visual admin</a>
    Hope it helps.
    regards
    LNV

  • Unable to display text with image in a cell of web dynpro table.

    Hello,
    I am unable to display an image with the text inside a cell of web dynpro table. The image doesn't come at all. I am trying to display the image of an object and the object description alongside within the same cell.
    Thanks and Regards,
    Abhijnan

    Hi
    Pls check the below link
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/9b/46bb0d339b42cc8d30636ca0c9f5b6/frameset.htm
    The only problem is only the below UI elements are supported
    ■Button
    ■ToggleButton
    ■LinkToUrl
    ■LinkToAction
    ■FileDownload

Maybe you are looking for

  • How can i add songs from my itunes onto my boyfriends iphone?

    i have just pluuged my boyfriends iphone into my pc to add some songs to his phone, but everytime i go to drag and drop any songs it comes up with a red circle with a red line across it.  Can anyone help?

  • What is the best way to work with avi-files?

    Hallo all, I'm new to this forum so before asking my question I'd like to say some words about myself: I'm not a native english speaker, so please excuse language mistakes I'll possibly make and feel free to ask if I'll write something which you don'

  • Item category Billing Relevance

    Hi All Can i exactly understand what is the exact impact on the system for the Billing relevance in the item category? If I set it as 'B' -Relevant for order-related billing - status according to order quantity If I set it as 'C'- Relevant for order-

  • Algorithm question, please help

    Hi all, Suppose that we have several String lines (postal addresses for example) in a text file. Is there an algoritm that permits to find the list of the addresses that 'resembles' to the query (an address that may contain an error) entered by the u

  • I reserve is not working in the UK today 181/10/2012

    The I-Reserve process is not working in the UK today ? ........I successfully used it monday but was unable to pick up the phone the next day ....In the email saying i had a phone was a Change Pickup time link (which i later found out is only valid f