PO Attachment with mail.

Hi all,
Right now I am functioning on Oracle finance and I am stuck .I will grateful if you make available me any solution or any hint.
Step:
1)     User will create PO orders .
2)     He/She will approve PO orders.
3)     After User will attaché couple of Document e.g. *.doc,*.els etc…with this PO Orders.
4)     Now once user will click on approve button standard orders will sent to supplier with attached PDF(this PDF file will create Oracle internally and attached with mail) file.
Que : Here supplier will get email with only standard attachment not all other *.doc and *.els with is attached with current order. I would like to change this development and want to attach all attachment along with Stand orders PDF.
Note : This process is calling one JAVA Concurrent Prog : (PO Output for Communication)
Thanks Looking for response.
Thanks
Raj

Hi all,
Right now I am functioning on Oracle finance and I am stuck .I will grateful if you make available me any solution or any hint.
Step:
1)     User will create PO orders .
2)     He/She will approve PO orders.
3)     After User will attaché couple of Document e.g. *.doc,*.els etc…with this PO Orders.
4)     Now once user will click on approve button standard orders will sent to supplier with attached PDF(this PDF file will create Oracle internally and attached with mail) file.
Que : Here supplier will get email with only standard attachment not all other *.doc and *.els with is attached with current order. I would like to change this development and want to attach all attachment along with Stand orders PDF.
Note : This process is calling one JAVA Concurrent Prog : (PO Output for Communication)
Thanks Looking for response.
Thanks
Raj

Similar Messages

  • Getting: Unable to send attachment with Mail Drop

    Mail Drop is not working for me, I always get error message while trying to send.
    Here is what happens:
    -I compose a message that includes a large attachment
    -I click send
    -I get the message "Unable to send attachment with Mail Drop" for a few seconds
    -My message is not sent and it goes into the Outbox folder.
    Configuration:
    OS X 10.10 Yosemite
    Mail -> Preferences -> Accounts -> Advanced. The option "Send large attachments with Mail Drop" is selected.

    I had the exact same problem.  I finally figured out what was wrong.  I believe you must have iCloud Drive turned on in System Preferences AND you also must allow mail to store document in iCloud Drive which you can check by clicking the "Options..." button in the preference pane of iCloud Drive. As you can see below.

  • Problem while sending the *.txt as attachment  with mail

    Hi All,
    I am Using  function module (SO_NEW_DOCUMENT_ATT_SEND_API1) to send Mail with attachment in *.TXT format. But This function module is allowing only 255 char for a row. But the length of my Internal table is 700 char. Is there any another way to process the attachment without disturbing the data,that means need to process all 700 char in the field with out splitting.

    no other way and use mutilple lines as text ( This is possible )
    you want to keep text as multiple lines into internal table use FM
    SWA_STRING_SPLIT - Pass text and maintain length as 255 Charcters

  • Problem send attachment with mail

    Hello,
    I'm coding a program which sends a mail with attachment to an external mail address. The system creates the mail and the attachment, bu the content of the attachment isn 't correct.
    this is my code
    REPORT  Z_SEND_MAIL.
    data: IS_DOCDATA type SODOCCHGI1,
    IS_RECEIVERS type SOMLRECI1,
    IS_RECEIVERS_COPY type SOMLRECI1,
    IT_RECEIVERS type table of SOMLRECI1,
    IS_CONTENT type SOLISTI1,
    IT_CONTENT type table of SOLISTI1,
    *500369789+
    l_txt(255) type c,
    lt_objpack TYPE TABLE OF sopcklsti1 WITH HEADER LINE,
    lt_objhead TYPE TABLE OF solisti1 WITH HEADER LINE,
    lt_objtxt TYPE TABLE OF solisti1 WITH HEADER LINE,
    l_tab_lines TYPE i,
    l_att_type LIKE soodk-objtp.
    *500369789+
    IS_DOCDATA-OBJ_NAME = 'MAIL'.
    IS_DOCDATA-PRIORITY = 5.
    IS_DOCDATA-OBJ_LANGU = SY-LANGU.
    IS_DOCDATA-NO_CHANGE = 'X'.
    IS_DOCDATA-OBJ_DESCR = SY-CPROG.
    clear : IS_CONTENT, l_txt. "500369789+
    move '123456789' to l_txt. "500369789+
    * move IS_MESSAGE-LINE to IS_CONTENT-LINE. "500369789-
    move l_txt to IS_CONTENT-LINE. "500369789+
    append IS_CONTENT to IT_CONTENT.
    *add receiver
    IS_RECEIVERS-RECEIVER = '[email protected]'.
    IS_RECEIVERS-REC_TYPE = 'U'.
    append IS_RECEIVERS to IT_RECEIVERS.
    lt_objhead-line = 'Test mail'.
    append lt_objhead.
    DESCRIBE TABLE lt_objhead LINES l_tab_lines.
    CLEAR lt_objpack-transf_bin.
    lt_objpack-doc_size = STRLEN( lt_objhead ).
    lt_objpack-head_start = 1.
    lt_objpack-head_num = 1.
    lt_objpack-body_start = 1.
    lt_objpack-body_num = 1.
    lt_objpack-doc_type = 'RAW'.
    APPEND lt_objpack.
    l_att_type = 'TXT'.
    DESCRIBE TABLE it_content LINES l_tab_lines.
    READ TABLE it_content into is_content INDEX l_tab_lines.
    lt_objpack-doc_size = ( l_tab_lines - 1 ) * 255.
    lt_objpack-doc_size = lt_objpack-doc_size + STRLEN( is_content ).
    lt_objpack-transf_bin = 'X'.
    lt_objpack-head_start = 1.
    lt_objpack-head_num = 2.
    lt_objpack-body_start = 1.
    lt_objpack-body_num = l_tab_lines.
    lt_objpack-doc_type = l_att_type.
    lt_objpack-obj_name = 'ATTACHMENT'.
    concatenate 'Test' SY-DATUM+6(2) SY-DATUM+4(2) into
    lt_objpack-obj_descr. "#EC *
    APPEND lt_objpack.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = IS_DOCDATA
    commit_work = 'X'
    TABLES
    packing_list = lt_objpack
    * object_header = lt_objhead
    contents_txt = lt_objhead
    contents_bin = it_content
    receivers = it_receivers
    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.
    The attachment is a TXT, the content should be '123456789', but it is '1 2 3 4'.
    Does anyone has an idea why he does this ?
    thanks !

    solved by a colleague

  • How to avoid attachment with mail code

    Hi ,
    I have written a code for sending e-mail notification .Code is working fine as e-mail is triggered as expected but when mail is recieved an attachment comes along with it named attzurlm.dat. Plz provide pointers how to remove this attachment .
    PFB the code
    public String sendEmail( List<String> recipientList, String subject, String message , String from,String cc,String logoPath,Logger LOGGER) {
    try{
    functionName="sendEmail()";
    //Set the host smtp address
    Properties props = new Properties();
    Utils util=new Utils();
    //Fetching values from lookup
    tcLookupOperationsIntf lookupIntf = Platform.getService(tcLookupOperationsIntf.class);
    String smtpHost=util.getLookUpValueByKey("LookUp.EmailInfo","CG_EMAIL_SERVER",lookupIntf,LOGGER);
    LOGGER.debug(functionName+ " SMTP Host Name :"+smtpHost);
    props.put("mail.smtp.host", smtpHost);
    props.put("mail.smtp.auth", "false");
    // create some properties and get the default Session
    Session session = Session.getDefaultInstance(props, null);
    //session.setDebug(debug);
    // create a message
    Message msg = new MimeMessage(session);
    //Check if cc is required
    if (cc.length() != 0) {
    InternetAddress ccAddress = new InternetAddress(cc);
    msg.setRecipient(RecipientType.CC, ccAddress);
    // set the from and to address
    InternetAddress addressFrom = new InternetAddress(from);
    msg.setFrom(addressFrom);
    InternetAddress[] addressTo = new InternetAddress[recipientList.size()];
    for (int iCountMail = 0; iCountMail < recipientList.size(); iCountMail++)
    addressTo[iCountMail] = new InternetAddress(recipientList.get(iCountMail));
    msg.setRecipients(Message.RecipientType.TO, addressTo);
    // Setting the Subject and Content Type
    msg.setSubject(subject);
    msg.setText(message);
    MimeMultipart multipart = new MimeMultipart("related");
    // first part (the html)
    BodyPart messageBodyPart = new MimeBodyPart();
    String htmlText = "<br>"+ message + "<BR><BR><P align=\"left\">" + "<br><img src=\"cid:image\"><br><br>" + "</P>";
    messageBodyPart.setContent(htmlText, "text/html");
    multipart.addBodyPart(messageBodyPart);
    messageBodyPart = new MimeBodyPart();
    DataSource fds=null;
    try{
    fds= new FileDataSource(logoPath);
    }catch(Exception exe){
    LOGGER.debug("Function:+ sendEmial :logofile path is missing"+logoPath);
    messageBodyPart.setDataHandler(new DataHandler(fds));
    messageBodyPart.setHeader("Content-ID", "<image>");
    multipart.addBodyPart(messageBodyPart);
    // put everything together
    msg.setContent(multipart);
    Transport.send(msg);
    LOGGER.info("Email sent to recipient :"+recipientList);
    }catch(MessagingException msgExc){
    LOGGER.error(functionName+" Error occurred while sending email:"+msgExc);
    msgExc.printStackTrace();
    return "ERROR";
    }catch(Exception exception){
    LOGGER.error(functionName+" Error occurred while sending email:"+exception);
    exception.printStackTrace();
    return "ERROR";
    return "SUCCESS";
    }

    Code Goes as below in curley braces :
    public String sendEmail( List<String> recipientList, String subject, String message , String from,String cc,String logoPath,Logger LOGGER)     {
            try{
                 functionName="sendEmail()";
                 //Set the host smtp address
                 Properties props = new Properties();
                 Utils util=new Utils();
                 tcLookupOperationsIntf lookupIntf = Platform.getService(tcLookupOperationsIntf.class);
                 String smtpHost=util.getLookUpValueByKey("CG.LookUp.EmailInfo","EMAIL_SERVER",lookupIntf,LOGGER);
                 LOGGER.debug(functionName+ " SMTP Host Name :"+smtpHost);
                 props.put("mail.smtp.host", smtpHost);
                 props.put("mail.smtp.auth", "false");
                // create some properties and get the default Session
                Session session = Session.getDefaultInstance(props, null);
                //session.setDebug(debug);
                // create a message
                Message msg = new MimeMessage(session);
                //Check if cc is required
                if (cc.length() != 0) {
                    InternetAddress ccAddress = new InternetAddress(cc);
                    msg.setRecipient(RecipientType.CC, ccAddress);
                // set the from and to address
                InternetAddress addressFrom = new InternetAddress(from);
                msg.setFrom(addressFrom);
                InternetAddress[] addressTo = new InternetAddress[recipientList.size()];
                for (int iCountMail = 0; iCountMail < recipientList.size(); iCountMail++)
                    addressTo[iCountMail] = new InternetAddress(recipientList.get(iCountMail));
                msg.setRecipients(Message.RecipientType.TO, addressTo);
                // Setting the Subject and Content Type
                msg.setSubject(subject);
                msg.setText(message);
                MimeMultipart multipart = new MimeMultipart("related");
             // first part (the html)
                BodyPart messageBodyPart = new MimeBodyPart();
                String htmlText = "<br>"+ message + "<BR><BR><P align=\"left\">" + "<br><img src=\"cid:image\"><br><br>" + "</P>";
                messageBodyPart.setContent(htmlText, "text/html");
                multipart.addBodyPart(messageBodyPart);
                messageBodyPart = new MimeBodyPart();
                DataSource fds=null;
                try{
                    fds= new FileDataSource(logoPath);
                }catch(Exception exe){
                    LOGGER.debug("Function:+ sendEmial :logofile path is missing"+logoPath);
                messageBodyPart.setDataHandler(new DataHandler(fds));
                messageBodyPart.setHeader("Content-ID", "<image>");
                multipart.addBodyPart(messageBodyPart);
                // put everything together
                msg.setContent(multipart);
                Transport.send(msg);
                LOGGER.info("Email sent to recipient :"+recipientList);
            }catch(MessagingException msgExc){
                 LOGGER.error(functionName+" Error occurred while sending email:"+msgExc);
                 msgExc.printStackTrace();
                 return "ERROR";
            }catch(Exception exception){
                LOGGER.error(functionName+" Error occurred while sending email:"+exception);
                 exception.printStackTrace();
                 return "ERROR";
            return "SUCCESS";

  • Problem receiving attachment with Mail 5.1

    Hi all,
    Just got the New Macbook Pro 15". Superb machine!
    But since i set up my Mail account on Mail 5.1, I can receive and send mails... but have problems opening attachements.
    It tells me that there have been a problem with the file and that It has crashed.
    I don't have any problems when I open the same mail from my internet provider site.
    Any suggestions are welcome.
    Thank you in advance
    Julien

    solved by a colleague

  • Send attachment with mail

    Hi all,
    I am using Oracle Database 10g Enterprise Edition Release 10.1.0.2.0. I am sending MULTIPART mail contains HTML +Attachment. When I send mail to any E mail id of my own domain (eg. [email protected]) , then that user will get both message and attachment. But when i send same mail to other domain (eg. [email protected] or [email protected]), then that user will get only message and NOT attachment. Why this is so? Please help.
    Someone suggested me to use following code, but prob is not solved.
    UTL_SMTP.COMMAND(V_CONN, 'AUTH LOGIN');
    UTL_SMTP.COMMAND(V_CONN,UTL_RAW.CAST_TO_VARCHAR2(UTL_ENCODE.BASE64_ENCODE(UTL_RAW.CAST_TO_RAW(V_USERNAME))));
    UTL_SMTP.COMMAND(V_CONN,UTL_RAW.CAST_TO_VARCHAR2(UTL_ENCODE.BASE64_ENCODE(UTL_RAW.CAST_TO_RAW(V_PASSWORD))));
    Please help me.
    Thank you

    here is a sample program.
    I have used this program to send in attachments.
    http://www.akadia.com/services/java_mail_plsql.html
    Also modified the program to send text in the body. Current limit i think is 32k. You can increase this by modifing the java program to accept blob.
    Hope this helps.
    Alvinder

  • How is it possible, that a pdf file turns into a psd file while sending with mail

    I have send a pdf file as attachment with mail. the file shows correctly as pdf file. but when the file arrived at the addressed location it turned into a psd file. in addition it seems there is a problem sending png and ai files. once those files have arrived through mail I am getting the feedback, that the files are are not scalable, they are fuzzy or completely messed up.
    has anyone an idea, where the problem comes from?
    thanks for response
    angelika

    Hello,
    toddisalive wrote:
    Additionally, I have found an AppleWorks file that could be the script, but it is ZERO bytes in size, and Pages won't even open it, saying that it is not a valid AppleWorks file.
    if the size of this file is really ZERO bytes, either the original file contained an empty data fork and a resource fork which was stored elsewhere (*) or the file is too damaged to retrieve anything. Moreover, as AppleWorks never generates file with empty data fork, at least to my knowledge, ....
    Concerning the Movie Magic ScreenWriter files, the application seems to exist for Yosemite http://www.write-bros.com/movie-magic-screenwriter.html ( but it seems "expensive"  and I do not know if it accepts to import old files )....
    (*) maybe in .TOTO or __MACOSX/.TOTO if the filename is TOTO

  • Using attachment with RNIF

    Hi,
    I actually use B2B scenario based on RosettaNet/RNIF with SAP PI 7.0 SP12.
    I need to use the attachment capability, but, according to discussion with SAP support there is no current documentation about how to perform this action.
    Has anybody already do this setup ?
    Is it like attachment with mail adapter ? Do I develop a custom adapter module to use this standard capability ?
    Best Regards,
    Laurent

    Hi Asif,
       Thanks for the help below. I will also try to propose this as part of the low-level design. I'm just thinking that the overall architecture makes it complicated. SAP will send IDOC with the fields to be converted to both XML and MIME attachment in PI. And these data should be both sent by PI to TIBCO. During the message mapping, will PI be able to convert this to the desired format?
      The desired format is like the one below:
    mime-version:1.0
    content-id:"6acecec45db14b70bfad32298bc4134c"
    x-rn-version:RosettaNet/V02.00
    x-rn-response-type:async
    content-type:multipart/related; type="multipart/related"; boundary="c95198da0eb5408ba23f0caee018a88b"
    host: ...
    content-length:35518
    expect:100-continue
    connection:Keep-Alive
    --c95198da0eb5408ba23f0caee018a88b
    =_Part_1418_1240817770.1288816246590
    Content-Type: multipart/related;
         boundary="----=_Part_1417_171409072.1288816246574";
         type="application/xml"
    =_Part_1417_171409072.1288816246574
    Content-Type: application/xml
    Content-Transfer-Encoding: binary
    Content-Location: RN-Preamble
    Content-ID: RN-Preamble.3d1534e0e78911dfbeda001b78be27c2
    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Preamble SYSTEM "Preamble_MS_V02_00.dtd"><Preamble><standardName><GlobalAdministeringAuthorityCode>RosettaNet</GlobalAdministeringAuthorityCode></standardName><standardVersion><VersionIdentifier>V02.00</VersionIdentifier></standardVersion></Preamble>
    =_Part_1417_171409072.1288816246574
    Content-Type: application/xml
    Content-Transfer-Encoding: binary
    Content-Location: RN-Delivery-Header
    Content-ID: RN-Delivery-Header.3d1534e1e78911df8070001b78be27c2
          <XMLTag>insert XML here</XMLTag>
       Thanks.
    Regards,
    Madz

  • Want to Send smartform as pdf attachment with a Email to some mail id

    Hi ,
    I want to send a smartform as a PDF attachment with a mail to a mail id. And I can send a mail with the PDF attachment.
    But I am not able to open the PDF. It is throwing some error (Adobe reader could not open u2018fileu2019 because it is either not a supported file type or because the file has been damaged (for example , it was sent as an email attachment and was not correctly decoded)).
    By debugging I come to know that the file which is generating is in some encoding format.
    Please help me regard this. This is very urgent.
    here is the code,
    Main Program :
    REPORT Ztest_report.
    *--Top Include for Global Data Declarations.
    INCLUDE ztest_report_top.
    *--Form Include for Form Routines.
    INCLUDE ztest_report_form.
    START-OF-SELECTION.
    START-OF-SELECTION.
    *--Display data
      Perform display_data.
    END-OF-SELECTION.
    Top declaration :
    Internal table
    DATA :  i_otfdata TYPE tsfotf,          " Smart Forms: Table OTF
            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
            w_mailaddr TYPE ppfdmailad,
            w_mailtype TYPE so_escape,
            w_mailrecipient TYPE swotobjid,
            w_control 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
            wa_objhead TYPE soli_tab,
    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.
    Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-009.
    PARAMETER:      p_bukrs TYPE bukrs OBLIGATORY,            "Company Code
                    p_belnr TYPE belnr_d OBLIGATORY,          "Document No
                    p_gjahr TYPE gjahr OBLIGATORY,            "document type
                    p_mailid(50) TYPE c OBLIGATORY.
    "Mail Id
    SELECTION-SCREEN END OF BLOCK blk1.
    Form Logic :
    FORM display_data.
    *Local Variable declaration
      DATA: lc_fm TYPE rs38l_fnam,       "local variable to store the
            l_i_document_output_info TYPE ssfcrespd,
            l_i_struc_job_output_info TYPE ssfcrescl,
            l_i_struc_job_output_options TYPE ssfcrescl,
            i_lines TYPE TABLE OF tline WITH HEADER LINE,
            lv_job_output_info      TYPE ssfcrescl,
            lv_document_output_info TYPE ssfcrespd,
            lv_job_output_options   TYPE ssfcresop,
            lv_bin_filesize         LIKE sood-objlen.
    Determine the smartform name
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
           EXPORTING
                formname           = 'ZTEST_SMARTFORM'
           IMPORTING
                fm_name            = lc_fm
           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_control-getotf = 'X'.
      w_control-no_dialog = 'X'.
      w_control-preview = space.
    w_control-device = 'MAIL'.
    Call the smartform and pass the selection screen parameter
      CALL FUNCTION lc_fm
           EXPORTING
                control_parameters = w_control
                output_options     = w_compop
                user_settings      = 'X'
                t_bukrs            = p_bukrs
                t_belnr            = p_belnr
                t_gjahr            = p_gjahr
           IMPORTING
                job_output_info    = l_i_struc_job_output_info
           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.
    Moving the Smart Forms: Table OTF into an internal table
      i_otfdata[] = l_i_struc_job_output_info-otfdata[].
    CONVERT TO OTF TO PDF.
      CALL FUNCTION 'CONVERT_OTF'
           EXPORTING
                format                = 'PDF'
                max_linewidth         = 132
           IMPORTING
                bin_filesize          = lv_bin_filesize
           TABLES
                otf                   = i_otfdata
                lines                 = i_lines
           EXCEPTIONS
                err_max_linewidth     = 1
                err_format            = 2
                err_conv_not_possible = 3
                err_bad_otf           = 4
                OTHERS                = 5.
    IF sy-batch EQ l_c_no.
    To directly view the print-preview in PDF format
      CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
           EXPORTING
                i_otf                    = i_otfdata
           EXCEPTIONS
                convert_otf_to_pdf_error = 1
                cntl_error               = 2
                OTHERS                   = 3.
    For Sending the PDF file to a Mail ID.
    LOOP AT i_lines.
       TRANSLATE i_lines USING '~'.
       CONCATENATE wa_buffer i_lines 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.
      DATA: BEGIN OF zlines OCCURS 0,
      tline TYPE char255,
      END OF zlines.
    *Change the PDF format from 132 to 255.
      CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
           EXPORTING
                transfer_bin                = 'X'
           TABLES
                content_in                  = i_lines
                content_out                 = zlines
           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.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Attachment
      REFRESH: i_reclist,
      i_objtxt,
      i_objbin,
      i_objpack.
      CLEAR wa_objhead.
      i_objbin[] = zlines[].
    Create Message Body Title and Description
      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.
    Main Text
      CLEAR i_objpack-transf_bin.
      i_objpack-head_start = 1.
      i_objpack-head_num = 1.
      i_objpack-body_start = 2.
      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 = 1.
      i_objpack-body_start = 2.
    I_OBJPACK-DOC_TYPE = 'RAW'.
      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 = p_mailid.
      i_reclist-rec_type = 'U'.
      APPEND i_reclist.
    Send new document with attachments via RFC
      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.
        WRITE:/ 'Error When Sending the File', sy-subrc.
      ELSE.
        WRITE:/ 'Mail sent'.
      ENDIF.
    ENDFORM.                    " display_data

    hi,
    i wrote a programm.for me it is working.i think it will help for u.
    DATA: t_otfdata TYPE ssfcrescl,
          t_lines LIKE tline OCCURS 0 WITH HEADER LINE,
          t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
          t_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    Objects to send mail.
    DATA:T_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
         T_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
         T_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
         T_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE.
    DATA: w_filesize TYPE i,
          w_bin_filesize TYPE i,
          wa_ctrlop TYPE ssfctrlop,
          wa_outopt TYPE ssfcompop,
          WA_BUFFER TYPE STRING,          "To convert from 132 to 255
          WA_OBJHEAD TYPE SOLI_TAB,
          WA_DOC_CHNG TYPE SODOCCHGI1,
          W_DATA TYPE SODOCCHGI1.
    DATA: form_name TYPE rs38l_fnam,
          V_LINES_TXT TYPE I,
          V_LINES_BIN TYPE I,
          nast-spras type sy-langu value 'DE'.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = 'ZSR_DEMO1'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
    IMPORTING
       FM_NAME                  = 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.
    wa_ctrlop-LANGU = nast-spras.
    wa_ctrlop-getotf = 'X'.
    wa_ctrlop-no_dialog = 'X'.
    wa_outopt-tdnoprev = 'X'.
    CALL FUNCTION form_name
      EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = wa_ctrlop
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
       OUTPUT_OPTIONS             = wa_outopt
       USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
       JOB_OUTPUT_INFO            = t_otfdata
      JOB_OUTPUT_OPTIONS         =
    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.
    t_otf[] = t_otfdata-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = 'PDF'
       MAX_LINEWIDTH               = 132
      ARCHIVE_INDEX               = ' '
      COPYNUMBER                  = 0
      ASCII_BIDI_VIS2LOG          = ' '
      PDF_DELETE_OTFTAB           = ' '
    IMPORTING
       BIN_FILESIZE                = w_bin_filesize
      BIN_FILE                    =
      TABLES
        OTF                         = t_otf
        LINES                       = t_lines
    EXCEPTIONS
       ERR_MAX_LINEWIDTH           = 1
       ERR_FORMAT                  = 2
       ERR_CONV_NOT_POSSIBLE       = 3
       ERR_BAD_OTF                 = 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.
    loop at t_lines.
    TRANSLATE t_lines USING '~'.
      CONCATENATE WA_BUFFER T_LINES INTO WA_BUFFER.
    ENDLOOP.
    TRANSLATE WA_BUFFER USING '~'.
    DO.
      t_RECORD = WA_BUFFER.
      APPEND t_RECORD.
      SHIFT WA_BUFFER LEFT BY 255 PLACES.
      IF WA_BUFFER IS INITIAL.
        EXIT.
      ENDIF.
    ENDDO.
    Attachment
    REFRESH: T_RECLIST,
    T_OBJTXT,
    T_OBJBIN,
    T_OBJPACK.
    CLEAR WA_OBJHEAD.
    T_OBJBIN[] = T_RECORD[].
    Create Message Body Title and Description
    T_OBJTXT = 'test with pdf-Attachment!'.
    APPEND T_OBJTXT.
    DESCRIBE TABLE T_OBJTXT LINES V_LINES_TXT.
    READ TABLE T_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.
    Main Text
    CLEAR T_OBJPACK-TRANSF_BIN.
    T_OBJPACK-HEAD_START = 1.
    T_OBJPACK-HEAD_NUM = 0.
    T_OBJPACK-BODY_START = 1.
    T_OBJPACK-BODY_NUM = V_LINES_TXT.
    T_OBJPACK-DOC_TYPE = 'RAW'.
    APPEND T_OBJPACK.
    Attachment (pdf-Attachment)
    T_OBJPACK-TRANSF_BIN = 'X'.
    T_OBJPACK-HEAD_START = 1.
    T_OBJPACK-HEAD_NUM = 0.
    T_OBJPACK-BODY_START = 1.
    DESCRIBE TABLE T_OBJBIN LINES V_LINES_BIN.
    READ TABLE T_OBJBIN INDEX V_LINES_BIN.
    T_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
    T_OBJPACK-BODY_NUM = V_LINES_BIN.
    T_OBJPACK-DOC_TYPE = 'PDF'.
    T_OBJPACK-OBJ_NAME = 'smart'.
    T_OBJPACK-OBJ_DESCR = 'test'.
    APPEND T_OBJPACK.
    CLEAR T_RECLIST.
    T_RECLIST-RECEIVER = 'mail id'.
    T_RECLIST-REC_TYPE = 'U'.
    APPEND T_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               = T_OBJPACK
        OBJECT_HEADER              = WA_OBJHEAD
        CONTENTS_BIN               = T_OBJBIN
        CONTENTS_TXT               = T_OBJTXT
        RECEIVERS                  = T_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.
      WRITE:/ 'Error When Sending the File', SY-SUBRC.
    ELSE.
      WRITE:/ 'Mail sent'.
    ENDIF.
    please reward me if helpful.

  • How to get mail to open a PPS attachment with Keynote instead of Preview in OS 10.8.5

    How do I get Keynote to open a PPS attachment in Mail using OS 10.8.5
    It now opens automatically with Preview and I want to change this to Keynote

    One more thing. I know you can do the "get info thing" and then change the "open with" however this only works when I drag the attachment to the desktop NOT in Mail.

  • Mail.app: I can't send attachment with "space" in filename

    Hi.
    I've this kind of problem. I think it is Mail.app problem. The mail isn't sent if the attachment's filename contains "space" (eg: "file name.pdf").
    The same email is sent finw if I use Thunderbird with the same SMTP server (Leopard Server) and from the same machine.
    If the recipinets in local (not relayed over internet) it works well. Otherwise the SMTP server tell me it have lost connection whith relay server (ISP SMTP server).
    I've used Lotus domino Server as SMTP server with the same result.
    If I cut the "space" (' ') in the attachment's filename Mail.app works fine as well.
    HELP!
    thanks.
    P.S.: sorry for my english
    Message was edited by: odolo
    Message was edited by: odolo

    There is a bug which causes the filenames of attachments with a space or an accented character in the name to have characters appended to the filename extension; it may be that it also sometimes stops the attachment from sending. But other people have reported problems with mails with attachments not sending regardless of the filename, so I think the next software update will see some fixes.
    Meanwhile, don't use spaces!
    AK

  • Mail attachment with UDF in SAP PI 7.1

    Hello,
    I need to reproduce this solution in PI 7.1
    /people/samuel.chandrasekaran2/blog/2008/10/06/xi-mail-adapter-dynamically-building-attachment-and-message-body-content-using-a-simple-udf
    It is about  adding lines of a message as an attachment to a mail.
    The UDF works for all elements except the lines for the attachment itself.
    In order to build the content of the attachment (for this particular requirement) they are using a global variable declared and initialized in the global sections.
    But the button for the Java Section to use an imported archive is no longer available in PI.....
    So how to solve that issue?
    I tried to use a graphical variable instead of a global variable but I have no idea how to add the n lines
    from the source message as one import object into the UDF via that graphical variable.
    Your ideas are very appreciated!
    Best Regards
    Dirk

    Hi,
    yes, it is a little bit different. This is the issue.....  
    But I am not sure if your links will help:
    1) /people/william.li/blog/2008/02/13/sap-pi-71-mapping-enhancements-series-using-graphical-variable
    is about a different solution. I do not need to count the number of lines of the source message.
    And the second variable is about concat line by line from unbound node to unbound node.
    My issue is:
    Souce:
    Message line (0...unbound) ! ! ! ! ! ! ! !
    .    ResultLine   (1..1)
    Mapping:
    =>   ResultLine1
           ResultLine2
           ResultLine........          => into UDF to an element  (1..1) in one mapping operation.
    So that all "ResultLine"s are included.
    The result is explained in the given link for Mail attachment with UDF.
    So I am not sure how to use this thread for my issue.
    In the comments of that blog Christoph Gerber writes that the new variable feature can only handle single values.
    So it is not suitable for my purposes as I have a list of values here that needs to be moved into the target message field.
    2) http://wiki.sdn.sap.com/wiki/display/Java/UsingEditJavaSectioninMessageMapping
    shows where to find the button "Java section" which is not available here in 7.1
    3) /people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14
    too is about the nice little button for Java Section that is no longer existing on PI 7.1 screen for mappings.  
    So my issue is: How to replace the Java section function with global variables in PI 7.1?
    Best regards
    Dirk

  • Mail attachment with time stamp

    Hi
    My scenario is Proxy to Mail.
    On receiver side I am getting the data as an attachment but i want that attachment with time stamp.
    How to add time stamp to the attachment in reciever mail adapter.
    Regards
    Sowmya
    Edited by: Sowmya on Aug 28, 2008 12:24 PM

    hi sowmya,
       The bellow link for MessageTransformBean..
      [http://help.sap.com/saphelp_nw70/helpdata/EN/57/0b2c4142aef623e10000000a155106/content.htm]
      In that ContentDisposition is used to fill the value for Attachment file name..
      Its allows the value accordingly "RFC1806" Note..
      RFC1806 allows accordingly RFC822 ..
      Check RFC822 ..
        5.  DATE AND TIME SPECIFICATION
    Regards,
    Prakasu

  • Mail adapter issue with mail attachment

    Hi all,
    I have a scenario mail to file and i have a problem.
    Is it possible, in a sender adapter mail to use the option keep attachment and mail package at the same time ?
    So,is it possible to use the module payloadswapbean and XMLanonymizer in a sender adapter mail in order to suppress a namespace from the attachment in it ?
    Is the option mail package useful if i am using payloadswapbean module ?
    from what i see, It seems that the XMLanonymizer doesn't work for sender mail adapter with attachment. I've tested the configuration on a sender adapter file and works fine.
    Anyone already tested it ?
    Thanks,
    Jean-Philippe
    Edited by: Jean-Philippe PAIN on Feb 9, 2010 5:29 PM

    Hi Stefen,
    Thanks for the answers.
    The question is, whether the payloadswapbean is useful at all in a sender mail scenario.
    I don't understand this one ! Isn't mandatory in sender adapter mail scenario if you want to read your mail attachment ?
    Yes. If you configure the payloadswapbean correct, the XMLanonymizer works on the attachment.
    It is not easy to set the payloadswapbean in a correct way. IPost your parameters here, when it does not work for you.
    Ok. Maybe my configuration is wrong, please tell.
    Processing sequence :
    localejbs/AF_Modules/PayloadSwapBean => 0
    localejbs/AF_Modules/XMLAnonymizerBean => 1
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean =>mail
    module configuration :
    swap.keyName =>Content-Disposition
    swap.keyName => Content-Description
    swap.keyValue=>MailAttachment-1
    swap.keyValue=>attachment;filename="MailAttachment-1.xml"
    anonymizer.acceptNamespaces =>http://namespace ''
    anonymizer.quote => ''
    I am on PI 7.1 version and when i am looking in the monitoring(sxmb_moni), it doesn't seems working.
    Thanks,
    Jean-Philippe
    Edited by: Jean-Philippe PAIN on Feb 10, 2010 10:36 AM

Maybe you are looking for

  • JOURNAL.lgf can take too long

    Hello, We are facing an issue with the JOURNAL.lgf and I would really appreciate your feedback. Our JOURNAL logic generates an additional record with the closing balance, however even though for most of the users, the process of this logic is instant

  • WPAD location in Windows 8.1

    We are retiring our TMG server for internet proxy.  Currently we use WPAD with DHCP option 252 and it has been working well.  However we want to slowly transition over to the new system which does not use proxy.  I have removed the DHCP option for gr

  • Wanted to use ipod classic 120gb between 2 p.c.s

    I wanted to use my ipod on home dell pc, and also at work compac pc; both have windows xp; when i take it from home to work get a message asking if i;d like to restore setting to view my ipod. will i lose all that is currently on my ipod and if i con

  • Credit balance is lower than I expected.

    A week ago I have subscribed skype credit for 10 EUROS. It says the call rates to India are 1.1 cent per minute. Int his case I should get more than 900 minutes for 10 EUROS. I have not used more then 300 minutes till now. But my current skype balanc

  • Major phone problem!!! Please help!

    My iphone was working PERFECTLY today. Tonight, I opened iTunes to sync some new music and had 2 updates available - one was for iTunes, one for iPhone. I docked my phone, installed and ran both updates, and they took FOREVER to run. I was so frustra