cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Web Dynpro table contents via Email

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks Srinivasan, your solution works.

I just used StringBuffer and added all the HTML content to it by appending.

Regards,

Shilpa B.V

Answers (1)

Answers (1)

Former Member
0 Kudos

I would suggest you to take to code for download to Excel in which you convert the contents of the table to XML and then this gives you an XML file which you should be able to pass and play around (may be pass it as an *.xls file or an XML file mentioning the user to open in MS-Excel.)

This just a guess cuz there is no procedure to show the same table format to any mail program as far as I know.

Thanks

Avik