cancel
Showing results for 
Search instead for 
Did you mean: 

Sending the application via Email

Former Member
0 Kudos

Hi,

Is it possible to have a custom action button which will trigger an email with the contents from VC model output e.g. table contetns or a chat or an entire page?

I have implemented the mail sending feature using hyperlink with "mailto", but not able to send the table or chart contents.

Could you anyone please let me know if it possible and if yes how to write the required dynamic expression?

Regards,

Praveen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Praveen,

you can do this with the email parameters as Sooraj mentioned it or you can use a webservice for this requirement. There are several examples available in the SDN blogs, which describes how-to write an email webservice in ABAP and in JAVA. I think a webservice is a solution, which is reusable in other apps. If you only have to send a few data and only has the requirement in this app then do it like Sooray mentioned it.

Best Regards,

Marcel

Former Member
0 Kudos

Hi Sooraj and Marcel,

Thanks a lot for your response. I have few questions regarding the solution suggested by you.

I was trying to write the expression for sending a mail with subject and body using "mailto" syntax. While deploying I am getting error

<i>Error in executing a process for Flex compilation, Error: The reference to entity "body" must end with the ';' delimiter.</i>

The expression I used was "mailto:name@comp.com?subject=sub&body=Test".

When I am using this expression with either Subject or body, it is working fine. But giving this error when using both.

Also if I want to send the entire table or chart as a mail body, how do I write the expression? In the formula editor I can access the individual fields of table/chart, but not entire table/chart.

Marcel : could you please elaborate on the web service solution? Do I need to write this web service in a R/3 source system and use it in VC? How do I pass the parameters (table, chart, entire page etc.) to this web service?

Regards,

Praveen

Former Member
0 Kudos

Hi Praveen,

have a look into these blogs:

<a href="/people/renald.wittwer/blog/2005/01/05/develop-a-web-service-that-sends-an-email">Develop a Web Service that sends an Email</a>

<a href="/people/thomas.jung3/blog/2005/01/05/develop-a-web-service-that-sends-an-email--in-abap">Develop a Web Service that sends an Email - in ABAP</a>

You can decide between Java and ABAP.

Best Regards,

Marcel

Former Member
0 Kudos

Hi Marcel / Sooraj,

Could you please suggest some solution for the problem I am having with the "mailto" option? As I mentioned earlier, I have two issues there -

1. Syntax Error - when using both subject and body

<i>Error in executing a process for Flex compilation, Error: The reference to entity "body" must end with the ';' delimiter</i>

2. If I want to send the entire table or chart as a mail body, how do I write the expression? In the formula editor I can access the individual fields of table/chart, but not entire table/chart.

Regards,

Praveen

Former Member
0 Kudos

Hi Praveen,

I recommend to use a webservice. When you want to pass something for the body via parameters (mailto:....) then it should not a whole table resp. report. It would be better to use a webservice and pass the data into the webservice then it is possible to create a well formatted report (in HTML format) for your email, e.g. you pass the table values into a webservice you can write a loop, e.g. some pseudo ABAP:


* Create HTML Body with simple Table
l_html_body = '<table>'.
LOOP AT T_TABLE INTO L_S_TABLE.
  CONCATENATE l_html_body '<tr><td>' L_S_TABLE-VALUE1 '</td><td>' L_S_TABLE-VALUE1 '</td></tr>' INTO l_html_body. 
ENDLOOP.
* Close Table Tag 
CONCATENATE l_html_body '</table>'  INTO l_html_body.

* Body is ready for sending in email...

Hope this hint helps you.

Best Regards,

Marcel

Former Member
0 Kudos

Hi,

> <i>Error in executing a process for Flex compilation,

> Error: The reference to entity "body" must end with

> the ';' delimiter.</i>

>

> The expression I used was

> "mailto:name@comp.com?subject=sub&body=Test".

>

I copy pasted the above expression, but VC is compiling fine for me.

For copying the entire table, you can use the system action Export. But for charts, it will give the chart data, not the chart itself and you have to paste it manually in the mail. More info

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/47fe4fef-0d01-0010-6f87-ed8ecb479123">Here</a>

Regards,

Sooraj

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

You can use a formula in the hyperlink to send data from a table. But i don't think its easy to attche pictures.. do a google search for mailto syntax for that.

a sample may be like this

'mailto:myname@mydomain.com?subject=TestSubject&body=Data1=' & #ID[ACA2LEL]@Data1 & '%0AData2=' &#ID[ACA2LEL]@Data2

Regards,

Sooraj