System email and PO intergration

Dear Gurus,
    I am looking to integrate the built in email service of SAP B1 2007A PL 10 with the PO document. As I have to generate email to authorizer of PO whenever a new PO is created. Please advice how it can be achieved.
Faisal Baloch

Hi faisal
I am Providing You some Code for Trigger Modify It according your Need I hope u will be do.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER TRIGGER [DiscountAlerts] ON [dbo].[RDR1]
AFTER INSERT, UPDATE, DELETE
AS
DECLARE  @orderno varchar(30);
IF EXISTS (SELECT T1.[DocNum] AS 'SO No', T1.[DocDate] AS 'SO Date',
                    T1.[CardName] AS 'Customer/Supplier Name',
                    AVG(T0.[DiscPrcnt]) AS 'Average Discount % per Row',
                    T1.[DocTotal] AS 'Document Total(INR)'
               FROM  [dbo].[RDR1] T0
                    RIGHT OUTER  JOIN [dbo].[ORDR] T1  ON 
                    T1.[DocEntry] = T0.[DocEntry]  
               WHERE
                    T1.[DocDate] = convert(datetime,convert(varchar(11),getdate()),113)
                    And T0.[DiscPrcnt] >= 50  and T0.[DiscPrcnt] <= 60
               GROUP BY T1.[DocNum], T1.[DocDate], T1.[CardName], T1.[DocTotal]
BEGIN
EXEC msdb.dbo.sp_send_dbmail
@recipients=N'Mail Id Here',
@body='Please find attached the list of orders for which discount is more than 50%.',
@subject ='Discount more than 50%',
@profile_name ='AlertsPro',
@query ='(SELECT T1.[DocNum] AS ''SO No'', T1.[DocDate] AS ''SO Date'',
                    T1.[CardName] AS ''Customer/Supplier Name'',
                    AVG(T0.[DiscPrcnt]) AS ''Average Discount % per Row'',
                    T1.[DocTotal] AS ''Document Total(INR)''
               FROM  [dbo].[RDR1] T0
                    RIGHT OUTER  JOIN [dbo].[ORDR] T1  ON 
                    T1.[DocEntry] = T0.[DocEntry]  
               WHERE
                    T1.[DocDate] = convert(datetime,convert(varchar(11),getdate()),113)
                    And T0.[DiscPrcnt] >= 50  and T0.[DiscPrcnt] <= 60
               GROUP BY T1.[DocNum], T1.[DocDate], T1.[CardName], T1.[DocTotal]
@attach_query_result_as_file = 1,
@query_attachment_filename ='Results.txt';
--RAISERROR ('This Product''s count is too low to accept purchase orders.', 16, 1);
--ROLLBACK TRANSACTION;
--RETURN
END;
ELSE IF EXISTS (SELECT T1.[DocNum] AS 'SO No', T1.[DocDate] AS 'SO Date',
                    T1.[CardName] AS 'Customer/Supplier Name',
                    AVG(T0.[DiscPrcnt]) AS 'Average Discount % per Row',
                    T1.[DocTotal] AS 'Document Total(INR)'
               FROM  [dbo].[RDR1] T0
                    RIGHT OUTER  JOIN [dbo].[ORDR] T1  ON 
                    T1.[DocEntry] = T0.[DocEntry]  
               WHERE
                    T1.[DocDate] = convert(datetime,convert(varchar(11),getdate()),113)
                    And T0.[DiscPrcnt] > 60
               GROUP BY T1.[DocNum], T1.[DocDate], T1.[CardName], T1.[DocTotal]
BEGIN
EXEC msdb.dbo.sp_send_dbmail
@recipients=N''Mail Id Here'',
@body='Please find attached the list of orders for which discount is more than 60%.',
@subject ='Discount more than 60%',
@profile_name ='AlertsPro',
@query ='(SELECT T1.[DocNum] AS ''SO No'', T1.[DocDate] AS ''SO Date'',
                    T1.[CardName] AS ''Customer/Supplier Name'',
                    AVG(T0.[DiscPrcnt]) AS ''Average Discount % per Row'',
                    T1.[DocTotal] AS ''Document Total(INR)''
               FROM  [dbo].[RDR1] T0
                    RIGHT OUTER  JOIN [dbo].[ORDR] T1  ON 
                    T1.[DocEntry] = T0.[DocEntry]  
               WHERE
                    T1.[DocDate] = convert(datetime,convert(varchar(11),getdate()),113)
                    And T0.[DiscPrcnt] > 60
               GROUP BY T1.[DocNum], T1.[DocDate], T1.[CardName], T1.[DocTotal]
@attach_query_result_as_file = 1,
@query_attachment_filename ='Results.txt';
--RAISERROR ('This Product''s count is too low to accept purchase orders.', 16, 1);
--ROLLBACK TRANSACTION;
--RETURN
END;
In this code where i am using Mail Id Here keyword use there your required email means which email on which u want to send mail.
Thanks & regard
Khan Imran

Similar Messages

  • When i try to set up my icloud account the system says it is sending me an email to verify.  I never get the email and it is not in my spam filter.  How can i get set up??

    when i try to set up my icloud account the system says it is sending me an email to verify.  I never get the email and it is not in my spam filter.  How can i get set up??

    Make sure that your Apple ID is your email address and you do not have any other or old IDs associated with you. Go to www.appleid.apple.com and confirm this info. Make sure that the email address you are trying to sign up with is your primary one.

  • I;m no longer able to use the Penn State ANGEL system (I teach on line) for my email and intead get messages about "script" problems.

    Question
    I'm no longer able to use the Penn State ANGEL system (I teach on line) for my email and instead get messages about "script" problems

    I have asked a moderator to provide assistance, they will post an invite on this thread.
    They are the only BT employees on this forum, and are a UK based team of people, who take personal ownership of your problem.
    Once you get a reply, make sure that you are logged into the forum, then click on their name, you will see a screen like this. Click on the link as shown below.
    Please do not send them a personal message, as they may not be on duty for a long time, and your message will not be tracked properly.
    For your own security, do not post any personal details, on this forum. That includes any tracking number you are give.
    They will respond either by phone or e-mail within 5-6 working days.
    Please use the tracked e-mail, to reply, not via the forum. Thanks
    This is the form you should see when you click on the link. If you do not see this form, then you have selected the wrong link.
    When you submit the form, you will receive an enquiry number, so please keep a note of it
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • I m trying to send a email and sms alert using php and it works fine on all systems except on Iphone,the problem is swedish charcters doesn't show on iphones used by people in sweden but works absolutely fine on iphones in india. plz help

    I m trying to send a email and sms alert to people and it works fine on all systems expect on Iphone,the problem is swedish charcters doesn't show on iphones used by people in sweden but works absolutely fine on iphones in india.
    the code i m using is right below,plz have a look and not into the problem as problem is a bit strange.
    $headers = "MIME-Version: 1.0\n" ;
                $headers .= "Content-Type: text/plain; charset=\"UTF-8\"\n";
                $headers .= "X-Priority: 1 (Highest)\n";
                $headers .= "X-MSMail-Priority: High\n";
                $headers .= "Importance: High\n";
                // Additional headers
                $headers .= 'From: Rakesh <[email protected]>' . "\r\n";
                foreach($disemail as $email)
                    $to = $email;
                    $subject = $succMessage['email_subject'];
                    $message = $smsText;
                    mail($to,'=?UTF-8?B?'.base64_encode($subject).'?=',$message,$header);
            if (stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) {
            $smsText = utf8_encode($smsText);

    i have tried this new charset combination specifically for iphone and i m waiting for response from sweden alliance.....i hope this works fine as iso works great for 8-bit characters.
    would like to have your thoughts though.
    $headers .= "Content-Type:text/plain; charset=\"iso-8859-1\"\n  format=flowed Content-Transfer-Encoding: quoted-printable";

  • My mobile-me email accout does not receieve any emails and does not show the file system

    hi - my mobile me email account does not recieve any emails - plus, the file structur is not available on my mac. I am using iphone and ipad, there at least the file structure is visible. I received the notification, that my icloud storage is not sufficiant, I extend this to 80 GB, should not be an issue anymore. However, does not work - I can however sent emails...many thanks for any help

    Just to confirm ... by Verizon Web Portal, you mean the Verizon branded Yahoo! web portal page?  Correct?    Just want to be sure you're looking in the right place.
    If you go into your account settings on Verizon, does it say there that you are the "Yahoo!" experience (probably also has an option listed to allow you to change to AOL as well).
    If it says Yahoo! and you are looking on the Yahoo! web portal inbox, then it sounds like your mapping over to the Yahoo! side is not setup properly within the Verizon cloud.   That would take a call to tech support to fix.
    Just for giggles, have you tried changing your mailbox password (and not recofniguring any mail clients, etc.).   Just to make sure something isn't quickly grabbing the mail and downloading it before you can see it via the web portal.   Might want to do that just as an experiment.
    Another think to try is creating a sub-account for email and see if mail gets delivered to the address.

  • Email and BBM Notifications

    I just got a replacement phone and I get sounds notifications for both email and BBM that I want to adjust or turn off.  That said, when I go to the "notifications" area of "System Settings" and scroll down to "Applications" I do not have either "Email" or "BBM" listed in there.  I checked a friends phone and he has them in there, and we have the same phone and software version.  
    Would appreciate any idea of where to go to change these settings (not in HUB management I looked there) as well as why these two would not be listed in that area.
    Thanks 

    If you haven't tried a reboot, or a reset, do it and then check again. Personally, I would reboot first, then try soft reset if reboot doesn't fix it.
    See http://www.blackberry.com/btsc/KB02141
    - Ira

  • I am using the Good for Enterprise app to synch my outlook email and when I try to turn on ICloud to synch my music in ITunes I get a warning that I will not be able to synch my Iphone 4S with my computer.  Does this mean my office PC or home Mac?

    I am using Good For Enterprise on my Iphone 4s to connect with my Office PC Outlook email system.  I am having trouble synching my Itunes music from my Mac at home with my IPhone 4s.  I am considering using ICloud to share the music as I also have an IPad2.  When I go to turn on the ICloud application, I get a message that alerts me to the fact I will no longer be able to synch with my computer.  Does that mean with my Office PC and my Outlook email, or my Mac and my home email and other applications?  I want to use the ICloud but don't want to screw up my Good for Enterprise application and connectivity with my Office PC and Outlook email.  What should I do to be able to update all my tunes and photos on my IPhone 4S and IPad2 from my Mac?

    I seem to never tire of saying this. It was for Apple when they first announced 10.7 to disclose this. Yes, it was widely reported -- or rather, rumored -- but not by Apple. And many people who have gotten caught by this assumed that Apple itself would have told them beforehand about the loss of this very important feature which they had come to rely on. As far as I know, not even in fine print, does this appear anywhere on the Lion announcement or any of its links.
    I am not saying Apple had to continue Rosetta in Lion, or forever, just that if it was going to be dropped, it should have been made known.
    As relative "insiders" we should not forget that many people don't have the time, habit or interest to do this kind of research. I think it is a breach of trust that Apple has never directly made this announcement or given people the opportunity to decide beforehand if giving up their PPC apps for a new OS is a worthwhile tradeoff.

  • HT204053 Apple offered to install iCloud, and I allowed it. Yet when I try to sign in to iCloud using my Apple ID email and pswrd--an ID that I've been using for YEARS--I'm given the message, "This Apple ID is valid but is not an iCloud account." What is

    To repeat my question, Apple offered to install iCloud, and I allowed it. Yet when I try to sign in to iCloud using my Apple ID email and pswrd--an ID that I've been using for YEARS--I'm given the message, "This Apple ID is valid but is not an iCloud account." What is going on?
    Everywhere I search on Apple's Support site says to sign in to iCloud using your "Apple ID," which I did. I've had my iTunes account for years (even migrated from the old AOL account system). It's the standard email+password that everyone is supposed to use.
    My main question is how can I have a valid Apple ID and not an iCloud account--if the two are supposed to be linked?
    Thank you for any help you can give me!
    tlj

    I've tried both. First, I tried on my pc, where iTunes had installed iCloud when it last updated. I have iTunes installed on this computer (and on my iPad and iPhone), but that wasn't the issue.
    So I went online, thinking I needed a separate iCloud Apple ID, but it prompted me for my current Apple ID and gave me the message about my ID being "valid" but not an iCloud account," which, lol, was what it had asked me to do in order to create one. I checked, and at least one other user is having the same issue. I'll attempt to copy/paste the Support request url: https://discussions.apple.com/thread/4430653?tstart=0
    Thank you for any help you can give.
    Trish

  • PLEASE help!! I use Outlook for my email and the Mail App Icon in my dock was also storing all my emails. So, I tried to delete ONLY the emails in the Mail App but somehow (under Preferences maybe?) I also deleted all my emails in my Outlook inbox.

    PLEASE help!! I use Outlook for my email and the Mail App Icon that is in my dock, that I know nothing about, was also storing all my emails. So, I tried to delete ONLY the emails in the Mail App but somehow (under Preferences maybe?) I also deleted ALL my OUTLOOK emails in my inbox.  Can someone please please tell me if there is a way to get my Outlook inbox emails back OR EVEN the emails that were in my Mail app - because even tho I never use the Mail app, at least the emails would be there.
    When I was trying to delete the emails in my inbox for the Mail app - I followed THESE directions.  It did in fact clear my inbox for the Mail app.  But then I went to log on to my Outlook account and EVERY SINGLE EMAIL was gone.  And not in the Deleted box.  Just gone.  Here are the directions I followed that screwed everything up.  Please help.
    Top menu bar, Mail > Preferences > Accounts > Mailbox Behaviors.
    Uncheck "Store deleted messages on the server".
    At the drop list for "Permanently erase deleted messages when", choose "Quitting Mail".
    Next...
    Top menu bar, Mail > Preferences > General.
    At "When searching all mailboxes, include results from", uncheck "Trash".
    Select All = command A

    i found out my prob!
    here is what you do.
    go to the "system preferences" on your dock.
    click "software updates".
    click "installed software"
    if it shows something about a recent update about "EFI UPDATE, FIRMWARE, THUNDERBOLT" or anything like that, exit out of it.
    go to mail.
    click "mail" at the top.
    click "preferences...".
    find the account you are having trouble with, once you do, make sure its highlighted, then click the "-" at the bottom of the window (this will only effect that mail account, it will not effect your ical weather or not its synced thought that email account)
    hit the "+" (right next to the "-") and add your accout back!
    its something with that update that effected mail, i hope this works out for you, if not reply back

  • Email and SMS Alerts - Solution Manager - PI and EP

    Hi All,
    I am trying to do the below scenario.....But somehow i am lost in the process.
    I have a three system PI landscape and a Solution Manager. I have included the DEV PI in solution manager for CCMS,the CCMS agents are online and it also reflects in RZ20.
    Now the requirement is SOLMAN should send email and sms alerts in below situations which occur in PI system.
    1.The ABAP or JAVA engine goes down.
    2.One of the filesystem crosses certain predefined limit.
    3.Any of the java server node stops working
    4.If any critical job gets cancelled in sm37
    I am looking at steps on how to define the alert categories, auto reaction methods, also the nodes where i have to assign these auto reaction methods.
    I have gone through CCMS documentations, played all sim files and gone through most of the pdf files but i am not able to establish proper steps to do it.
    I am Redhat Linux,Oracle 10g, SOLMAN 7 with PI7
    Can i extend the same for the EP systems also which are pure Java Stack Systems ?
    Also i would like to know if i can send customized alert messages.
    Best Regards
    Raghu

    Hi Juan,
    Thanks for your response.
    I am looking at the MTE classes i.e for the above situations which MTE classes are required.
    Also i have read in some document that we can send the alerts directly to the email IDs and cell numbers without having to mention them in user masters in SU01. Where to mention these ?
    I have my SCOT settings done for email servers.
    The process which i had built up in my mind is all mixed up and i am lost where to do which configuration
    Best Regards
    Raghu

  • Email and Browser

    It have noticed by watching some of the competitors software that the email and browser currently written by RIM is getting very antiquated.
    There are other browsers out for competitors products that have greatly surpassed the capabilities of the Blackberry Internet browser. 
    Also I have noticed a bunch of truncated messages in email that the competitors are able to download complete.
    This is not to flame Blackberry, but more to find out what blackberry is planning to continue to be a leader in this industry and in what time frame we can expect this.
    Apple is now pursuing the enterprise level security that has held them back from being a business class device. If this happens then RIM will have some major competition on their hands. That combined with their web browser will make them a leading device and open up avenues for them to take over in the business arena.
    I personally will never move to an Apple product just because I've been there done that and wasn't very pleased. That was years ago with Apple computers. Also, as long as Apple uses a built in battery I will consider then an inferior product. But with the other innovations in their operating system, web browser and other abilities they are quickly becoming a major threat that has put RIM in the position of catch up.
    This is a much talked about issue in other enthusiast's forum's and something that RIM needs to address, so I would like to find out what RIM has in mind as I consider my next device which is due for replacement now.

    Was reading this article before. I think RIM is aware of other competing browser's features, so they're taking steps to get the BlackBerry Browser up to date
    http://www.internetnews.com/mobility/article.php/3836386/BlackBerry+May+Have+New+Mobile+Browser+by+2...
    If someone has been helpful please consider giving them kudos by clicking the star to the left of their post.
    Remember to resolve your thread by clicking Accepted Solution.

  • Email and Chat STOP working

    Email and Chat STOP working. NOKIA - try OVI services.
    Nokia with Microsoft and Windows Mobile 7 - so; forget and don't hope about quality of our Symbian system and Ovi service
    http://www.nokia.com/press/press-releases/showpressrelease?newsid=1488004
    http://www.microsoft.com/presspass/press/2011/feb11/02-11partnership.mspx

    Hi Abdelhediamir,
    Is the mobile data connection (with your provider) up and running? Are you able to browse the web using the phone's browser? If no, this is most likely the reason why the issue is happening. Kindly coordinate with your Network Provider to get the correct Internet/APN settings via SMS. Save it on the phone so it will be configured.

  • How can I change my apple ID from the APP store so I can update my  app? my computer is stuck with an old email and won't let me change it..

            Hello, Im trying to upgrade Imovie and whatever app are about to update in the future, the problem is the my Imac is stuck with an old email on the APP store. I try to change it and nothing happen, when I put my apple ID it send me to change the password and what Im trying to do is to put my new email in the system so would be able to update my computer. You know when you press the update button a little box drop with your email and all you have to put is your password thats where my old email is stuck pls someone help me with that little problem i'll appreciate it... thanks

    An Apple ID isn't necessarily "linked" with your email other than for recovery reasons. So, as long as you know the Apple ID password, an old email isn't catastrophic. Apple ID != e-mail.
    Now, if it's really bugging you and you really want to change it, if you log in to http://appleid.apple.com and change your primary email address, this should update your Apple ID. There will be a couple hoops involved with this (i.e. verification of email change by sending email to rescue/alternate email. Alternate email can't be the same as the new primary. The new primary can't have ever been used as/with an Apple ID. etc...).

  • TS4002 iCloud for email is not on my Mac. How can I get email and iCal to sync with iphone and ipad.

    iCloud for email is not on my Mac. It should be under Internet and wireless in System Preferences but it is not. Basically I am trying to get iCloud running successfully on my Mac for email and Calendar so that it will sync with my iPad and iPhone. I was an MobilMe customer and I've been having trouble with this conversion to iCloud. Thanks.

    I too was a mobileme user and have just migrated to iCloud on mackbook pro w/OS 10.7.4. Transition caused my sent mailboxes to rearrange themselves so that I have no comprehensive 'sent' mailbox as I did previously and the view on both incoming and outgoing mailboxes keeps rearranging itself no matter how many times I set preferences. One result is that search function no longer works.  Is anyone else having problems like this?  All was fine for a week after transition but after having an evening when my password was repeatedly rejected I had to log in and out of iCloud (as directed by tech support) and w/in an hour or so the mailbox problem began.

  • How can i reply to an email and attach a file to it?

    How can i reply to an email and attach a file to it?

    http://www.apple.com/feedback/
    Tell Apple. We're just fellow users here and can't control a thing. The sandboxed nature of the iPad, which also means a lack of an overall file manager is what keeps viruses from spreading and improves the stability of the system as a whole. And it's that lack of a file manager system that means you can't just attach something to an e-mail.
    What I'd do, reply to the person, i'm sending the attachment next, do that and you're done. 2 e-mails sure but you've accomplished what you need to do.

Maybe you are looking for

  • Report  on purchase order

    report to list the purchase order quantity for statistical delivery date which gives the cumulative totals for the plants, material group, factory which were entered in the selection criteria.

  • How to export a large, high-rez Keynote'08 file as a QT movie?

    I have used Keynote '08 to create a 1.6GB presentation, 1024 x 768 resolution, 940 slides of stills and animation clips, navigatable hyperlinks on every slide. It plays and navigates perfectly well in Play mode. The presentation would of course be mo

  • Replacing the primary site server, SCCM 2012 R2

    Hi, Setup is currently SCCM 2012 R2 with the primary site server on Windows 2008 R2 on a Hyper-V VM with a separate physical SQL server on 2008 R2 (Windows and SQL). I'm not making any changes to the SQL server at this stage. I want to completely rep

  • Question About Photoshop CC

    Does Photoshop CC support the Retina Macbook Pro's retina display? Also, does Photoshop CC accept the JPEG image format or is it RAW only?

  • Can't open any apps downloaded from the internet after installing application loader update and messages beta

    I've run into an unusual problem recently. I think it it related to two recent software installs.The problem only started after i installed the new application loader. My issue : I'm unable to open application I downloaded from the web. I get the fol