Need to send a mail when job window time is over

Hi ,
select * from v$version;
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
========
I have created a job using dbms_scheduler.create_job with a 1 hour window ( created using dbms_scheduler.create_window ) .
My job triggers a stored procedure . Now I have a send_mail code at the end of the stored procedure which sends a mail with plsql log as an attachment . When my job runs more than 1 hour the stored proc is getting stopped and not triggering the mail though I put the same code in exception block ( exception when others ) .
CREATE OR REPLACE PROCEDURE my_sp
AS
BEGIN
-- some code ---
begin
-- send mail --
end
EXCEPTION
WHEN OTHERS
THEN
send mail ( Can I get this piece when window time is over )
END;
Is there any other way I can run the last piece of the proc (send_mail) .
Thanks ,
Mahesh

Mahesh wrote:
Folllowing below note .
http://download.oracle.com/docs/cd/E14072_01/server.112/e10595/scheduse008.htm
but need to attach a file .
SQL> desc utl_mail
PROCEDURE SEND
Argument Name               Type               In/Out Default?
SENDER                VARCHAR2          IN
RECIPIENTS               VARCHAR2          IN
CC                    VARCHAR2          IN     DEFAULT
BCC                    VARCHAR2          IN     DEFAULT
SUBJECT               VARCHAR2          IN     DEFAULT
MESSAGE               VARCHAR2          IN     DEFAULT
MIME_TYPE               VARCHAR2          IN     DEFAULT
PRIORITY               BINARY_INTEGER          IN     DEFAULT
REPLYTO               VARCHAR2          IN     DEFAULT
PROCEDURE SEND_ATTACH_RAW
Argument Name               Type               In/Out Default?
SENDER                VARCHAR2          IN
RECIPIENTS               VARCHAR2          IN
CC                    VARCHAR2          IN     DEFAULT
BCC                    VARCHAR2          IN     DEFAULT
SUBJECT               VARCHAR2          IN     DEFAULT
MESSAGE               VARCHAR2          IN     DEFAULT
MIME_TYPE               VARCHAR2          IN     DEFAULT
PRIORITY               BINARY_INTEGER          IN     DEFAULT
ATTACHMENT               RAW               IN
ATT_INLINE               BOOLEAN           IN     DEFAULT
ATT_MIME_TYPE               VARCHAR2          IN     DEFAULT
ATT_FILENAME               VARCHAR2          IN     DEFAULT
REPLYTO               VARCHAR2          IN     DEFAULT
PROCEDURE SEND_ATTACH_VARCHAR2
Argument Name               Type               In/Out Default?
SENDER                VARCHAR2          IN
RECIPIENTS               VARCHAR2          IN
CC                    VARCHAR2          IN     DEFAULT
BCC                    VARCHAR2          IN     DEFAULT
SUBJECT               VARCHAR2          IN     DEFAULT
MESSAGE               VARCHAR2          IN     DEFAULT
MIME_TYPE               VARCHAR2          IN     DEFAULT
PRIORITY               BINARY_INTEGER          IN     DEFAULT
ATTACHMENT               VARCHAR2          IN
ATT_INLINE               BOOLEAN           IN     DEFAULT
ATT_MIME_TYPE               VARCHAR2          IN     DEFAULT
ATT_FILENAME               VARCHAR2          IN     DEFAULT
REPLYTO               VARCHAR2          IN     DEFAULT

Similar Messages

  • Auto send e-mails when jobs failed

    Hi,
    Hope this is a simple question for you guys. What we need to setup when a particular job failed, we want to SAP (WAS 6.40 system )send e-mail to a particular individual e-mail address? We have e-mail configured in SAP but not configured CCMS. We also have SolMan 4.0 system installed also. I am trying to read CCMS documentation but there are too many and more concept than step by step. I also searched in this SDN and found out most are point to CCMS configurations and then link to solution manager which seems quite complicated.
    My question is: do I need CCMS and/or SolMan in order to send e-mail notification to a individual when a job failed? Is there a simple setup step for this task? If we do need CCMS and/or SolMan, anywhere have step by step document? I don't want to do all fancy things, just a one task.
    Thanks and regards,
    Yujun Ran

    Yujun,
    Have a look at note 553953
    and there is more information on how to do this with ssm in
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/97d2e8b3-0b01-0010-b787-b8ce558a51c2
    Cheers and don't forget the points when this info is usefull
    Lando

  • Need to send Automated mail when releasing the Hold

    Hi Team,
    I have requirement to send the mail to customers when releasing the Hold Manually in OM.
    Kindly let me which event will trigger when releasing the hold manually.(Action -> Release Holds)
    Thanks
    Suresh.S.

    hi,Suresh
    There may be a way for your requirement.
    Achieved with form personliaze as follows(Not test):
    trigger event: post-query
    1.Check the holds which retrived at 2 is released or not.
    If released then send mail.
    2.Get current holds again.
    At the first time, 1 will not perform anything because of holds has not be got yet.
    Afterwards 1 will perform normally when release hold. (Action -> Release Holds)
    Regards,
    Leno
    Edited by: Leno Sun on 2013/05/10 0:36

  • Need to send Automatic mails when the report successful or Fail.

    Hello Experts,
    Created one report for reconciliation to check BW and R/3 figures.
    There are exceptions designed using reporting Agent settings on the same report.
    (When the values from R/3 to BW are matching it shows Green color and if the values are not matching report shows red color in the columns.)
    There are some mandatory variables for Company code, Period and Currency Type.
    Selections for  Company code and Period are fixed but We have three currency types (00,10,30)
    Reports needs to be executed for three currency types.
    Requirement is that
    when the report is executed for One currency type  (Ex u2013 00)
    If the key figure column shows Green color , Immediately mail has to be sent to necessary mail IDs saying the status successful.
    If the key figure column shows Red color , Immediately mail has to be sent to necessary mail IDs saying the status Failed.
    Like this the same report has to be executed for other two currency types and send the the same status as above phenomenon.
    Sending mails can be taken care by BASIS people with SMTP configuration.
    I want to know the development needs to be done from BW side.
    Are there are any settings in BW to send the message as Successful  when the report shows green color and message as failed when red color appears in the report.
    Regards,
    Siva.

    Hi,
    As i understand you need to set up an alert framework.
    Please check :
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b6d59590-0201-0010-5f9d-adb9f6b14d80?quicklink=index&overridelayout=true
    This can also be achieved using BEx broadcaster
    Please check :
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/efdbd593-0e01-0010-4eb1-a09ffedd550a?quicklink=index&overridelayout=true
    Hope this helps.
    -Vikram

  • CCMS not sending e-mail when system is down

    I have installed solution manager 4.0 and configured it as a CEN to handle all CCMS alerts from our SAP systems (ECC5.0, BW, etc), these systems all have CCMS agents install and configured. The configurations work no problem. We get automatically notifications on a lots of events -- such as shortdumps, responses time, system log errors, etc. However, we never get e-mail notifications on following two situations:
    1. System down -- when one system is down, we can see it availability is going to 0% on solution manager but we did not get e-mail, I am using MTE class "Availability_SysPercent_ABAP",  it should send e-mail when it below 60%. But it never did even it's 0%. Also tried several other MTEs, but none of them work.  Is this because when system is down, CCMS not work any more or something else?
    2. Job cancel -- I am not what MTE class to use in order to send e-mail when some jobs are cancelled.
    Any help are greatly appreciated.
    Yujun Ran

    I don't know if this is correct but my Execution is "Any server" and it works.
    I assume you copied the same method for your central AR method. The person earlier who mentioned clients may have something. I don't use the CCMS_OnAlert_Email_V2 method so I'm not sure but I think the parameters need to have a user in 000 with an e-mail address in the user master in order to send. I don't think this is any different for the Central AR method which works for you so probably not the problem but double-check. I use the CCMS_Send_Alert_to_ALM_V2 method so my config will be a little different.
    Is SAP_CCMS_MONI_BATCH_DP scheduled in CEN? Mine is in the working client but again, not sure if it matters.
    Does the AR method you have assigned show up in RZ20>>Change mode>>View>>Method allocation?
    Is the send job in SAPCONNECT scheduled, I believe it behaves differently with local and central AR's.
    Message was edited by:
            David Hill

  • Any changes in PA30 need to send a mail to the Managers outlook inbox

    Hi,
    Any changes in PA30 (ESS) need to send a mail to the Managers outlook inbox  .
    Kindly let me know the Standard workflow template and  to built the Custom function module in Rule .
    Thanks in advance,
    Richard A

    <i>Any changes in PA30 (ESS) need to send a mail to the Managers outlook inbox</i>
    If its just an email do u need a workflow for it? Configure dynamic actions which will call a subroutine when a change is made to the infotype and send email from that subroutine using SO_NEW_DOCUMENT_SEND_API1.(you can include the necessary logic for determining the approver in the same subroutine).
    Thanks,
    Prasath N

  • Need an enhancement after releasing a PO Need to send a mail to vendor

    Hi all,
              I am having a requirement that, need to send a mail and attachment whenever a PO get released.
    Can anyone help to find the enhancement for to write the code to send a mail to vendor.
    Regards.
    Ranganadh.

    Hi,
    To send a mail when a new PO is created.
    can be achievd by using  class cl_bcs and BADI method
    IF_EX_ME_PROCESS_PO_CUST~POST of BADI ME_PEOCESS_PO_CUST.
    We can aslo configure the OUTPUT TYPE as MAIL in transaction NACE. This is usually doen by the Functional consultant.
    Pls look into these exapmles which clearly explains abt the process of sending a  mail-
    Sending Mail using class cl_bcs
    Re: Mail sending program
    Re: SCOT and FM 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    Reward if helpful.
    Best Wishes,
    Chandralekha

  • "Send e-mail when ownership is assigned" SharePoint 2013 task list

    I've found that the option to "Send e-mail when ownership is assigned" isn't available in SharePoint 2013 (enterprise) task lists. I've found that this functionality is now included the 'issue tracking' list template.
    I'm unsure why this very useful feature has been removed from the task list template. I’ve tried adding the task content type to an issue list; this works fine and the notification is sent. However, the new ‘task aggregation’ feature
    in mysite only picks up items in an task list, so those items stored in issue lists get ignored. Fairly frustrating. 
    I wonder whether anyone from MS can fill me in on when this feature has been removed? 

    Here's a way to enable it by PowerShell:
    http://bernado-nguyen-hoan.com/2013/04/26/enable-email-notifications-for-tasks-list-in-sharepoint-2013/
    Although this works, are we now expected to teach users who create Tasks and want to automatically notify all involved via e-mail Powershell skills? MS really needs to take a second look at this faux pas and bring the "Send
    e-mail when ownership is assigned" option back.

  • Need to send a mail while safty stock goes down compare with actual stock

    Dear experts,
    I Need to send a mail to concern persion while stock goes down compare with safty stock. We plan to put a check at the point of MARD table updation, Because we not able to put a check at the all transaction codes, So please LET ME KNOW HOW TO PUT A CHECK AT STANDARD TABLE UPDATION?
    Thanks in adv,
    jayakumar.M

    Your best bet may to be place your check in the a user exit for goods movements.  The enhancement is MB_CF001, the component is EXIT_SAPLMBMB_001.
    Hope this helps,
    Mark

  • Need to send a mail while safty stock goes down

    Dear experts,
    I Need to send a mail to concern persion while stock goes down from safty stock. We plan to put a check at the point of MARD table updation, Because we not able to put a check at the all transaction codes, So please LET ME KNOW HOW TO PUT A CHECK AT STANDARD TABLE UPDATION?
    Thanks in adv,
    jayakumar.M

    Hi Jai,
    According to my understanding,
    As soon as the stock goes down from the safety stock a mail should be triggered.
    Probable solution (in my opinion)
    create a flag in the table set it whenever the stock value goes down.
    make calculations like (safety stock as today - safety stock previous date) = 0 if not set the flag and construct a workflow withe receiver settings based on the flag field and trigger a mail to the concerned person.
    This is just my idea.
    Try it and revert
    Thanks and Regards
    Srikanth.P

  • While creating Purchase Requisition we need to send a mail for approvers

    Hi All,
    While creating Purchase requisition we need to send a mail to approvers.
    Dowe  need to create Function module ?
    if You know the steps can you please give me the steps.
    Thanks In advance
    Sriman.

    Hi Sriman
    Here we can try for 2 approach
    one is workflow and other his sending emails via user exit.
    I am not much aware about workflow, but you can explore for user exit.
    Try for enhancement component 'MEREQ001'.
    let me know, if you need further help
    Regards
    MD

  • Need to send a mail to group of users when sales order saved

    Hi
    user requirement is send a mail to group of users when sales order is saved

    hi Sanjay,
    Have a look on Michal's blog, it's for JMS, but it works for others: [PI/XI: Quick tip: Preserving attributes of XI messages via MultipartHeaderBean|PI/XI: Quick tip: Preserving attributes of XI messages via MultipartHeaderBean]
    Mickael

  • I need a program to send a mail when sap starts

    I need a program to send a mail (external mail) each time sap start or something similar.
    Does anybody know something about this ?
    Thank you .

    Hi,
    this is not a perfect answer, but it may help you,
    In SM04 transaction code, you will know which user is loged to SAP and which transaction is using, there we have a option to send the mails also
    have a look at it, and try to solve your problem
    Regards
    Sudheer

  • Exchange 2010 - Method to send e-mail when the WAN IP is dynamic

    Hello,
    I am writing due to the fact that I cannot send e-mail from my Exchange 2010 Server to my Yahoo! address for testing. When trying to do so, I get the following error message:
    mta1106.mail.gq1.yahoo.com gave this error:
    Mail from xxx.xxx.xxx.xxx not allowed - 5.7.1 [BL21] Connections not accepted from IP addresses on Spamhaus PBL; see
    http://postmaster.yahoo.com/errors/550-bl21.html [550]
    As one can see, because my IP address is residential, I cannot send e-mail to all addresses on the web. I really would like to use this as my primary contact, and thought of using a proxy. Can someone recommend a good proxy, or workaround for this? I am
    sorry for posting in Exchange 2013, but I couldn't find the 2010 forum. Thank you to all who reply.
    Mike

    Thank you for your reply,
    I have set up DynDNS, and I am currently using my own domain name. The problem was I needed to configure a smart SMTP host, or relay server on my send connector. I decided to go with SMTP2GO, as they are cheap, and allow you to send 20 e-mails a day for
    free. When the money is right, I plan to upgrade.
    Thank you for your help.
    Mike

  • Need  help sending e-mail a mobile messages

    hi!
    i'm a n00b in Java. Can you please tell how can i send e-mail and mobile messages in java?
    thnx!!

    First of all, before you do any programming, if you want to have your computer send e-mail messages then you must have access to an SMTP server.
    Next, if you do have access to one, then JavaMail is a common way to write programs that send e-mail.
    As for mobile messages ("text messages" to a cellphone?) you usually need a contract with some phone company to do that, so they can bill you for it.
    When you find out about that, they should provide you with documentation on how to proceed. If it involves sending e-mail to a particular address, see part 1 of this reply.

Maybe you are looking for