Email the output of a concurrent program as Attachment


This article illustrates the steps to be followed to Email a concurrent program’s output.

  1. Write a procedure that will submit the concurrent program whose output has to be sent as an Email and once the program completes, send the output as Email using UTL_MAIL.send_attach_varchar2.
  2. Register this procedure as a concurrent program so that this program can be run from Oracle Applications which will email a concurrent program’s output.

Detailed explanation with sample code:

  1. Write the below procedure which submits the desired concurrent program and waits until it completes and then sends the output of that program to the specified Email address using the utility UTL_MAIL.send_attach_varchar2

     

  1. Register the above written procedure as a concurrent program
  • Define Executable:

  • Define Concurrent program with 2 parameters: Concurrent Program Name and Program short Name.