Smartform Mail -DOCUMENT_NOT_SENT Exception

Hi ,
We are using the FM - SO_NEW_DOCUMENT_ATT_SEND_API1 to send a smartform mail with PDF attachement, we are able to acheive this in the Developement system, where as in Quality system this FM is raising exception DOCUMENT_NOT_SENT (sy-subrc = 2).
The same code exists in both the systems, I read in SDN that the SU01 settings should be checked, I checked it and made it similar to the developement system.
Can anyone let me what may be the root cause of the issue ?
Thanks in advance.

Hi Jay,
Thanks for your quick reply.
commit_work = 'X' is in the code in both the systems.
Logged off and logged in again for SU01 settings to be effective.
But still the same exception.

Similar Messages

  • Smartform Mail Issue

    Can anyone please let me know how to set the value of JOB_OUTPUT_INFO-OUTPUTDONE to 'X' in the class CL_SF_MAIL_PPF.
    My requirement is to avoid error mesage in logs of transaction CRMD_ORDER which is triggering a smartform mail, if I change the value of  JOB_OUTPUT_INFO-OUTPUTDONE to 'X' while debugging, I am not getting the error message in the logs.
    Mail is triggerred with PDF, there is no issue in the mail, except the above issue.
    Please let me know how to set the above mentioned field to 'X' programatically. Point ll be awarded.
    Thanks in Advance.
    Edited by: Mohana Vijayan on Oct 9, 2009 4:27 PM

    REPORT ZSMF_MAIL_PROGRAM.
    DATA: OUTPUT_OPTIONS TYPE SSFCOMPOP,
    CONTROL_PARAMETERS TYPE SSFCTRLOP,
    OUTPUT_DATA TYPE SSFCRESCL.
    DATA: FILESIZE TYPE I.
    DATA:FM_NAME TYPE RS38L_FNAM.
    DATA LT_OTFDATA LIKE ITCOO OCCURS 1000 WITH HEADER LINE.
    DATA LT_PDFDATA LIKE TLINE OCCURS 100 WITH HEADER LINE.
    DATA:LT_PDF LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    DATA:LW_PDF LIKE LINE OF LT_PDF.
    DATA:LW_PDFDATA LIKE LINE OF LT_PDFDATA.
    DATA:LS_JOB_INFO TYPE TABLE OF SSFCRESCL WITH HEADER LINE.
    DATA:LT_MESSAGE TYPE TABLE OF SOLISTI1 WITH HEADER LINE.
    DATA: DOCU_DATA LIKE SODOCCHGI1 OCCURS 0 WITH HEADER LINE.
    DATA PACKING_LIST LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE.
    DATA OBJECT_HEADER LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    DATA CONTENTS LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    DATA REAL_RECIPIENTS LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE.
    DATA CONTENTS_TXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    DATA CONTENTS_ATT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    DATA PACKING_LIST_TXT LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE.
    DATA OBJECT_HEADER_TXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    DATA OBJECT_HEADER_ATT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    DATA PACKING_LIST_ATT LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE.
    DATA: W_EMAIL(1215) TYPE C.
    DATA:PSUBJECT(90) TYPE C.
    DATA: LD_FORMAT TYPE SO_OBJ_TP ,
    LD_ATTDESCRIPTION TYPE SO_OBJ_NAM ,
    LD_ATTFILENAME TYPE SO_OBJ_DES .
    *Calling the Smartform.
    Get Email id from ztab_email table.
    select single email_id from ztab_email
    into w_email.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    FORMNAME = 'Z_CONTD_DEBT_FORM'
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    IF SY-SUBRC <> 0.
    ENDIF.
    CONTROL_PARAMETERS-DEVICE = 'MAIL'.
    CONTROL_PARAMETERS-NO_DIALOG = 'X'.
    CONTROL_PARAMETERS-GETOTF = 'X'.
    CONTROL_PARAMETERS-PREVIEW = SPACE.
    OUTPUT_OPTIONS-TDTITLE = SY-TITLE.
    OUTPUT_OPTIONS-TDNEWID = 'X'.
    OUTPUT_OPTIONS-TDNOPREV = 'X'.
    OUTPUT_OPTIONS-TDDELETE = 'X'.
    CALL FUNCTION FM_NAME
    EXPORTING
    CONTROL_PARAMETERS = CONTROL_PARAMETERS
    OUTPUT_OPTIONS = OUTPUT_OPTIONS
    USER_SETTINGS = SPACE
    IMPORTING
    JOB_OUTPUT_INFO = OUTPUT_DATA
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    OUTPUT_DATA-OUTPUTDONE = 'X'.
    *Convert to PDF Format.
    CLEAR LT_PDFDATA.
    REFRESH LT_PDFDATA.
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = '132'
    IMPORTING
    BIN_FILESIZE = FILESIZE
    TABLES
    OTF = OUTPUT_DATA-OTFDATA
    LINES = LT_PDFDATA
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 4
    OTHERS = 5.
    IF SY-SUBRC <> 0.
    ENDIF.
    REFRESH LT_PDF[].
    *Convert 132 line sized internal table into 255 line sized internal table.
    CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
    EXPORTING
    LINE_WIDTH_DST = '255'
    TABLES
    CONTENT_IN = LT_PDFDATA[]
    CONTENT_OUT = LT_PDF[]
    EXCEPTIONS
    ERR_LINE_WIDTH_SRC_TOO_LONG = 1
    ERR_LINE_WIDTH_DST_TOO_LONG = 2
    ERR_CONV_FAILED = 3
    OTHERS = 4.
    IF SY-SUBRC <> 0.
    ENDIF.
    Sending it as an Email Attachment.
    LD_FORMAT = 'PDF'.
    LD_ATTDESCRIPTION = 'CONTESTED'.
    LD_ATTFILENAME = 'TEST_FILE'.
    CLEAR REAL_RECIPIENTS.
    REFRESH REAL_RECIPIENTS.
    REAL_RECIPIENTS-REC_TYPE = 'U'.
    REAL_RECIPIENTS-COM_TYPE = 'INT'.
    REAL_RECIPIENTS-NOTIF_DEL = 'X'.
    REAL_RECIPIENTS-NOTIF_NDEL = 'X'.
    REAL_RECIPIENTS-RECEIVER = W_EMAIL.
    APPEND REAL_RECIPIENTS.
    CLEAR PACKING_LIST.
    REFRESH PACKING_LIST.
    *Describe the body of the message
    PACKING_LIST-TRANSF_BIN = ' '."""""""""""""" CHANGE IT FROM 'X' TO ' ' """""""""""""
    PACKING_LIST-HEAD_START = 1.
    PACKING_LIST-HEAD_NUM = 0.
    PACKING_LIST-BODY_START = 1.
    PACKING_LIST-BODY_NUM = 1.
    PACKING_LIST-DOC_TYPE = 'RAW'.
    APPEND PACKING_LIST.
    PACKING_LIST-TRANSF_BIN = 'X'.
    PACKING_LIST-HEAD_START = 1.
    PACKING_LIST-HEAD_NUM = 1.
    PACKING_LIST-BODY_START = 1.
    DESCRIBE TABLE LT_PDF LINES PACKING_LIST-BODY_NUM.
    PACKING_LIST-DOC_TYPE = LD_FORMAT.
    PACKING_LIST-OBJ_DESCR = LD_ATTDESCRIPTION.
    PACKING_LIST-OBJ_NAME = LD_ATTFILENAME.
    PACKING_LIST-DOC_SIZE = PACKING_LIST-BODY_NUM * 255.
    APPEND PACKING_LIST.
    *Populate the subject/generic message attributes
    DOCU_DATA-DOC_SIZE = 1.
    DOCU_DATA-OBJ_LANGU = SY-LANGU.
    DOCU_DATA-OBJ_NAME = 'SAPRPT'.
    DOCU_DATA-OBJ_DESCR = PSUBJECT.
    DOCU_DATA-SENSITIVTY = 'F'.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = DOCU_DATA
    SENDER_ADDRESS_TYPE = 'INT'
    COMMIT_WORK = 'X'
    PUT_IN_OUTBOX = 'X'
    SENDER_ADDRESS = V_SENDER
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    PACKING_LIST = PACKING_LIST
    OBJECT_HEADER = OBJECT_HEADER
    CONTENTS_BIN = LT_PDF
    CONTENTS_TXT = CONTENTS
    RECEIVERS = REAL_RECIPIENTS
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    DOCUMENT_TYPE_NOT_EXIST = 3
    OPERATION_NO_AUTHORIZATION = 4
    PARAMETER_ERROR = 5
    X_ERROR = 6
    ENQUEUE_ERROR = 7
    OTHERS = 8.
    IF SY-SUBRC <> 0.
    ENDIF.

  • Prob in PO smartform mail sending

    Dear  all,
    We are facing prob at the time of PO smartform  mail sending.
    Issue is if in vendor master if in general tab there is option to mantain mail id.
    if i keep blank than mail is not going this is right.
    but our requirement is if in general tab email is not maintained than also we have to check in contact person tab in vendor master
    there is tab called partners details if mail id maintained in partners than mail should  shoot.
    Thanks in advanced.
    Laxman Sankhla.

    Hi,
    Just find an exit and populate the mail id based on your logic,
    or if you are using WF just chip your logic in one activity.
    Regards
    Bikas

  • Mail.app exception raised

    I am getting the following error. It seems to happen when rules are applied. I complete rebuild my Rules and it is still happening. I even have the Junk Mail disabled. I am connecting to a Leopard Server.
    Anyone see this before? It makes Mail unusable.
    Apr 29 13:39:28 xxxxx Mail[603]: * -[MimeBody stringValueForJunkEvaluation:]: unrecognized selector sent to instance 0x697f6b0
    Apr 29 13:39:28 xxxxx Mail[603]: exception raised in routeMessages: * -[MimeBody stringValueForJunkEvaluation:]: unrecognized selector sent to instance 0x697f6b0

    Hola Jaime.
    This problem in Mail is usually caused by some Launch Services cache or preferences corruption. The following article describes how to manually reset Launch Services -- the notes at the bottom of the article also provide information about the side effects of deleting each of the files involved:
    Resetting Launch Services
    If you prefer using a cache cleaning utility instead of following the manual procedure described in the previous article, this other article provides links to some utilities that can be used for troubleshooting and cache cleaning:
    Resolving Disk, Permission, and Cache Corruption
    It seems that the most appropriate utility for solving this particular problem is Tiger Cache Cleaner, but you may also want to consider other utilities, such as OnyX, or Cache Out X, which are free. Whatever utility you choose, be sure to read this first:
    Side effects of System cache cleaning
    As an example, this is how you should proceed with OnyX:
    1. Quit all applications.
    2. Launch OnyX and enter your administrator password.
    3. Click Maintenance. In the Reset section, check LaunchServices database.
    4. You may uncheck any other pre-checked options if you wish.
    5. Click the Execute button.
    6. Restart the computer.

  • Tbale layout in smartform mail

    Hi Experts,
    I am sending SMARTFORM as a mail.I am able to send the mail perfectly.But in my smartform table is there.In the mail Table content is displaying but the table layout is missing.I want my smartform as a Boody of the mail not as a PDF or any type of attchment.Please can anybody give me the solution for this.Please.
    I will reward you more points.
    Thanks,
    Swapna.

    Hi,
    Try This below Sample code,
    DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    i_tline TYPE TABLE OF tline WITH HEADER LINE,
    i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
    i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    Objects to send mail.
    i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    Work Area declarations
    wa_objhead TYPE soli_tab,
    w_ctrlop TYPE ssfctrlop,
    w_compop TYPE ssfcompop,
    w_return TYPE ssfcrescl,
    wa_doc_chng TYPE sodocchgi1,
    w_data TYPE sodocchgi1,
    wa_buffer TYPE string, "To convert from 132 to 255
    Variables declarations
    v_form_name TYPE rs38l_fnam,
    v_len_in LIKE sood-objlen,
    v_len_out LIKE sood-objlen,
    v_len_outn TYPE i,
    v_lines_txt TYPE i,
    v_lines_bin TYPE i.
    DATA : t_bsid TYPE  STANDARD TABLE OF zfr_efl_evcda_letter WITH HEADER LINE.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname           = 'ZFR_EFL_SCHEM_COMPLN_LETTER'
      IMPORTING
        fm_name            = v_form_name
      EXCEPTIONS
        no_form            = 1
        no_function_module = 2
        OTHERS             = 3.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    w_ctrlop-getotf = 'X'.
    w_ctrlop-no_dialog = 'X'.
    w_compop-tdnoprev = 'X'.
    CALL FUNCTION v_form_name
      EXPORTING
        control_parameters = w_ctrlop
        output_options     = w_compop
        user_settings      = 'X'
      IMPORTING
        job_output_info    = w_return
      TABLES
        t_zfr_efl_evcda    = t_bsid[]
      EXCEPTIONS
        formatting_error   = 1
        internal_error     = 2
        send_error         = 3
        user_canceled      = 4
        OTHERS             = 5.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    i_otf[]  =  w_return-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
      EXPORTING
        format                = 'PDF'
        max_linewidth         = 132
      IMPORTING
        bin_filesize          = v_len_in
      TABLES
        otf                   = i_otf
        lines                 = i_tline
      EXCEPTIONS
        err_max_linewidth     = 1
        err_format            = 2
        err_conv_not_possible = 3
        OTHERS                = 4.
    Fehlerhandling
    IF sy-subrc <> 0.
    ENDIF.
    LOOP AT i_tline.
      TRANSLATE i_tline USING '~'.
      CONCATENATE wa_buffer i_tline INTO wa_buffer.
    ENDLOOP.
    TRANSLATE wa_buffer USING '~'.
    DO.
      i_record = wa_buffer.
      APPEND i_record.
      SHIFT wa_buffer LEFT BY 255 PLACES.
      IF wa_buffer IS INITIAL.
        EXIT.
      ENDIF.
    ENDDO.
    Attachment
    REFRESH:
    i_reclist,
    i_objtxt,
    i_objbin,
    i_objpack.
    CLEAR wa_objhead.
    i_objbin[] = i_record[].
    i_objtxt = 'test with pdf-Attachment'.
    APPEND i_objtxt.
    DESCRIBE TABLE i_objtxt LINES v_lines_txt.
    READ TABLE i_objtxt INDEX v_lines_txt.
    wa_doc_chng-obj_name = 'smartform'.
    wa_doc_chng-expiry_dat = sy-datum + 10.
    wa_doc_chng-obj_descr = 'smartform'.
    wa_doc_chng-sensitivty = 'F'.
    wa_doc_chng-doc_size = v_lines_txt * 255.
    0.1. Main Text
    wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + strlen( i_objtxt )
    CLEAR i_objpack-transf_bin.
    i_objpack-head_start = 1.
    i_objpack-head_num = 0.
    i_objpack-body_start = 1.
    i_objpack-body_num = v_lines_txt.
    i_objpack-doc_type = 'RAW'.
    APPEND i_objpack.
    0.1. Attachment
    (pdf-Attachment)
    i_objpack-transf_bin = 'X'.
    i_objpack-head_start = 1.
    i_objpack-head_num = 0.
    i_objpack-body_start = 1.
    Länge des Attachment ermitteln
    DESCRIBE TABLE i_objbin LINES v_lines_bin.
    READ TABLE i_objbin INDEX v_lines_bin.
    i_objpack-doc_size = v_lines_bin * 255 .
    i_objpack-body_num = v_lines_bin.
    i_objpack-doc_type = 'PDF'.
    i_objpack-obj_name = 'smart'.
    i_objpack-obj_descr = 'test'.
    APPEND i_objpack.
    CLEAR i_reclist.
    i_reclist-receiver = 'Mail ID'. " Give U Mail ID
    i_reclist-rec_type = 'U'.
    APPEND i_reclist.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data              = wa_doc_chng
        put_in_outbox              = 'X'
        commit_work                = 'X'
      TABLES
        packing_list               = i_objpack
        object_header              = wa_objhead
        contents_bin               = i_objbin
        contents_txt               = i_objtxt
        receivers                  = i_reclist
      EXCEPTIONS
        too_many_receivers         = 1
        document_not_sent          = 2
        document_type_not_exist    = 3
        operation_no_authorization = 4
        parameter_error            = 5
        x_error                    = 6
        enqueue_error              = 7
        OTHERS                     = 8.
    Reward if useful...
    Thanks,
    Durai.V

  • Document_not_sent exception in SO_DOCUMENT_SEND_API1

    Hi SAP Experts,
    I would just like to ask what causes this exception. When I try to run my program I am able to send an e-mail successfully, but when my client was using the program. Exception document_not_sent was raised. Thanks in advance.

    Things to check...has  a valid email address in user settings for the failing user?  Can't say for ECC6.0, but I think that is a requirement.
    In transaction SO12 (from memory, I can't see this in my current system), is the internet switch turned on (if going to internet)?
    There may be an auth object, but in a prior life, I worked in an installation where only a particular batch user (background job ID) could send email from production...that was controlled via S012, which users couldn't change.

  • Smartforms mail pbm

    Hai all,
      i m able to convert sf op to pdf format bt nt able to send mail.
    i checked su01 n scot for internet option also..
    i used the code given in dis forum 2 send mail with pdf as attachment bt failed..
    is rfc r gateway checking required if so guide me with the steps..
    thanks in advance.

    Hi,
    Use following piece of code  to send mail:
    *For sending email
    DATA:
    i_otf type standard table of itcoo ,"OCCURS 0 WITH HEADER LINE,
    i_tline type table of tline with header line,
    i_receivers type standard table of somlreci1 ,
    i_record type table of solisti1 initial size 0 with header line,
    Objects to send mail.
    i_objpack type table of sopcklsti1 initial size 0 with header line,
    i_objtxt type table of solisti1 initial size 0 with header line,
    i_objbin type table of solisti1 initial size 0 with header line,
    i_reclist type table of somlreci1 initial size 0 with header line,
    Work Area declarations
    wa_objhead type soli_tab,
    w_ctrlop type ssfctrlop,
    w_compop type ssfcompop,
    w_return type ssfcrescl,
    wa_doc_chng type sodocchgi1,
    wa_buffer type string, "To convert from 132 to 255
    Variables declarations
    v_len_in like sood-objlen,
    v_lines_txt type i,
    v_lines_bin type i.
    clear v_len_in.
    i_otf] = w_return-otfdata[.
    clear v_len_in.
    call function 'CONVERT_OTF'
    exporting
    format = 'PDF'
    max_linewidth = 132
    importing
    bin_filesize = v_len_in
    tables
    otf = i_otf
    lines = i_tline
    exceptions
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    others = 4.
    if sy-subrc eq 0.
    loop at i_tline.
    translate i_tline using '~'.
    concatenate wa_buffer i_tline into wa_buffer.
    endloop.
    translate wa_buffer using '~'.
    do.
    i_record = wa_buffer.
    append i_record.
    shift wa_buffer left by 255 places.
    if wa_buffer is initial.
    exit.
    endif.
    enddo.
    Attachment
    refresh: i_reclist,
    i_objtxt,
    i_objbin,
    i_objpack.
    clear wa_objhead.
    i_objbin] = i_record[.
    Create Message Body Title and Description
    i_objtxt = 'PFA are the Service Entry Sheet details.'.
    append i_objtxt.
    append initial line to i_objtxt.
    describe table i_objtxt lines v_lines_txt.
    read table i_objtxt index v_lines_txt.
    wa_doc_chng-obj_name = 'Service Entry Sheet '.
    wa_doc_chng-expiry_dat = sy-datum + 10.
    wa_doc_chng-sensitivty = 'F'.
    wa_doc_chng-doc_size = v_lines_txt * 255.
    concatenate 'Service Entry Sheet' nast-objky(10) into wa_doc_chng-obj_descr separated by space.
    Main Text
    clear i_objpack-transf_bin.
    i_objpack-head_start = 1.
    i_objpack-head_num = 0.
    i_objpack-body_start = 1.
    i_objpack-body_num = v_lines_txt.
    i_objpack-doc_type = 'RAW'.
    append i_objpack.
    Attachment (pdf-Attachment)
    i_objpack-transf_bin = 'X'.
    i_objpack-head_start = 1.
    i_objpack-head_num = 0.
    i_objpack-body_start = 1.
    describe table i_objbin lines v_lines_bin.
    read table i_objbin index v_lines_bin.
    i_objpack-doc_size = v_lines_bin * 255 .
    i_objpack-body_num = v_lines_bin.
    i_objpack-doc_type = 'PDF'.
    i_objpack-obj_name = 'smart'.
    i_objpack-obj_descr = 'Service Entry Sheet '.
    append i_objpack.
    Get email id .
    clear i_reclist.
    i_reclist-receiver = '[email protected]'. "email address
    i_reclist-rec_type = 'U'.
    append i_reclist.
    if i_reclist[] is not initial.
    call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    exporting
    document_data = wa_doc_chng
    put_in_outbox = 'X'
    commit_work = 'X'
    tables
    packing_list = i_objpack
    object_header = wa_objhead
    contents_bin = i_objbin
    contents_txt = i_objtxt
    receivers = i_reclist
    exceptions
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    others = 8.
    if sy-subrc 0.
    Error When Sending the File
    retcode = sy-subrc.
    perform protocol_update1 .
    endif.
    endif.
    else.
    Error When generating the File
    retcode = sy-subrc.
    "perform protocol_update .
    endif.
    Then go  to SCOT and check
    let me know if there are any issues
    Reward if u find it useful
    Regards
    Arun T

  • Mail api exception please help

    Well i have tried many times to send email .But the exception arise can any body please tell where i am wrong.
    Here is the code
    import java.util.Properties;
    import javax.mail.*;
    import javax.mail.internet.*;
    public class MailExample {
    public static void main (String args[]) throws Exception {
    // Get system properties
    Properties props = System.getProperties();
    // Setup mail server
    props.put("mail.smtp.host","mail.yahoo.com");
    // Get session
    Session session = Session.getDefaultInstance(props, null);
    // Define message
    MimeMessage message = new MimeMessage(session);
    // Set the from address
    message.setFrom(new InternetAddress
    "[email protected]"));
    // Set the to address
    message.addRecipient(Message.RecipientType.TO,
    new InternetAddress("[email protected]"));
    // Set the subject
    message.setSubject("Hello JavaMail");
    // Set the content
    message.setText("Welcome to JavaMail i got it");
    // Send message
    Transport.send(message);
    <b>Exception in thread "main" javax.mail.SendFailedException: Sending failed;
    nested exception is:
    javax.mail.MessagingException: Could not connect to SMTP host: mail.yaho
    o.com, port: 25;
    nested exception is:
    java.net.NoRouteToHostException: Operation timed out: no further informa
    tion
    at javax.mail.Transport.send0(Transport.java:219)
    at javax.mail.Transport.send(Transport.java:81)
    at MailExample.main(MailExample.java:35)<b>
    Thanks
    Jawwad Ahmed

    Yahoo will probably give u errors becoz i think they have recently changed to "NO RELAY" mode for their Mail Server....why don't u setup ur own mail server.....IMAIL server or 1st Class server are typical Servers,
    Cheers,
    Manja

  • Error Message when trying to open mail - Uncaught Exception - Help!

    Hello
    Yesterday when I received a notification that I had new emails I clicked on the envelope on the home screen only to find the error message: 'Uncaught exception: String index out of range: -1' I now can't access my mail at all. I have rebooted the phone and it is still coming up.
    I just wondered if anyone else had this error message before and the easiest way to resolve it?
    My phone is a Curve 9300 and running on v5.0.0.794 (Platform 6.3.0.23)
    Thanks
    Emma

    i have a bold 9780 and I got:  "Uncaught exception:java.lang.ArrayIndexOutOfBoundsException" now i can't open messages or text
    EmmaLou_0702 wrote:
    Hello
    Yesterday when I received a notification that I had new emails I clicked on the envelope on the home screen only to find the error message: 'Uncaught exception: String index out of range: -1' I now can't access my mail at all. I have rebooted the phone and it is still coming up.
    I just wondered if anyone else had this error message before and the easiest way to resolve it?
    My phone is a Curve 9300 and running on v5.0.0.794 (Platform 6.3.0.23)
    Thanks
    Emma

  • Oracle Java Mail API exception in Jdev 11.1.15

    we are using java mail api to send out emails. and wrap it in java embedding with in our webservice.
    we are using jdeveloper 11.1.1.5 for this and the Java API is failing with the below error, we have included all the java libraries. As code is working fine in Jdeveloper 11.1.2
    we tried different version of jdeveloper ( 11.1.1.5, 11.1.1.7 ) but its still the same. Can some one please suggest
    Exception in thread "main" java.lang.RuntimeException: javax.mail.MessagingException: Can't send command to SMTP host;
      nested exception is:
        javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at bts.mail.SendMailTLS.main(SendMailTLS.java:50)
    Caused by: javax.mail.MessagingException: Can't send command to SMTP host;
      nested exception is:
        javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1420)
        at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1408)
        at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:847)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:384)
        at javax.mail.Service.connect(Service.java:297)
        at javax.mail.Service.connect(Service.java:156)
        at javax.mail.Service.connect(Service.java:105)
        at javax.mail.Transport.send0(Transport.java:168)
        at javax.mail.Transport.send(Transport.java:98)
        at bts.mail.SendMailTLS.main(SendMailTLS.java:45)

    Can Some body help me with this please

  • Communcation Channel Type E-Mail Receiver Exception thrown in method proces

    Hi,
    I use a scenario R/3 IDOC -> XI -> Email. It is working, however the email is send 4 times.
    I have an error within a communication channel.
    Adaptertype E-Mail Direction Receiver
    The communcation channel message log show the following entry:
    2008-08-14 12:47:09 Erfolgreich Message wurde erfolgreich vom Messaging-System empfangen. Profil: XI URL: http://host:port/MessagingSystem/receive/AFW/XI Credential (User): PIISUSER
    2008-08-14 12:47:09 Erfolgreich Mit der Verbindung Mail_http://sap.com/xi/XI/System. Versuch die Message in die Empfangs-Queue zu stellen
    2008-08-14 12:47:09 Erfolgreich Message erfolgreich in Queue gestellt
    2008-08-14 12:47:09 Erfolgreich Die Message wurde erfolgreich aus der Empfangs-Queue abgerufen
    2008-08-14 12:47:09 Erfolgreich Der Status der Message wurde auf DLNG gesetzt
    2008-08-14 12:47:09 Erfolgreich Liefert an Kanal: CC_Application_Mail_RCV
    2008-08-14 12:47:09 Erfolgreich MP: Tritt in den Modulprozessor ein
    2008-08-14 12:47:09 Erfolgreich MP: Lokales Modul localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean wird verarbeitet
    2008-08-14 12:47:09 Erfolgreich Mail: message entering the adapter
    2008-08-14 12:47:09 Erfolgreich Mail: Receiver adapter entered with qos ExactlyOnce
    2008-08-14 12:47:09 Erfolgreich Mail: calling the adpter for processing
    2008-08-14 12:47:09 Erfolgreich Mail: call completed
    2008-08-14 12:47:09 Erfolgreich Mail: continuing to response message 58650010-69ee-11dd-bc24-0018fe76622e
    2008-08-14 12:47:09 Erfolgreich Mail: sending a delivery ack ...
    2008-08-14 12:47:09 Erfolgreich Mail: sent a delivery ack
    2008-08-14 12:47:09 Erfolgreich MP: Lokales Modul localejbs/AF_Modules/MessageTransformBean wird verarbeitet
    2008-08-14 12:47:09 Fehler MP: Ausnahme aufgetreten mit Grund com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception thrown in method process. The transaction is marked for rollback.
    2008-08-14 12:47:09 Fehler Ausnahme aufgetreten beim Adapter-Framework: Exception thrown in method process. The transaction is marked for rollback.
    2008-08-14 12:47:09 Fehler Zustellung der Message an die Anwendung über Mail_http://sap.com/xi/XI/System ist fehlgeschlagen weil: com.sap.aii.af.ra.ms.api.RecoverableException: Exception thrown in method process. The transaction is marked for rollback.: com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception thrown in method process. The transaction is marked for rollback.
    2008-08-14 12:47:09 Erfolgreich Der Status der Message wurde auf WAIT gesetzt
    2008-08-14 12:47:09 Erfolgreich Die Zustellung der asynchronen Message um Thu Aug 14 12:52:09 CEST 2008 wurde erfolgreich eingeplant.
    Does anybody know what do to?
    Best regards,
    Nils Kloth

    Hi,
    it seems that the module processing is not working, if the flag keep attachments is not checked.
    Best regards,
    Nils Kloth

  • Smartform Mail Sending via Action profile

    Hi,
    we have a big problem, because our sended emails going into customers spam filter. We hava SAP CRM 5.0 and we send the emails via action profile.
    For that we use the standard for sending smartforms via action profile. Follwing problems are occured:
    1) email recipient is fill only in the cc field, not in the to field of an email
    2) the subjet ist the sam as the dcument name
    3) the emial is sended without text only whith attachment
    So my question are:
    how can i customize that the email is wirtten in the to field and how i can change the subject of this mail.
    Is ist possible to add a text to the email? Maybe not, but than we could add a disclaimer in the mail hub - so my firts questions are more importent for me.
    Thank you for your help
    Stefan

    Hi,
    To manipulate the subject Refer   Note 895550 - Name of Smart Form used as e-mail subject 
    Im not sure why the email recipient is in CC instead of To. Please check your Action settings. How are you determining the recipient? if it's by partner function, it should automatically be filled in To field.
    Smartforms can be sent either as Text or pdf attachment. This is controlled globally in SMTP settings in SCOT. I believe you can choose attachment option and also add some text by manipulating the Action class.
    HOpe this helps.
    Shaik

  • Smartforms Mail by Business Communications Interface

    Hi,
    According to the documentation in SAP library on SmartForms, you should be able mail a smartform as PDF, directly from the generated function module. For that, you have to set the CONTROL_PARAMETERS-DEVICE = 'MAIL'. Then you need to create recipient, sender and application BOR ID's and pass these to parameters MAIL_RECIPIENT, MAIL_SENDER and MAIL_APPL_OBJ. I have no experience with BOR objects, and I think something goes wrong at that point.
    The SAP Library refers to sample code, in report RSSOKIF2. I have copied this code, and modified a little, to be able to send to an e-mail address, only changing the recipient type to 'U', and moving the e-mail address to the AddressString parameter.
    This doesn't work. Does anyone have any working code to send smartforms to an e-mail address USING THE BUSINESS COMMUNICATIONS INTERFACE ?
    I know how to send e-mail with PDF attachment. I am trying to find out how to use the BOR objects technique.

    Hello Peter,
    I did also follow this example but it was from the book - "SAP Smart Forms" by Werner Hertleif and Christoph Wacheter.  Chapter 10 has a nice exaple that you can follow.  You have to copy some of the source code from the back of the book's appendix.  I wa not able to get it to work initially.  I found that it was necessary to issue the commit work command if you are sending via external (internet) e-mail.  It seemed to me that the commit work was not necessary if you just send to an internal sap user e-mail address.
    Also be sure that you have set up the e-mail address for your current user in the SU01 user maintenance.

  • Attachment E-mail reading exception

    When I read the mail using javamail api,
    I am getting,
    javax.mail.MessagingException: Missing start boundary
    Which situation, this exception will occur,
    how can i overcome this problem,
    kindly send me your suggestions.
    Thank You
    Edward

    Most likely the message is corrupt.
    Turn on session debugging and post the protocol trace, or send it to me at [email protected]
    and I'll help you debug it.

  • Mail sending exception

    Hi All,
    I am developing a Contact Us form. The application is giving me the foll. exception
    javax.mail.SendFailedException: Sending failed;  nested exception is: javax.mail.MessagingException: Unknown SMTP host: mail.exchange.com;  nested exception is: java.net.UnknownHostException: mail.exchange.com
    My code is as follows:
         Properties properties = new Properties();
         String SMTPIPAddress = "smtpipaddress";     
         String SMTPAddress = "smtpaddress";     
         String mailId = "[email protected]";
         Session session;
         Provider p;
         properties = System.getProperties();
         properties.put("SMTPAddress ", "SMTPIPAddress");
         session = Session.getDefaultInstance(properties, null);
         Message message = new MimeMessage(session);
         try{
                   message.setFrom(new InternetAddress(mailId));
                   message.addRecipient(Message.RecipientType.TO,
                   new InternetAddress(mailId));
                   message.setSubject("Conference");
                   message.setText("Hello");
                   Transport.send(message);
         }catch (AddressException ade) {
              wdComponentAPI.getMessageManager().raiseException(ade.toString(),false);
         }catch(MessagingException msge){
              wdComponentAPI.getMessageManager().raiseException("MessagingException "+msge.toString(),true);     
         }catch(Exception e){
              wdComponentAPI.getMessageManager().raiseException("Exception "+e.toString(),true);
    Please let me know what is wrong.
    Regards
    Nikhil Bansal

    Hi Abhijeet,
    Thanks for the reply.
    I have given the IP address of SMTP address in Java Mail Client in Visual Admin.
    However, I am getting the foll. exception
    MessagingException javax.mail.SendFailedException: Sending failed;  nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;  nested exception is: java.net.ConnectException: Connection refused: connect
    Has it got something to do with the port being opened for SMTP host.
    Please let me know.
    Regards
    Nikhil

Maybe you are looking for