cancel
Showing results for 
Search instead for 
Did you mean: 

Including a Table in Mail Body

Former Member
0 Kudos

Hi,

How to include a table in Mail body? Kindly help me out.

Thanks & Regards,

Dhana

Accepted Solutions (0)

Answers (2)

Answers (2)

lajitha_menon
Contributor
0 Kudos

Hi Dhana,

If you need to display the contents of a table in the mail body, you have to manually append the contents which you need to it...like

String Body = "Mail body starts here";

for(int i=0;i<wdContext.nodeTable().size();i++){
wdContext.nodeTable().setLeadSelection(i);

Body = Body + "n" + wdContext.currentTableElement().getFieldVal1() + 
wdContext.currentTableElement().getFieldVal2() ;
 }

Regards,

LM

Former Member
0 Kudos

Hi,

I have created an application, in which i have to insert an entire table (i.e. with rows and columns) into the mail body. I dont want to insert the table contents alone. Is there any way to do this?

Kindly help me out.

Thanks & Regards,

Dhana

lajitha_menon
Contributor
0 Kudos

Hi Dhana,

I dont think there is a readymade way to do it. You have to first insert the static headers, then loop through the table and insert contents. Formatting will be an issue and you would need to put characters like <b>|</b> and fix the number of characters for each field value to see the data properly.

Regards,

LM

Former Member
0 Kudos

Hi,

I have a table in a view. I want to include that entire table in an excel file. How can I do it?

Kindly help me out.

Thanks & Regards,

Dhana

SRudra
Contributor
0 Kudos

Dhana,

Download the data into excel sheet. For downloading data coding & info from the the links below:

http://www.sapdevelopment.co.uk/ms/ms_excel.htm

Later you can send the file as an attachemnt with the mail body. Does this help to solve your problem.?

Cheers

Sukanta Rudra

roberto_tagliento
Active Contributor
0 Kudos

When you send an email, you can set the type content MIME of mail.

Usually is a normal TEXT, but you can set also HTML; so create the content like a normal HTML page and use all TAGs you need, from TABLE, TR, TD ....

Former Member
0 Kudos

Hi Dhana,

What do you mean by including table ?

Check the thread https://forums.sdn.sap.com/click.jspa?searchID=371484&messageID=699045

Regards, Anilkumar