How to send error message via a mail to the customers email id

HI experts ,
i have a requirement,In idoc where i have to send the error message via email to a perticular emailid?
please help me n tell also which fm is used for that?
Thanks
RAhul Sisodia

Hi ,
Check this Link..
[sending an email with multiple attachments;
Regards,
Sachin M M

Similar Messages

  • How to send purchase order via e-mail.

    Please could someone let me know how to send purchase order via e-mail.
    I am an BC.
    e-mailing is functionning however I am not very familiar in settings for MM

    No, you do not need to touch ME_PRINT_PO. You need to put code before and after ME_PRINT_PO in the print program.
    Step 1 - Copy the standard print program SAPFM06P to make a Z version, lets call it ZSAPFM06P
    Step 2 - Copy include FM06PE02 to make a Z version, lets call that ZFM06PE02.
    Step 3 - ZSAPFM06P change the statement "Include FM06PE02" to read "Include ZFM06PE02".
    Step 4 - In include ZFM06PE02 you will find a subroutine called "ENTRY_NEU". In this subroutine you will see it first calls ME_READ_PO_FOR_PRINTING then calls ME_PRINT_PO. Before it calls ME_PRINT_PO just put:
    l_nast-nacha = 1.
    CLEAR l_nast-dimme.
    This means that ME_PRINT_PO will not e-mail, it will create a spool request.
    Step 5 - Still in ZFM06PE02, after ME_PRINT_PO has been called, add new code. First check that ent_retco EQ 0. If it does not then exit.
    Step 6 - Get the spool ID created by ME_PRINT_PO by either moving sy-msgv1 to a variable or select from NAST.
    Step 7 - Call function CONVERT_OTFSPOOLJOB_2_PDF using the spool ID from step 6, and put the result from table PDF into an internal table you can use later. ALso store the export variable pdf_bytecount, you will need it later.
    Step 8 - Call function SX_TABLE_LINE_WIDTH_CHANGE using the table from step 7 as content_in and put the results from content_out into a new internal table.
    Step 9 - Add some text into a internal table of type solisti1, this will be the body text of the e-mail.
    Step 10 - Add whatever receivers you want into an internal table of type somlreci1. If you just want it to go to the address that the PO would have gone to anyway, select the e-mail address from ADR6 where the address number = l_doc-xekko-adrnr, that is the data from the PO.
    Step 11 - Populate an internal table of type sopcklsti1 with data relevant to your PDF table from step 8 and the text table from step 9. You will have to put the size of the PDF from step 7 (pdf_bytecount) on the PDF line and the size of the text will be the number of lines of text * 255.
    Step 12 - Add info to a structure of type sodocchgi1. You can add the e-mail title in here, field obj_descr. Also add the size of the PDF and the size of the text from step 12 into doc_size, and give the doc a name in field obj_name. This can be anything, ZPDFPO for example.
    Step 13 - Call SO_DOCUMENT_SEND_API1 using the tables from steps 8, 9, 10 and 11 and the structure from step 12. You can amend the sending e-mail also. Set commit_work to space.
    Step 14 - That is all you need, but I actually call function RSPO_R_RDELETE_SPOOLREQ to delete the spool request created in step 4, then call NAST_PROTOCOL_UPDATE to add some more messages to the processing log of the PO.
    That is all.

  • Best Practices Question: How to send error message to SSHR web page.

    Best Practices Question: How to send error message to SSHR web page from custom PL\SQL procedure called by SSHR workflow.
    For the Manager Self-Service application we’ve copied various workflows which were modified to meet business needs. Part of this exercise was creating custom PL\SQL Package Procedures that would gather details on the WF using them on custom notification sent by the WF.
    What I’m looking for is if/when the PL\SQL procedure errors, how does one send an failure message back and display it on the SS Page?
    Writing information into a log or table at the database level works for trouble-shooting, but we’re looking for something that will provide the end-user with an intelligent message that the workflow has failed.
    Thanks ahead of time for your responses.
    Rich

    We have implemented the same kind of requirement long back.
    We have defined our PL/SQL procedures with two OUT parameters
    1) Result Type (S:Success, E:Error)
    2) Result Message
    In the PL/SQL procedure we always use below construct when we want to raise any message
    hr_utility.set_message(APPL_NO, 'FND_MESSAGE_NAME');
    hr_utility.raise_error;
    In Exception block we write below( in successful case we just set the p_result_flag := 'S';)
    EXCEPTION
    WHEN APP_EXCEPTION.APPLICATION_EXCEPTION THEN
    p_result_flag := 'E';
    p_result_message := hr_utility.get_message;
    WHEN OTHERS THEN
    p_result_flag := 'E';
    p_result_message := hr_utility.get_message;
    fnd_message.set_name('PER','FFU10_GENERAL_ORACLE_ERROR');
    fnd_message.set_token('2',substr(sqlerrm,1,200));
    fnd_msg_pub.add;
    p_result_message := fnd_msg_pub.get_detail;
    After executing the PL/SQL in java
    We have written some thing similar to
    orclStmt.execute();
    OAExceptionUtils.checkErrors (txn);
    String resultFlag = orclStmt.getString(provide the resultflag bind no);
    if ("E".equalsIgnoreCase(resultFlag)){
    String resultMessage = orclStmt.getString(provide the resultMessage bind no);
    orclStmt.close();
    throw new OAException(resultMessage, OAException.ERROR);
    It safely shows the message to the user with all the data in the page.
    We have been using this construct for a long time for all our projects. They are all working as expected.
    Regards,
    Peddi.

  • How to send error message to forms from Database Trigger

    Hi, Please help me to send error message to forms from Database Trigger?
    RgDs,
    Madesh.R.M

    You are correct, the On-Error trigger is a Forms trigger. However, if your Form is going to display the error generated by the database stored procedure or trigger - you might not see the database error in your Form unless you check the DBMS_ERROR_CODE in the On-Error trigger and manually display the Error Code and associated Text. I've see this happen with a co-worker. The Form she was working on was based on a table with an Before-Insert trigger. Because she was not explicitely handling the error from the Before-Insert trigger in the Forms On-Error trigger, her Form appeared to halt for no reason at all. Once she added code to the On-Error trigger in the Form to handle the DBMS_ERROR_CODE, she discovered the trigger was producing an error and was able to show the error to the user in the On-Error trigger.
    I understand the desire to keep as much as possbile in the database, but with that comes some extra coding in your Forms to handle this. This extra coding could easily be placed in a Forms Library, attached to a Form and called in the On-Error trigger. Your code could look like this:
    DECLARE
       /*This example assumes you have an Alert defined
          in your Form called: 'ERROR' */  
       al_id    ALERT;
       al_text  VARCHAR2(200);  /* Max text of a Forms Alert message*/
       al_btn   NUMBER;
    BEGIN
    IF DBMS_ERROR_CODE != 0 THEN
       /* Error code is ORA-00000 Normal Successful completion
           So only handle non-zero errors  */
       al_text := DBMS_ERROR_CODE||':'||DBMS_ERROR_TEXT;
       al_id := Find_Alert('ERROR');
       set_alert_property(al_id, alert_message_text, al_text);
       al_btn := show_alert(al_id);
    END IF;
    END;Your original question was "How to send error message to forms from Database Trigger?" The answer is you don't because Forms already gets the database error code and database message through the Forms DBMS_ERROR_CODE and DBMS_ERROR_TEXT functions. Look these up in the Forms help and it should clear things up for you.
    Craig...
    Edited by: CraigB on Jun 14, 2010 4:49 PM
    Edited by: CraigB on Jun 14, 2010 4:49 PM
    Edited by: CraigB on Jun 14, 2010 4:50 PM
    Edited by: CraigB on Jun 14, 2010 4:51 PM
    Edited by: CraigB on Jun 14, 2010 4:51 PM

  • How ro send error message from BADI to BAPI

    i have a BADI which is triggered from a BAPI.This BADI has only importing and changing parameters.How can i send error message to BAPI.Please reply at the earliest.
    High points can be expected.

    Hi Arshi,
         Please check whether the following link is of any use to you,
    how to capture the error message from bapi
    Best Regards.
    Reward points if it is helpful.

  • How to send a file via e-mail with director

    Is it even possible to have a button in a free-standing
    projector that would send a file via e-mail, or open up an e-mail
    program and have the file attached and addressed? Or is it possible
    to put a file on a server? Of course, both of these methods would
    alert the user and ask for their permission.

    To just open the user's email program, you can use the
    standard lingo:
    goToNetPage(mailto:[email protected])
    That approach is kind of annoying because it actually opens
    an empty
    browser window then the user's email program. I don't think
    you can use
    that approach to send attachments though.
    A much better way is the fabulous DirectEmail xtra from
    DirectXtras.
    Check out their site:
    http://www.directxtras.com/demail_home.asp?UUID=1217348
    DirectEmail can do everything you are asking for (and more).
    It is
    cross-platform, shockwave safe, can handle text or HTML
    email, can do
    attachments, can use a mail server or not, and is really easy
    to use.
    The same company makes DirectFTP which you can get from:
    http://www.directxtras.com/DFTP_home.asp?UUID=1217348
    DirectFTP can put files onto an FTP site with a minimum of
    fuss. I have
    used both on quite a few occasions and they rock. You can
    actually
    write a full-fledged email or ftp program with those xtras
    and Director.

  • How to send a report via e-mail

    Hello All,
               I want to send a report via e-mail.
               What should I do for that?
                Please help me out...
    Regards,
    Ravi Khattar.

    Hi,
      Please check the below code....
    data: t_objpack    like sopcklsti1 occurs 1 with header line,
            t_objhead    like solisti1   occurs 1 with header line,
            t_objtxt     like solisti1   occurs 0 with header line,
            t_objbin     like solisti1   occurs 1 with header line,
            t_reclist    like somlreci1  occurs 1 with header line,
            t_lobj       like abaplist   occurs 0 with header line,
            t_listobj    like abaplist   occurs 1 with header line.
      data: v_tab_line1  type i,
            v_tab_line2  type i,
            v_docsize    type i,
            v_len        type i,
            v_line(1250) type c,
            v_subj(132)  type c,
            v_cr(1)      type x value '0D',
            v_linefd(2)  type x value '0D0A',
            v_docdata    like sodocchgi1.
      clear: t_objpack[], t_objhead[], t_objtxt[], t_reclist[], t_listobj[].
      concatenate 'This email is generated from a SAP' sy-sysid '-'
         sy-mandt '- batch environment.' into t_objtxt separated by ' '.
      append t_objtxt.
      t_objtxt = 'Please do not respond to this email.'. append t_objtxt.
      v_docdata-obj_name = 'SAMPLE_TEST'.
      concatenate 'Sales Order Status Attachment -' sy-datum '-' sy-uzeit
             into v_subj separated by ' '.
      v_docdata-obj_descr = v_subj.
      describe table t_objtxt lines v_tab_line1.
      read table t_objtxt index v_tab_line1.
      v_docdata-doc_size   = ( v_tab_line1 - 1 ) * 255 + strlen( t_objtxt ).
      t_objpack-head_start = 1.
      t_objpack-head_num   = 1.
      t_objpack-body_start = 1.
      t_objpack-body_num   = v_tab_line1.
      t_objpack-doc_type   = 'RAW'.
      append t_objpack.
      clear v_line.
      if p_type = '1'.
        loop at t_list.
          concatenate v_line t_list v_linefd into v_line.
          v_len = strlen( v_line ).
          do 4 times.
            if v_len ge 255.
              if v_line+254(1) = v_cr.
                v_line255     = v_line254.
                v_line+254(1)  = ' '.
              endif.
              t_objtxt = v_line(255).
              v_line   = v_line+255.
              v_len    = v_len - 255.
              append t_objtxt.
            else.
              exit.
            endif.
          enddo.
        endloop.
        if v_line ne ' '.
          t_objtxt = v_line(255).
          append t_objtxt.
        endif.
        describe table t_objtxt lines v_tab_line2.
        t_objpack-doc_size   = ( v_tab_line2 - v_tab_line1 ) * 255.
        t_objpack-body_start = v_tab_line1 + 1.
        t_objpack-transf_bin = ' '.
        t_objpack-doc_type   = 'TXT'.
      else.
        t_objbin[] = html[].
        describe table t_objbin lines v_tab_line2.
        t_objpack-doc_size   = v_tab_line2 * 255.
        t_objpack-body_start = 1.
        t_objpack-transf_bin = 'X'.
        t_objpack-doc_type   = 'HTM'.
      endif.
      t_objpack-head_start = 1.
      t_objpack-head_num   = 1.
      t_objpack-body_num   = v_tab_line2.
      t_objpack-obj_name   = 'SAMPLE_TEST'.
      t_objpack-obj_descr  = 'Test'.
      append t_objpack.
      loop at s_email.
        t_reclist-receiver = s_email-low.
        t_reclist-rec_type = 'U'.
        append t_reclist.
      endloop.
      t_reclist-receiver   = sy-uname.
      t_reclist-rec_type   = 'B'.
      append t_reclist.
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                document_data = v_docdata
                put_in_outbox = ' '
           TABLES
                packing_list  = t_objpack
                object_header = t_objhead
                contents_bin  = t_objbin
                contents_txt  = t_objtxt
                receivers     = t_reclist.
      if sy-subrc = 0.
       endif.
    Cheers,
    Bujji

  • Receiving error message:  Cannot get mail. The connection to the server failed. Happening every time I use my iPad.

    Receive this error message every time I try to open up email on iPad.

    What does the error message say?
    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom

  • How to send html messages using unix mail ?

    Hi,
    I'm wondering if it's possible to send html formated mail using Unix mail command ?
    Regards,
    Didier.

    It works fine for me right out of the box; I've done zero to configure anything. In my case, I presume the HTML is encoded in a file. Then I invoke a script which adds the following mail headers before the HTML, then calls sendmail:
    <pre class=command>MIME-Version: 1.0
    Content-type: text/html; charset=ISO-8859-1
    To: $address
    From: $MY_EMAIL
    Subject: File: $subject
    </pre>
    In the header, variables $address, $MY_EMAIL, and $subject are filled in by the shell script.
    HTH

  • How to send BIP report link by mail not the attachment.

    Hi,
    I have a requiment to send the BI Publisher report link by mail.But not to send the report as an attachment.
    can any one have solution for this requirement.

    hi,
    Alternatively, u can do this Send a report with all the report names on one side and another side link to that particular report.If any one click on that link means it will open the report(pdf/html/excel) format by referring to the url.we will get this by using RTF Template.
    Thanks,
    Saichand

  • How do I get messages list to appear above the selected email, like in Snow leopard.

    When I opened the mail in Lion after upgrading the messages all appear on the left instead of above whewre I want them. How do I have them above ??
    Thanks for any help

    You will want to go into Mail preferences and click on viewing. In there you check the box that says "Use classic layout".

  • Why am I getting this message: Yahoo! Mail found the original email, but encountered problems displaying it. Please try again later?

    I do not have ghostery but I'm still getting this message. It's been happening for the last few days.
    I cannot reply to or compose yahoo email with the firefox browser.
    I can receive yahoo email in firefox, just can't reply to them.
    What needs to happen to be able to use my yahoo email in firefox like I used to?

    Hi funkiernyou,
    What extension or addon was causing the problem? This is an issue I am investigating right now and any insights would help. Ghostery was only lead we had originally. If you know of something else, please let us know.
    Matt

  • How to print error messages in browser?

    When I visit a jsp file in browser, there's some errors in the jsp file, so the browser returns
    The page cannot be displayed
    There is a problem with the page you are trying to reach and it cannot be displayed.
    I want the detail error messages, so I can debug my problem. How to print error message in browser or find the message in some log file?

    Hi Kanaraja,
    Thanks for your answer. I need to get certain information from the list. So, I use LIST_To_ASCII FM. However, may I know the ascii_tab should be type to what? And after this FM, do I have to use another FM to display the ascii list?
    data ABAPLIST type ABAPLIST OCCURS 0.
    SUBMIT  RPCALCU0 VIA SELECTION-SCREEN
    with PNPXABKR = 'US'
    with PNPTIMRA = 'X'
    with PNPPABRP = '10'
    with PNPPABRJ = '2003'
    with PNPPERNR-LOW = '100750'
    with PNPPERNR-LOW = '109202'
    with PNPPERNR-LOW = '100255'
    with PNPABKRS-LOW = 'US'
    with SCHEMA = 'ZUSP'
    with RADI_EDT ='X'
    with EDT_VARI = 'CUS&SAP_US'
    with TST_ON = 'X'
    EXPORTING LIST TO MEMORY and RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject       = ABAPLIST
    EXCEPTIONS
       NOT_FOUND        = 1
       OTHERS           = 2.
    CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        list_index         = -1
      TABLES
        listasci           = asci_tab
        listobject         = ABAPLIST
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2
        OTHERS             = 3.
    IF sy-subrc NE '0'.
      WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.
    ENDIF.

  • When i do initial set up w creative cloud set uo wont run send error message"installer failed to initialize" why and how can i get pass this

    When I do initial set up with creative cloud set up it wont run a send error message "installer failed to initialize" comes up. Why and how can I get passed this?

    Error "Installer Failed to Initialize" | Install desktop application | Windows

  • Trying to send a photo via e-mail from iPhoto.  But it says my e-mail and password are wrong and won't send and I don't know how to correct it.  Where do I go?

    Trying to send a photo via e-mail from iPhoto.  But it says my e-mail and password are wrong and won't send and I don't know how to correct it.  Where do I go?

    In the iPhoto preferences ==> accounts delete the account and re-enter it
    LN

Maybe you are looking for