How to send one single mail each time a table is updated with a batch of rows

Hi!
I would like to send one mail each time an integrations services inserts a batch of rows. I,ve tested with this code but it sends one mail for each row that is inserted to the table. How to adjust the code below so it only sends one email?
Br Arne
CREATE TRIGGER trao_FOBOSTAFKbelopp
ON FOBOSTAFKbelopp
AFTER INSERT
AS
BEGIN
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'ArneSqlDatabasemail',
@recipients = '[email protected]',
@subject = 'Ny förkalkyl',
@body = 'Hej!
En ny förkalkyl har registrerats.
För att titta på den klicka på bifogad länk.
Hälsningar
Arne'
END
Arne Olsson

That is because the process is inserting the rows one at a time.
I would suggest changing your trigger to "log" the changed rows into a table, and then have a process which reads the log and generates the email.

Similar Messages

  • How to send 1000 records per each time through JDBC adapter

    Hi all,
    In my JDBC to File scenario, SQL Server database having 10,000 records. I want to split these records into 1000 records and process 1000 records each time. How we can do in JDBC adapter. Is there any options in JDBC adapter. Please give me reply very thanks to all of u.

    Hi all,
    Thanks for your repsone. I am very happy.
    If it sender Jdbc we can write the query. If it is Receiver Jdbc adapter and I want to send the record as 1000 at a time. 
    You may give this advise that is you can use RecordsetPerMessage option at sender side. But here I want to read all the records and send 1000 records only.
    please give me valuable answer.
    thanks in advance...

  • Can any one tell me how to send one PO to mutilple mail ids in vendor maste

    Hi Experts,
    Can any one tell me how to send one PO as a mail to multiple vendors who are all maintained in my vendor master record
    Suppose I have 3 mail ids in my Vendor master record and I created a PO with that vendor, will that PO goes to all the three mail ids maintained in the vendor master record  or only to one ?
    Inorder to send to multiple mail ids, Do we need to do any configure any thing in SPRO settings functionally, if so where we have to maintain?
    Or shall an Abaper needs to maintain a code for that.?
    Please suggest me, I would appreciate your feed back.
    Best Regards,
    Sairam

    Go to XK02 enter the vendor code
    go to the communication tab
    Email will be there press the ---> button
    you can add many Emails in the list.
    Please ensure that the  message output is configured by
    the  SAP BASIS team
    No need of any configuration
    G.Ganesh Kumar

  • How to stop iPhoto from opening each time I add a photo using Yosemite

    How to stop iPhoto from opening each time I add a photo using Yosemite

    Add image to iPhoto Library
    From where.  I don't think you can keep it mininmized when importing because if it runs into a duplicate it will present a warning window for you to make a decision in. Therefore, it will always be open when importing.
    You can send a feature request to Apple via http://www.apple.com/feedback/iphoto.html.

  • What do they mean by your apple id has been disabled and how do I enable it?  I get this each time I try to update my apps.

    what do they mean by your apple id has been disabled and how do I enable it?  I get this each time I try to update my apps.

    Got it sorted. AN e-mail to teh support centre got me three replies, two reasuring me that someone os working on it and the third giving me the information that the ID is enabled again and ready to use. All within 24h. Of course without any information as to why the problem came up in teh first place. At least it was swift action.

  • HT1277 Mail won't come in unless I open and close mail each time! help!

    Mail won't come in unless restart "mail" each time.  IMAP cox trying to setup new email addresses....connection doctor shows mail checked and 'light' is green but mail will not display until restarting.  I know there is a simple solution, just can't see what it is! Can anyone help? I tend to make things more difficult than I need to!

    Okay, I solved the problem... FINALLY!!! Added "pop" to my email address when re-setting up account in Mail. This allowed me to set it up as a pop account and all works well!! Problem "Solved"!!

  • HOW TO SHOW ONE PAGE AT A TIME

    Does anybody have a clue how to show one page at a time? I clicked Facing Pages in the Inspector and 2 columns of pages showed up. Now, I can't get it back to just one page showing up at a time. There must be a fix, but I don't' want to spend days on this. Many thanks.

    Frank,
    At the bottom left of the page, click on the zoom percentage, then select One-up from the menu.
    -Dennis

  • How to Send Appointment via mail adapter

    Hi Guys,
         I need to send the appointment and vTodo via mail adapter, any way i need to develop a mail adapter module. Till now i have finished this part,and i can send normal mail even normal mail with attachment. But i don't know how to send appointment via mail adapter.
    This is payload content of appointment which got from Exchange server to gmail:
    _=_NextPart_001_01C71EC0.97A011C6
    Content-Type: text/plain;
        charset="GB2312"
    Content-Transfer-Encoding: quoted-printable
    When: 2007=C4=EA6=D4=C227=C8=D5=D0=C7=C6=DA=C8=FD 3:30 =CF=C2=CE=E7-4:00 = =CF=C2=CE=E7 (GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi.
    Where: China
    ~*~*~**
    This is calendar content
    _=_NextPart_001_01C71EC0.97A011C6
    Content-class: urn:content-classes:calendarmessage
    Content-Type: text/calendar;
        method=REQUEST;
        name="meeting.ics"
    Content-Transfer-Encoding: 8bit
    BEGIN:VCALENDAR
    METHOD:REQUEST
    PRODID:Microsoft CDO for Microsoft Exchange
    VERSION:2.0
    BEGIN:VTIMEZONE
    TZID:(GMT+01.00) Sarajevo/Warsaw/Zagreb
    X-MICROSOFT-CDO-TZID:21
    BEGIN:STANDARD
    DTSTART:20070112T140000
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0100
    END:STANDARD
    BEGIN:DAYLIGHT
    DTSTART:20070112T140000
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0200
    END:DAYLIGHT
    END:VTIMEZONE
    BEGIN:VEVENT
    DTSTAMP:20061213T141132Z
    DTSTART;TZID="(GMT+01.00) Sarajevo/Warsaw/Zagreb":20070112T140000
    SUMMARY:This is calendar test
    UID:040000008200E00074C5B7101A82E0080000000030D51864C81EC701000000000000000
    010000000CA9F127EA8947844BC4DD47F269BDEA9
    ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="Xu, Rocky":MAILTO:rocky@***.com
    ORGANIZER;CN="Xu":MAILTO:rocky@**.com;roc*@gmail.com
    LOCATION:Shanghai
    DTEND;TZID="(GMT+01.00) Sarajevo/Warsaw/Zagreb":20070112T160000
    DESCRIPTION:This is calendar content\N
    SEQUENCE:0
    PRIORITY:5
    CLASS:
    CREATED:20061213T141132Z
    LAST-MODIFIED:20061213T141133Z
    STATUS:CONFIRMED
    TRANSP:OPAQUE
    X-MICROSOFT-CDO-BUSYSTATUS:BUSY
    X-MICROSOFT-CDO-INSTTYPE:0
    X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
    X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
    X-MICROSOFT-CDO-IMPORTANCE:1
    X-MICROSOFT-CDO-OWNERAPPTID:367904726
    X-MICROSOFT-CDO-APPT-SEQUENCE:0
    X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20061213T141132Z
    X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20061213T141132Z
    END:VEVENT
    END:VCALENDAR
    _=_NextPart_001_01C71EC0.97A011C6--
    My question is
      1. How to generate this kind of payload in mail adapter module?
      2. It is possible to send appointment via mail adapter?
    Following i can get from other system, even using mail package check or not using mail package check.
    BEGIN:VCALENDAR
    METHOD:REQUEST
    PRODID:Microsoft CDO for Microsoft Exchange
    VERSION:2.0
    BEGIN:VTIMEZONE
    TZID:(GMT+08.00) Kuala Lumpur/Singapore
    X-MICROSOFT-CDO-TZID:21
    BEGIN:STANDARD
    DTSTART:16010101T000000
    TZOFFSETFROM:+0800
    TZOFFSETTO:+0800
    END:STANDARD
    BEGIN:DAYLIGHT
    DTSTART:16010101T000000
    TZOFFSETFROM:+0800
    TZOFFSETTO:+0800
    END:DAYLIGHT
    END:VTIMEZONE
    BEGIN:VEVENT
    DTSTAMP:20070608T025852Z
    DTSTART;TZID="(GMT+08.00) Kuala Lumpur/Singapore":20070608T110000
    SUMMARY:This is meeting request with attachment
    UID:040000008200E00074C5B7101A82E0080000000000A9BD0BA7A9C701000000000000000
    010000000C5E16D144D1612498C0EF7E2115EFEC4
    ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="Xu, Rocky
    ":MAILTO:roc*@**
    ORGANIZER;CN="Xu,y":MAILTO:roc*@**
    LOCATION:India labs
    DTEND;TZID="(GMT+08.00) Kuala Lumpur/Singapore":20070608T113000
    DESCRIPTION:This is content!  <<shanghai.txt>> \N
    SEQUENCE:0
    PRIORITY:5
    CLASS:
    CREATED:20070608T025925Z
    LAST-MODIFIED:20070618T033505Z
    STATUS:CONFIRMED
    TRANSP:OPAQUE
    X-MICROSOFT-CDO-BUSYSTATUS:BUSY
    X-MICROSOFT-CDO-INSTTYPE:0
    X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
    X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
    X-MICROSOFT-CDO-IMPORTANCE:1
    ATTACH:CID:008501c7b159$a9d41d3b$_CDOEX
    X-MICROSOFT-CDO-OWNERAPPTID:1468557271
    X-MICROSOFT-CDO-APPT-SEQUENCE:0
    X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20070608T025852Z
    X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20070608T025852Z
    END:VEVENT
    END:VCALENDAR
    Thanks & regards
    Rocky

    Hi
    have a look at this
    You can use Java/ABAP proxies to do this job for you..
    Java Proxy >> will read the mail(with the attachments) with the help of Java APIs and send the message into XI ABAP Proxy >> for this you will have to first convert the attachment into a message and then you can proceed in the regular fashion.
    Not all adapters can process attachments, I'm not sure why you are having trouble with using module processor in the mail adapter. Just check if the service pack that you are using supports this feature.
    If you are on WAS 6.10 and above you can achieve this and there is an excellent weblog by Thomas Jung on this topic at
    /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816
    reading Pdf Through mail easly done with Java Proxy, which will read the mail(with the attachments) with Java APIs and send the message into XI and then map with the Target ABAP proxy structure .
    Thanks

  • In iCloud, how to send an e-mail to a group of contacts, once I've created the group?

    I have created a group  from my iCloud contacts, but do not see how to send an e-mail message to this group.
    The help topics don't go this far.  Can anyone help?

    Thanks Winnie;  but why didn't that work when I typed in the whole title of the group?   Just the 1st 2 letters did the trick.
    Over & out

  • QuestionJust purchased a USB Super Drive but unsure how to use it - o instructions provided apart from how to eject a cd.  Each time I put in a cd it just ejects it again.

    Just purchased a USB Super Drive but unsure how to use it - o instructions provided apart from how to eject a cd.  Each time I put in a cd it just ejects it again.Can anyone help.

    USB is rarely bootable under Mac OS X and PowerPC Macs.   Get a Firewire Superdrive from http://www.macsales.com/ if your intent is to boot the machine.   PPC, which is PowerPC, indicates the Mac predates 2006.

  • How to send HTML Format Mail using Java Mail in oracle 9i Forms

    Dear All
    could you please tell me how to send HTML Format Mail using Java Mail in oracle 9i Forms and how to implement the java mail ?
    if it is possible, could you please send me the sample code? please very urgent
    Thanks
    P.Sivaraman

    Hello,
    <p>Here is a Form sample.</p>
    Francois

  • How to send an encryted mail

    Hi all,
             I have an issue. How to send an encrypted mail using smartform output.
    I am using the output from smartform and converting it to pdf and then sending that pdf as attachement through mail. But before sending,  i have to encrypt the contents of the mail. Plz anybody know the solution for this issue?

    check this link...
    http://help.sap.com/saphelp_nw04/helpdata/en/4e/c153426da9bd30e10000000a155106/content.htm
    Encrypt.?
    How to Encrypt?

  • How to send one email to entire group.

    Looking for reference on how to send one email to entire group.

    I think you're confused about some basic Java programming techniques.
    There are two obvious ways to do this.
    1. Call the addRecipient method in a loop.
    2. Collect all the recipients in a List, convert it to an array, and call addRecipients.

  • How to send birthday wish mail to Employees on daily basis

    Hi ,
    How to send birthday wish mail to employee with greeting card as background image in Mail Content area.
    Is there any Standard program available in SAP.
    _Requirement:_
        Normal , Birthday Wish mail can be done through function module SO_NEW_DOCUMENT_SEND_API1.
        How to write program for getting , Greeting card as background image in Mail Content area.
        Is there solution in SAP .
    Regards
      Surendar

    Hi,
    Check this for embedding image in your email : Using CL_BCS to send email from ABAP
    And this about image as background and other related stuff : http://www.reachcustomersonline.com/2010/01/23/09.27.00/#faqs
    Best regards,
    Guillaume

  • How to send Deadline Monitoring mails to an external mail (LOTUS NOTES)?

    Hi all,
    1. I know how to send Deadline Monitoring mail to an SAP INBOX. But i need to send the deadline monitoring mail to an external email address (LOTUS NOTES or any other email id).
    2. If i am able to send Deadline monitoring mail to the external email address. It will send mail only once but, How to send these deadline monitoring mails for every 3 days until the approver takes some action.
    Please help me...
    Regards,
    Gautham P

    The easy solution is to set up automatic forwarding for everyone by defining the system as NOT being your e-mail system. I don't know where this setting is (the Basis people did it), but with this setting SAP will forward every user's e-mail to the e-mail address in the user record.
    For repeated sending I think you have to use modelled deadlines. Send the deadline message using a normal mail sending step and loop after calculating the new deadline. (i.e. you need to store the deadline in the container and refer to the container elements in your deadline specification.) The deadline calculation can either be a separate step or you can do it as a secondary method in the mail sending step.

Maybe you are looking for