Sunday 15 March 2020

Oracle send email with excel attachment

Oracle send email with excel attachment

In this post , We will be discuss about the option of Oracle send email with excel attachment. Oracle can send the email of the report output with excel attachment. We have many options to send emails with excel attachment of reports output from oracle system. I will share some of the usefully methods which helps to send email with excel attachments. 

2 Methods to send email with excel attachment

1.Delivery Option in Concurrent request.
2.Bursting Option


Oracle Delivery Option to send email with excel attachment

1. In concurrent Requests , We have the Option 'Delivery Opts' to send the report output through email automatically. We need to define the email address in Delivery option and system automatically send emails to that email address when the program completes successfully.

Oracle send email with excel attachment

2.For each recipient row (To/CC), a new email is sent to the defined recipients. 
The behavior of the delivered email is as follows: 

1. If the report being delivered is TEXT based, then the email message body contains the report contents.
 2. If the report being delivered is NON-TEXT, the email message body is blank and the report is added as an attachment to the email. The attachment name is derived from the Concurrent Program Short Name and Request ID

a. Log into System Administrator responsibility.
b. Navigate to Profile - System.
c. Query up the %SMTP% profiles.
d. Set the following profile values to the defined host and port:

FND:SMTP Host
FND:SMTP Port

Example
FND:SMTP Host = mail.<smtp_server>.com
FND:SMTP Port = 25


Bursting Option to send email with excel attachment

1. First Important thing to Implement the XML bursting is this , The Concurrent Program on which we are implementing or running the XML bursting should XML Based. It means its output type should be 'XML'
Oracle send email with excel attachment

Step2:- Now to Copy the Short name of the Concurrent Program and Go to the XML Administrator Responsibility and Paste the Copied Short Name in the code
XML Administrator Responsibility ==> Date Definitions
Now Here we need to Attached the XML Bursting Control File which will have all the logic to burst the Concurrent program output in multiple emails

Step3:- As below this is the XML bursting File. We need to Design this File in this Format and Then attach to the Concurrent Program data Definitions as per last Step (Step2).
Here We give all the Information's about Our SMTP server which will send the email Notifications in the <xapi:email> tag.
<xapi:request>  is very important tag in the Bursting. Here I have used the "/XX_REPORT_GROUP1/XX_REPORT_GROUP2/XX_REPORT_GROUP3".  It means my Original Concurrent Program Report (RDF) has three groups with these names and I want to do burst emails as per my Third Group. Groups names should be same as per my Report. I can also use  "/XX_REPORT_GROUP1/XX_REPORT_GROUP2" in the <xapi:request> tag If I want to do burst emails as per my Second report group. You can also this
"/XX_REPORT_GROUP1/XX_REPORT_GROUP2/XX_REPORT_GROUP3" grouping idea from your Concurrent Program XML output. GO to Concurrent Request of the Concurrent Program and View the Output in XML. You can get the idea from there about all reports xml groups names and you can use these names in the Bursting Control File <xapi:request> tag.

The Only change , We need to do in the below Bursting Control file to change the "output-type=excel" as 'xapi : document'.
Oracle send email with excel attachment
Step4:- Now I have attached the Bursting Control file to the Concurrent Program Data Definitions. Now the Next step is to run that Concurrent Program Concurrent Request.
Oracle send email with excel attachment

Step5:- Now Copy the Request Id from Step 4 and Put in the "XML Publisher Report Bursting Program" request id Parameter as below.

This will Fire the XML bursting for this Concurrent Program request Output.

Oracle send email with excel attachment 

Oracle send email with excel attachment

0 comments:

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *