Email sending after validation

Hi ,
   I am working on a user exit.It is a BAdI.I have to validate the name of the person who signed the PO invoice.Once approved the person has to receive an email with a standard subject text and email text.I dont know how I should proceed for email sending.Can you please help me out on this.
  Points will be rewarded .Thanks in advance.
Thanks,
Reni

hi,
<b><i>how to send email.</i></b>
chk this sample code.
Try this sample code :-
REPORT ZREPORT_TO_EMAIL NO STANDARD PAGE HEADING LINE-SIZE 200.
DATA : BEGIN OF ITAB OCCURS 0,
PERNR LIKE PA0001-PERNR,
ENAME LIKE PA0001-ENAME,
END OF ITAB.
DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
listobject LIKE abaplist OCCURS 10,
compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
w_object_hd_change LIKE sood1,
compressed_size LIKE sy-index.
START-OF-SELECTION.
SELECT PERNR ENAME
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM PA0001
WHERE PERNR < 50.
LOOP AT ITAB.
WRITE :/02 SY-VLINE , ITAB-PERNR, 15 SY-VLINE , ITAB-ENAME, 50
SY-VLINE.
ENDLOOP.
* Receivers
receiver_list-recextnam = '[email protected]'. "-->
* EMAIL ADDRESS
RECEIVER_list-RECESC = 'E'. "<-
RECEIVER_list-SNDART = 'INT'."<-
RECEIVER_list-SNDPRI = '1'."<-
APPEND receiver_list.
* General data
w_object_hd_change-objla = sy-langu.
w_object_hd_change-objnam = 'Object name'.
w_object_hd_change-objsns = 'P'.
* Mail subject
w_object_hd_change-objdes = 'Message subject'.
* Mail body
APPEND 'Message content' TO message_content.
* Attachment
CALL FUNCTION 'SAVE_LIST'
EXPORTING
list_index = '0'
TABLES
listobject = listobject.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
compressed_size = compressed_size
TABLES
in = listobject
out = compressed_attachment.
DESCRIBE TABLE compressed_attachment.
CLEAR packing_list.
packing_list-transf_bin = 'X'.
packing_list-head_start = 0.
packing_list-head_num = 0.
packing_list-body_start = 1.
packing_list-body_num = sy-tfill.
packing_list-objtp = 'ALI'.
packing_list-objnam = 'Object name'.
packing_list-objdes = 'Attachment description'.
packing_list-objlen = compressed_size.
APPEND packing_list.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = w_object_hd_change
object_type = 'RAW'
owner = sy-uname
TABLES
objcont = message_content
receivers = receiver_list
packing_list = packing_list
att_cont = compressed_attachment.
rgds
anver

Similar Messages

  • I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great

    I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great!

    The fact that you can receive means you have a valid e mail address, and have established the connection to the incoming server, so all of that works.  Since the send does not work, that means your outgoing server is rejecting whatever settings you used formthe outgoing set up.  Try them again. 
    Google your particular isp, and ipad and many times you will find the exact settings needed for your isp.  Or tell us here, and soneone else may be on the same isp.  Some mail services need you to change a port, or have a unique name for the outgoing server.  
    Kep trying.

  • Email send/receive suddenly doesn't work ; can't change email settings as BB phone won't accept valid username and password -- what to do?

    email send/receive suddenly doesn't work (as of September 24th); I can't change email settings (one suggestion from tech) as BB phone won't accept *valid* username and password -- what to do?
    I understand from a support note that if I keep trying my password/username combination, my BB will eventually delete all data!
    I can't understand this. I'm completely lost now. I can't remember what I've done or tried to do. A plethora of usernames and passwords is swimming in my head.
    Thanks for any hints. I have always loved this BB Bold and have never had any trouble with it.

    But the real question is why for the past year did the passwords work and then all of the sudden after this anomaly the disk password doesn't work?  I'm not 100% sure of what my configuration was, but I know that most of the time it required one password -- supervisor, and occasionally it asked for 2 -- disk password as well I believe.  This may have been related to the Password on Restart setting I think -- asking for the disk password on cold vs. warm boot.  But I know both were exactly the same.  But after this incident only the Supervisor password worked.

  • TS3899 After updating to ISO6, my email sending get extremely slow or dispeard. on the botton line of mail page always indicate "sending # of 9", however I do not know where to check or delete these unsent items. Please help! It has consumed lots of data.

    After updating to ISO6, my email sending get extremely slow or dispeard. on the botton line of mail page always indicate "sending # of 9", however I do not know where to check or delete these unsent items. Please help! It has consumed lots of data.
    I use @me.com and @hotmail.com

    Hi,
    >>A CHAR datatype and VARCHAR2 datatype are stored identically (eg: the word 'WORD' stored in a CHAR(4) and a varchar2(4) consume exactly the same amount of space on disk, both have leading byte counts).
    Ok, but on the other hands:
    SGMS@ORACLE10> create table x (name char(10), name2 varchar2(10));
    Table created.
    SGMS@ORACLE10> insert into  x values ('hello','hello');
    1 row created.
    SGMS@ORACLE10> commit;
    Commit complete.
    SGMS@ORACLE10> select vsize(name),vsize(name2) from x;
    VSIZE(NAME) VSIZE(NAME2)
             10            5
    SGMS@ORACLE10> select dump(name),dump(name2) from x;
    DUMP(NAME)                                         DUMP(NAME2)
    Typ=96 Len=10: 104,101,108,108,111,32,32,32,32,32  Typ=1 Len=5: 104,101,108,108,111Cheers

  • Send email notification after unlock account in OIM 11gr2

    Hi,
    there is OOTB email notification is availabe for sending email notification after unlock aacount.
    could anyone please provide a way to do that...

    any suggestion...

  • Please send email to Yvonne.  I have a password only Ohrid email only after the update

    Please send email to Yvonne.  I have a password only Ohrid email only after the update
    <Personal Information Edited by Host>

    I am putting in my correct birthday and the password that I am sure is right and it is telling me to check my network connection even though my connection is working fine. I don't know what else to do!

  • My iMac drops settings information.  Sounds associated with receiving and sending an email disappear after about a week and return following a restart after a shutdown.  Also my picture taken, which was taken about a year ago, recently disappeared.

    My iMac drops settings information.  Sounds associated with receiving and sending an email disppear after about a week and return following a shutdown and a restart.  The cycle contunes.  Also, the picture of me that was taken when I bought the iMac more than a year ago and appeared at logon recently disappeared and was replaced by a soccer ball.  I took a new picture, which appeared for about a week at logon, and it has now been replace by a blank picture.

    The standard procedure with these types of isues is a PRAM reset.
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.
    Excerpt from http://support.apple.com/kb/ht1379

  • I'm trying to reset my Apple ID password. They said they will send me an email but after months I still did not receive it.

    I'm trying to reset my Apple ID password. They said they will send me an email but after months I still did not receive it.

    Your password was sent to your emergency email address.  Perhaps you have an email you never use?   I use the free email from my cable TV account as my emergency email.
    Your Apple account and cloud account are separate.   You could even have completely different user and password.   Most of us use the same user ID and password, but they are not the same thing, don't mix them up.
    If you can't retrieve emergency email, you will have to call apple support.
    http://support.apple.com/kb/HE57

  • TS3899 Why can't I send email messages after 7.1?

    Why can't I send email messages after 7.1?

    Hi Honeylev,
    Welcome to the Support Communities!
    The article below will walk you through the troubleshooting steps for email on your iPhone:
    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    I hope this information helps ....
    Have a great day!
    - Judy

  • My phone will not send emails even after the IOS 8 update. I continue to get the message of user name or password for my email are incorrect.

    My phone will not send emails even after the IOS 8 update. I continue to get the message of user name or password for my email are incorrect.

    Did you try to delete the mail account, restart the phone and add the mail account again?
    iOS: Setting up an email account
    This article provides morse tips, if you can't connect or you receive an error in Mail.

  • When I try to fill out forms on line my I cannot send as it says my email isn't valid. I ve tried with my gmail and my work email and no luck. It will recognise my partners email with no problem. Please advise

    When I try to fill out forms on line my I cannot send as it says my email isn't valid. I ve tried with my gmail and my work email and no luck. It will recognise my partners email with no problem. Please advise

    Assuming that you can send email on the iPad, Maybe something is corrupt in Safari that is causing this. Try clearing Safari and see if the sites will accept your email address.
    Go to Settings>Safari>Clear History, Cookies and Data. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • Email will receive but not send after installing os7 on iPhone 4S

    Email will receive but not send after installing os7 on iPhone 4S.   Checked all settings against iPad and second 4s phone and they appear identical.  Other devices work fine.

    Thanks Spaidr,
    That was part of it.  I did an end-around by setting up an alternate outgoing (send) server which was the same as the primary, identical settings, name, password.  I deselected the primary and used only the secondary.  Reboot as you suggested and Voila!  Something must have been corrupted in the primary.
    Thanks and hope this helps others.  

  • I run DeviceDemo sample to send email, when click send email button after f

    I run DeviceDemo sample to send email, when click send email button after filling all fields, it took me to EverNote application, can not send email. does anyone has this kind experience? how to fix it?

    Hi,
    ADF Mobile cannot directly send emails as this is a security precaution of your mobile phone (imagine all applications could send mails without you confirming). Instead the send mail functionality launches the mail client you have configured and fill in the information you provided in the application. The mail function by the way is implemented through Cordova.
    Frank

  • Can I keep my AT&T & Yahoo email addresses after we go back to Time Warner?

    When we found that we could be paying $76.95 LESS per month for MORE, better service with TWC, we decided to swtich back to TWC. (This would never have happened if AT&T wouldn't have sent us a bill asking for $54 more starting this month without even warning us! But that's what they did and it prompted me to call TWC to find out what they could offer. And their best bundle is $76.95 cheaper than AT&T's best bundle, so we switched. It wasn't an easy decision to make because we've had AT&T phone service for 45 years and AT&T Internet for 17 years! We've only had uVerse for 2 years, but even though it's not as good as cable, not as convenient and doesn't have all the cool perks that TWC has, we were going to sign up for another 2 years. Until, like I said, we got the last bill. We don't appreciate being treated this way after paying for the service all this time, never being late, not once, in fact they just take the money out of our checking account each month so it's never late! But, after having all my email addresses with worldnet.att.net, att.net, sbcglobal.net and yahoo, for 17 years, I hate the idea of giving up my email addresses! EVERYONE I know, family & friends, and all the companies and websites I've signed up with know me as my name @ att.net.So, I wonder if I'll be able to access my email accounts after the switch? Or will AT&T just close those accounts? I sure hope there's someone out there that knows the answer to this question will see this and send an answer very soon because I've been fretting about this ever since we made the call to TWC. In fact this is the only reason why we didn't call to switch as soon as our contract was up. (BTW - all the better services we'll have with TWC will be a nice change especially since we don't have to sign a contract! We can drop any service or add any service at any time without paying a penalty!) 

    Tigereyze209 wrote:
    The short answer is, yes, you can keep your AT&T associated e-mail addresses. They have to be modified in some way, but how to do that is pretty easy to find on their support web page.
    Comcast it trying to  buy out Time Warner?   Oh   Myyyyyyyyyyy  (said in George Takai voice)
    The company with the defacto worst customer service in any industry, hooking up with a company that has so many unsuspecting inocent customers.     I really feel for them.
    Email addresses don't have to be modified after cancelling service, nothing on email support page about that topic.
    Chris
    Please NO SD stretch-o-vision or 480 SD HD Channels
    Need Help? PM ATT Uverse Care (all service problems)
    ATT Customer Care(all other problems)
    Your Results May Vary, In My Humble Opinion
    I Call It Like I See It, Simply a U-verse user, nothing more

  • PSE9 - having trouble with "html email sender verification" page

    We have just purchased the PSE9. This is our first venture into a photoshop program. We are wanting to send some of our pictures to friends via email. Just after we push the "share" button, to create an attachment for the email, we get this page "html email sender verification." It contains in the first blank, our email address (given), a button "resend email", and a blank entitled " Sender verification."  Below this box are the words:
    "If this email address is not correct, or you would like to use a different e mail client, you can change your email settings by clicking Cancel and then choosing
    Edit ->Preferences->sharing."
    At the bottom right are two buttons, "OK" and "Cancel"
    When we put in our email address into the "Sender verification" box,  and press "OK" the next window is entitled "HTML Email Sender Verification" .  The only words on the page for us are  in red and they say:
    "Your email could not be sent because an unkown error has occurred. Please try again."
    Then we have the option of pushing the "OK" or "Cancel" button.
    Can anyone help us get beyond this obstacle?
    THANKS!!

    You need to enter the email id in preferences. Once you put it, you will receive a verification code. You need to put this verificaiton code in the sender verification window. This is required if you are using Adobe email service. You can change the email provider from sharing preferences.

Maybe you are looking for