cancel
Showing results for 
Search instead for 
Did you mean: 

how to set query result to emai content?

Former Member
0 Kudos

Dears,

Since user want to get the email with content like a grid format, just like a sql query result with some columns and rows.

Is there any simply way to set the sql query result to the email content?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

agentry_src
Active Contributor
0 Kudos

You could simply save the sql query result to an html file and attach it to the email. Or similarly build a PDF document with the table embedded and attach.

Regards,

Mike

Former Member
0 Kudos

Hi Mike,

Thank you for your information.

Could you please describe a little more detail steps, I'm not familiar with MII.

Thanks in advance!

agentry_src
Active Contributor
0 Kudos

Create a transaction or modify the existing one which is sending the email.

Take the output of the SQL Query action block and use an XSLT action block (lookup the ones in the Transformation portion of the query template you are using in the SQL Query action block to find the one with an HTML output) to convert it to HTML.

Go the Web group of action blocks and find the HTML Saver.

You can save it to the Workbench (actually NW) by using either web://<yourprojectname>/WEB/<yourfoldername>/<yourfilename> or db://<yourprojectname>/WEB/<yourfoldername>/<yourfilename> (web:// publishes it, db:// does not)

Play around with it a bit to see what will present the data the way you want.

Good luck,

Mike

Former Member
0 Kudos

Hi Mike,

Did you mean the XSL Transformation action in XML Functions to transfer query templte output xml to a html?

There are 3 input parameter as below, how to use them?

InputXSL

Transform

Input

Thanks a lot!

agentry_src
Active Contributor
0 Kudos

The Input property is the output from your SQL Query action block.

You can use either of the other two for the XSL. Either link to the transformation folder using a proper url (copy the path of the one you want from the query template Transformation) or build/copy the xsl coding to the InputXSL property.

Regards,

Mike

Former Member
0 Kudos

Hi Mike,

Sorry to bother you again.

Because I'm not familiar with XSL, I want to ask more detail.

Actually I'm using the Document object in SAP MII XML Output folder to form a dataset as a xml. I think it's just like a xml output of a query template.

I just want to convert the dataset xml to a html file for use easy to read it.

Should I edit a XSL by myself? Or which XSL in MII should I use? Is the Output of XLS Transformation a html file?

Many thanks!

agentry_src
Active Contributor
0 Kudos

Go to your Query Template - Transformation screen.

Click on Browse button. A folder structure will appear with three subfolders.

Select the a subfolder and look around for an xsl file which has HTML in the name. If might be in a child folder. There may be several. Select one and then copy the url for use with the XSL Transformation action block.

If you want to modify the standard xsl, put a tracer in afollowing the XSL transform action block and link to the xsl. Copy the Tracer message contents and modify to your hearts content.

The input xml must be in MII standard xml format for the standard xsl to work. However, by putting it into the MII Output XML Document, you have already done that.

Regards,

Mike

Former Member
0 Kudos

Hi Mike,

Thank you for your detail description again.

I just tried what you mentioned. I set Transform url to server://XMII/Stylesheets/IllumRowsetHTML.xsl

Finally I got the html content from XSL_Transformation_0.TextOutput.

But I could not get xsl in tracer. I link tracer to xsl transform action block's InputXSL or Transform parameter, but can only get the xsl url at most.

Thanks!

Former Member
0 Kudos

Hi Ivan

To see or copy the xsl just go to Internet Browser and type in

http://<serverName>:<serverPortId>/XMII/Stylesheets/IllumRowsetHTML.xsl

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

There's a trick that I used long back for doing a sceanrio like this. There's a blog on it

/people/musarrat.husain2/blog/2008/02/05/sending-an-html-email-in-xmii-using-dynamic-data

I hope it helps.

Thanks,

Musarrat

Former Member
0 Kudos

Hi,

I will try it. Thanks for your information!