Attach GOS attachments with a standard send mail functionality

Hi Folks,
I am here after long time and need your help.
I have a requirement where I need to attach document with a standard send mail functionality.
Below is the details:
From Quality notification 'Action Box', if the user select a perticular action (it is similar to web link), the system is sending a mail to an external mail id provided by the user (In a popup). This mail send is happening through a SAP standard functionality.
Now the requirement is, I need to attach selected file from GOS (generic Object Services) and attach them to the mail. Sending mail should happen through standard functionality.
I want to know below two points:
1) How to get selected files from GOS attachment?
2) How to attach them to mail? (only attach, sending will be done by standard functionality)
Hope I am clear with the requirement.
Please help me to get it resolved.
thanks,
Surajit

1st - analyse fm SO_ATTACHMENT_LIST_READ and table SOOD
and function groups sgos* and SOB2
hope that helps
Andreas

Similar Messages

  • The servlet include a send mail function,and can not retrun immediately!

    In the post/get funtion ,a send mail function is present,and this will make the client wait a long time to continue to browse,how to let it return as soon as possible?

    Not sure I understand your question, but I think you want to know how to handle a lengthly operation (send mail in your case) without making the client wait a long time for a response. If that is the question, you can kick off a new thread to handle the mail sending while replying to the browser client immediately. There's a good intro to threads and examples in the Jave tutorial (http://java.sun.com/docs/books/tutorial/essential/threads/index.html)

  • Unable to open .doc & .docx attachments goes directly to send mail window .pdf opens fine

    I am running Windows Vista Ver. 6.0.6002 Svc pack 2 Build 6002. Tbrd 24.5.0. AVG 2014.0.4592. In the send mail window the attachment is in the attachment box with the correct name on it. Everything worked fine a couple of weeks ago. Any help would be greatly appreciated.
    Rick

    Thank you for your reply but unfortunately that did not help. I have the option set to use Microsoft word as the default program for .doc attachments and now it comes up with the file is possibly corrupt. If I go back to a .doc attachment that I had previously opened it does the same thing in that if I set the option to ask me what to do and I select Word it says the file is corrupt. I just discovered that if I save the attachment to a file then open the saved version with Word it works fine so that to me proves that the file is not corrupted. Now that I know how to get the file to display on my screen I will do that from now on but it is not right.
    Thanks for the help.
    Rick

  • How do I stop duplicate attachments showing up on sending Mail?

    I've just started using Mail, and find that attachments embed themselves in the message I want to send as well as as an attachment. On the other end the document appears to have two attachments, one of which won't open. (Word document, recipient using Windows). Same when I send to myself.
    Also, when I send and receive photos, they are embedded in the message, as well as attached. I want to disable the embedding feature. Can anyone tell me how?
    Thanks, Frances

    The attachments are not embedded. It is called inline or viewed in place which is different.
    When attaching image/photo attachments and smaller PDF attachments (1-2) pages, these type of attachments are shown inline or viewed in place within the body of the message by default which cannot be turned off - when sending and receiving.
    You can control-click on a viewed in place attachment and select View as Icon. Regardless, all Mail.app attachments are sent as true attachments to the message.
    Depending on the recipient's email client and available preference settings, such attachments may appear inline or viewed in place with the message is opened by the recipient (as with the Mail.app) or as attached files only which must be opened separately for which we have no control over.
    I prefer this feature since it ensures that I have selected the correct image/photo attachment before the message is sent and I always add all attachments after I've finished composing the message below all text.
    You can use a 3rd party Mail.app plugin called Mail Attachments Iconizer which can be downloaded at the following link.
    http://lokisw.com/index.php?item=MailAttachmentsIconizer
    Regarding the two attachments that appear, the extra attachment is the Apple resource fork for the file which is invisible to fellow Mac users. This doesn't occur with all Windows users since it depends on the Windows version and email client and version the recipient is running.
    Beginning with Panther (10.3), the Mail.app includes a send Windows Friendly Attachments feature.
    Check Windows users have problems with files I send and be sure to include the filename extensions, such as .doc, in the names of all files you send to Windows recipients. This way the files can be read by a Windows application.

  • Problem with openURL when sending Mail

    Hi All
    I am trying to send mail from my app using
    [[UIApplication sharedApplication] openURL: [NSURL URLWithString:emailData]];
    emailData contains a google URL that i want to send via email:
    http://maps.google.com/maps?f=d&saddr=45.578982,-73.565698&daddr=45.578982,-73.5 65698
    my problem is that on Mail app it is showing on the following portion
    http://maps.google.com/maps?f=d
    i did a couple of tests and find out that the problem is with the "&" i tried & or & did not work cause as soon as it finds teh "&" it drop the whole string that comes after it.
    Any help on how I should format this string to appear correctly on my email will be greatly appreciated
    thx for your help

    You missed the point of my reply. You need to escape anything that you send. When you send 'http://maps.google.com/maps?f=d&saddr=45.578982,-73.565698&daddr=45.578982,-73 .565698' it's just not going to work. As mentioned, you need to Google how to escape variables when sent via GET. Not to mention, your openURL command is wrong as well:
    [UIApplication sharedApplication openURL: NSURL URLWithString:emailData];
    Where emailData is:
    http://maps.google.com/maps?f=d&saddr=45.578982,-73.565698&daddr=45.578982,-73.565698
    will absolutely never work. Check the docs for how to use openURL for sending an email using the mailto: protocol. Also, if the emailData that you send using openURL: doesn't look like the escaped string from this tool: http://www.xs4all.nl/~jlpoutre/BoT/Javascript/Utils/endecode.html you aren't properly escaping your URL params.

  • Sending mail function module problem in WAS.

    We have one custom function module Z_SEND_MAIL_ALL
    which is sending mails successfully with in the SAP 4.7 E system.
    Our function module Z_SEND_MAIL_ALL uses internally function modules like SO_OBJECT_SEND and SO_OBJECT_INSERT...
    Now we copied the same function module Z_SEND_MAIL_ALL into another system which is running in WAS server and
    when we run the function module it seems it is sending as attachment, however when I try to open the attachement...it gives dump. I clicked debugger.
    It shows  while CALL FUNCTION 'TABLE_DECOMPRESS' execution...
    it gives exception ( Error in compressed table ) as below  ...
    <b>raise COMPRESS_ERROR.</b>....
    I don't understand what is the problem ?
    Is it because of WAS is fully unicode compliance,  these function modules are not working . or is there any thing else I can do ....
    YOUR help is highly appreciated and respected.

    You have to declare the table using any specific type.
    The type table in the FM is generic so you can pass any type you need.
    For instance:
    TYPES: BEGIN OF ty_fields,
             fieldname LIKE dfies-fieldname,
           END OF ty_fields,
    TYPES: TY_T_GLU1              LIKE GLU1                     OCCURS 0,
           ty_t_fields            type ty_fields                occurs 0.
      DATA: lt_info_struct_fields TYPE ty_t_fields WITH HEADER LINE,
            lt_matching_fields    TYPE ty_t_fields WITH HEADER LINE.
        CALL FUNCTION 'AS_API_INFOSTRUC_FIND'
             EXPORTING
                  i_fieldcat         = ft_fieldcat-fieldcat
                  i_fields           = ft_fields_filled[]
             IMPORTING
                  e_infostruc        = lv_info_struct_name
                  e_all_fields       = lt_info_struct_fields[]
                  e_matching_fields  = lt_matching_fields[]
             EXCEPTIONS
                  no_infostruc_found = 1.

  • Send Mail Functionality in Siebel.

    Hi,
    In our company the mail is maintained by Google, so we do not have mail server inside the company network. When we try to send mail using the Communication profile in Siebel which is configured with the SMTP information provided by Google. But the mail fails and it asks for SSL which is not installed in Siebel. The F9 functionality works fine with Microsoft Outlook. To send automatic mail using the Outbound communication manager does not work as it does not use the Outlook configuration. So now we are not able to send automatic mail. Kindly let me know is there any other possibility to send automatic mail.
    Rgds
    Vinoth.R

    Hi Vinoth,
    Can you explain what you mean by 'SSL is not configured in the Siebel Server'?
    My understanding is that you don't have to have anything specific configured on the Siebel Server to permit the use of SSL in the connection to the external SMTP server. In the same way I use SSL in my Outlook connection to Googlemail without having to install anything specific on my PC.
    Are you thinking about about the Strong Encryption Pack or something similar?
    Have you tried setting the parameter anyway, just to see what happens?
    Apologies if I'm wrong on this one - I've not used an external SMTP server before so really just trying to rack my brain to help you out with some suggestions.
    Regards,
    mroshaw

  • Help with setting up the mailer function in lookout

    I am trying to get the mailer function working in Lookout. When i enter my SMTP information in Outlook and send a message to my cell phone it works fine.
    When i enter the same SMTP address in the mailer function i get errors saying resolving SMTP server.
    Any suggestions on what i can do to get it working?

    Have you tried both ip address and the computer name?
    Is the mail server in the same network?
    You can try a free smtp server on your local computer and see if it works, such as this one, http://www.softstack.com/freesmtp.html
    Ryan Shi
    National Instruments

  • PDF Attachment problem in Adobe form and send mail is not working

    Dear Experts,
                         Recently i'm facing a problem regarding Adobe form PDF attachment and sending an e-mail along with the PDF attachment to customer mail id.But when i execute the RFC Function module, in customer side no mail is comming. And when i check the transaction SBWP then i found that the PDF attachment hold only 1KB of data which is not right.For that i'm sending my code which i was declared in my program.Can anybody please help me to overcome this problem?
    Warm Regards,
    sameek.
    CLASS cl_bcs DEFINITION LOAD.
      DATA:
      lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
      lo_send_request = cl_bcs=>create_persistent( ).
      data: t_att_content_hex type SOLIX_TAB.
      DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
      DATA: lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
            l_send type ADR6-SMTP_ADDR value 'Already provided an e-mail address here'.
      DATA: lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
      DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
    Message body and subject*
      DATA:
      lt_message_body TYPE bcsy_text VALUE IS INITIAL,
      lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
      APPEND 'Dear,' TO lt_message_body.
      append ' ' to lt_message_body.
      APPEND 'Please fill the attached form and send it back to us.'
      TO lt_message_body.
      append ' ' to lt_message_body.
      APPEND 'Thank You,' TO lt_message_body.
      lo_document = cl_document_bcs=>create_document(
      i_type = 'RAW'
      i_text = lt_message_body
      i_subject = 'Customer Information Form').
      TRY.
          lo_document->add_attachment(
          EXPORTING
          i_attachment_type = 'PDF'
          i_attachment_subject = 'Customer Information Form'
    I_ATTACHMENT_SIZE =*
    I_ATTACHMENT_LANGUAGE = SPACE*
    I_ATT_CONTENT_TEXT =*
    I_ATTACHMENT_HEADER =*
          i_att_content_hex = t_att_content_hex ).
        CATCH cx_document_bcs INTO lx_document_bcs.
      ENDTRY.
    Add attachment*
    Pass the document to send request*
      lo_send_request->set_document( lo_document ).
    Create sender*
      lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
    lo_sender = cl_sapuser_bcs=>create( sy-uname ).*
    Set sender*
      lo_send_request->set_sender(
      EXPORTING
      i_sender = lo_sender ).
    Create recipient*
      lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
    lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).*
    Set recipient*
      lo_send_request->add_recipient(
      EXPORTING
      i_recipient = lo_recipient
      i_express = 'X' ).
    lo_send_request->add_recipient(*
    EXPORTING*
    i_recipient = lo_recipient*
    i_express = 'X' ).*
    Send email*
      lo_send_request->send(
      EXPORTING
      i_with_error_screen = 'X'
      RECEIVING
      result = lv_sent_to_all ).
      COMMIT WORK.
      message 'The Customer Information form has been emailed to the Employee' type 'I'.

    I am also facing issue with email send .
    apex 4.1.1 oracle 11g
    create or replace procedure email ( p_email  in    varchar2)
    is
        l_workspace_id      number;
        l_subject           varchar2(2000);
        l_body              clob;
        l_body_html         clob;
         l_email varchar2(40);
    begin
        l_workspace_id := apex_util.find_security_group_id (p_workspace => 'xyz');
        apex_util.set_security_group_id (p_security_group_id => l_workspace_id);
    l_email:= p_email;
        l_body := ' ';
        l_subject := 'You have new tasks';
        --if l_email=:P3_CONFIRM_EMAIL_ADDRESS is not null then
       -- email( l_email =>:P3_CONFIRM_EMAIL );
    -- end if;
            l_body_html := '<p />The following tasks have been added.';
         apex_mail.send (
                p_to        => l_email ,
                p_from      => '[email protected]',
                p_body      => l_body,
                p_body_html => l_body_html,
                p_subj      => l_subject );
      APEX_MAIL.PUSH_QUEUE;
    end; I also check the log and queue but both are empty,
    select * from
    apex_mail_queue
    select * from
    apex_mail_log Kindly suggest what to do ?
    I also created a process in apex , which call this procedure and pass the email address entered by user.

  • Cannot send a PDF with the Send Mail function

    Send PDF as document fails on Adobe Reader on Ubuntu Linux 12.04 LTS.  Send Link works.

    Its all working now! Clean install No migration. That was the ticket for me. All anomalies are Gone!!

  • Print a image with the standard pdf-print function

    hello,
    we have a Web-Template with a query a chart an the company-image.
    When we want to print the Web-Template with the pdf button, then we get only the query and the chart in the PDF.
    What can I do, that I get also the image in de PDF-Print-Layout?
    I tried it with a .png and a .gif image.
    Thank you very much!
    Best reagards,
    andreas

    hi,
    at the time I have no solution for this problem.

  • Sending mail with multiple attachments in jsp

    hi .I wrote a code to send a mail in jsp.but now i need to send mails with multiple attachments.how can i send mail with multiple attachment.

    Create a separate MimeBodyPart object for each attachment, rather than reusing
    the same one over and over.

  • Sending mail with out attachement

    hi experts,
    what is the function module to send a mail with out attachment?
    i am using this function module.
            CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
              EXPORTING
               DOCUMENT_DATA                    = maildata
               DOCUMENT_TYPE                    = 'RAW'
               PUT_IN_OUTBOX                    = 'X'
               COMMIT_WORK                      = 'X'
              TABLES
               OBJECT_HEADER                    = mailhdr
               OBJECT_CONTENT                   = mailcnt
               RECEIVERS                               = mailrec
             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 
    if i use this function module i will receive mail as an attachment but  my aim is to send mail as message.
    here i will get that message in some file as attachment.
    is  there any other function module to send mail as per my requirement?
    please help me regarding this.
    thanks and regards,
    nag.

    Hi,
    Refer this example.
    *& Report  ZSENDEMAIL                                                  *
    *& Example of sending external email via SAPCONNECT                    *
    REPORT  zsendemail                    .
    PARAMETERS: psubject(40) type c default  'Hello',
                p_email(40)   type c default 'Some email address'.
    data:   it_packing_list like sopcklsti1 occurs 0 with header line,
            it_contents like solisti1 occurs 0 with header line,
            it_receivers like somlreci1 occurs 0 with header line,
            it_attachment like solisti1 occurs 0 with header line,
            gd_cnt type i,
            gd_sent_all(1) type c,
            gd_doc_data like sodocchgi1,
            gd_error type sy-subrc.
    data:   it_message type standard table of SOLISTI1 initial size 0
                    with header line.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Perform populate_message_table.
    *Send email message, although is not sent from SAP until mail send
    *program has been executed(rsconn01)
    PERFORM send_email_message.
    *Instructs mail send program for SAPCONNECT to send email(rsconn01)
    perform initiate_mail_execute_program.
    *&      Form  POPULATE_MESSAGE_TABLE
          Adds text to email text table
    form populate_message_table.
      Append 'Email line 1' to it_message.
      Append 'Email line 2' to it_message.
      Append 'Email line 3' to it_message.
      Append 'Email line 4' to it_message.
    endform.                    " POPULATE_MESSAGE_TABLE
    *&      Form  SEND_EMAIL_MESSAGE
          Send email message
    form send_email_message.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name  = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    Describe the body of the message
      clear it_packing_list.
      refresh it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      describe table it_message lines it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      append it_packing_list.
    Add the recipients email address
      clear it_receivers.
      refresh it_receivers.
      it_receivers-receiver = p_email.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      append it_receivers.
    Call the FM to post the message to SAPMAIL
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = gd_doc_data
                put_in_outbox              = 'X'
           importing
                sent_to_all                = gd_sent_all
           tables
                packing_list               = it_packing_list
                contents_txt               = it_message
                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.
    Store function module return code
      gd_error = sy-subrc.
    Get it_receivers return code
      loop at it_receivers.
      endloop.
    endform.                    " SEND_EMAIL_MESSAGE
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    form initiate_mail_execute_program.
      wait up to 2 seconds.
      if gd_error eq 0.
          submit rsconn01 with mode = 'INT'
                        with output = 'X'
                        and return.
      endif.
    endform.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    Regards,
    Jagadish

  • How to attach & send mail (Excel)

    i want to attach below data in excel and send mail.
    IT_DATA-COL1 = 'Action'.
         APPEND IT_DATA.
         CLEAR IT_DATA.
         IT_DATA-COL1 =  V_DATE.
         APPEND IT_DATA.
         CLEAR IT_DATA.
         IT_DATA-COL1 =  'Execution '.
         IT_DATA-COL2 =   sy-datum.
         APPEND IT_DATA.
         IT_DATA-COL1 = 'No. of pieces = '.
         IT_DATA-COL2 = L_NUM.
         APPEND IT_DATA.
         CLEAR IT_DATA.
         APPEND IT_DATA.
         CLEAR IT_DATA.
         APPEND IT_DATA.
         APPEND IT_DATA.
         IT_DATA-COL1 = 'Number'.
         IT_DATA-COL2 = 'VIp'.
         IT_DATA-COL3 = 'Key '.
         IT_DATA-COL4 = 'Brakery'.
         IT_DATA-COL5 = 'No'.
         IT_DATA-COL6 = 'State'.
         IT_DATA-COL7 = 'Date'.
         IT_DATA-COL8 = ' Date'.
         APPEND IT_DATA.
         CLEAR IT_DATA.
         APPEND IT_DATA.
           LOOP AT IT.
             IT_DATA-COL1 = IT-PROP.
             IT_DATA-COL2 = IT-VIp.
             IT_DATA-COL3 = KEY.
             IT_DATA-COL4 = IT-PLATE..
             IT_DATA-COL5 = V_REQUESTOR.
             IT_DATA-COL6 = V_STATUS .
            IT_DATA-COL7= Date .
           IT_DATA-COL8= DATE.
               APPEND IT_DATA.
             CLEAR IT_DATA.
           ENDLOOP.
           APPEND IT_DATA.
           APPEND IT_DATA.
         ENDIF.

    Hi,
    By the following method you can send email even if the no. of charactes in a line exceeds 255.
    Here I am converting the data to HTML and later sending it in Xcel. This worked for me.
    form email_lgcytrans .
      data:    lv_document_data like sodocchgi1,
               lv_tab_lines     like sy-tabix,
               li_body          type standard table of solisti1,
               lv_body          type solisti1,
               lv_html          like line of i_html,
               li_attach        type standard table of solisti1,
               lv_attach        type solisti1.
    CONSTANTS:
      constants: lc_filetype(3)  type  c value 'XLS',
                 lc_emaildocname like sodocchgi1-obj_name
                                 value 'Legacy Trans',
                 lc_subject      like sodocchgi1-obj_descr value
                  'Discrepant Transactions',
                 lc_filename     like solisti1
                                 value 'HG-DTL DISCREPANT TRANS'.
      if i_row_head[] is initial.
        perform get_column_headers.
    Get the HTML Formatted Data
      call function 'WWW_ITAB_TO_HTML'
        exporting
          table_header = v_html_head
        tables
          html         = i_html
          fields       = i_fields
          row_header   = i_row_head
          itable       = i_dscpren.
    form get_column_headers.
      data : lv_fieldcat  type slis_fieldcat_alv,
             lv_text      type w3head-text,
             lv_tabix     type i.
      loop at i_fieldcat into lv_fieldcat.
        lv_tabix = lv_tabix + 1.
      Get Fieldname
        clear lv_text.
        lv_text = lv_fieldcat-seltext_l.
      Prepare Header Row
        call function 'WWW_ITAB_TO_HTML_HEADERS'
          exporting
            field_nr = lv_tabix
            text     = lv_text
            fgcolor  = 'black'
            bgcolor  = 'cccccc'
            font     = 'Tahoma'
          tables
            header   = i_row_head.
      endloop.
    endform.                    " GET_COLUMN_HEADERS
    form send_email tables li_attach
                           ls_ifmail
                           li_body
                    using  lc_filetype lc_subject lc_filename.
    Local Data for E-mailing
      data : lv_document type sodocchgi1,
             li_pack     type standard table of sopcklsti1,
             lv_pack     type sopcklsti1,
             li_receiver type standard table of somlreci1,
             lv_receiver type somlreci1,
            li_body     type standard table of solisti1,
            lv_body     type solisti1,
             li_objhead  type standard table of solisti1,
             lv_objhead  type solisti1,
             lv_admin    like line of s_ifmail .
      data : lv_lines     type i,
             lv_sent      type sonv-flag.
    Fill Document Data
      lv_document-obj_langu         = sy-langu.
      lv_document-obj_expdat        = sy-datum.
      lv_document-sensitivty        = 'F'.
      lv_document-no_change         = 'X'.
      lv_document-expiry_dat        = sy-datum.
      move lc_subject to lv_document-obj_descr.
      describe table li_body lines lv_lines.
      lv_document-doc_size          = lv_lines * 255.
    *-- Packing Data (for e-mail body)
      lv_pack-transf_bin            = space.
      lv_pack-head_start            = 1.
      lv_pack-head_num              = 0.
      lv_pack-body_start            = 1.
      lv_pack-body_num              = lv_lines.
      lv_pack-doc_type              = 'RAW'.
      append lv_pack to li_pack.
      describe table li_attach lines lv_lines.
    *-- Packing list for email attachment (in XLS format)
      clear lv_pack.
      lv_pack-transf_bin            = 'X'.
      lv_pack-head_start            = 1.
      lv_pack-head_num              = 1.
      lv_pack-body_start            = 1.
      lv_pack-body_num              = lv_lines.
      lv_pack-doc_type              = lc_filetype.
      lv_pack-obj_name              = 'MAIL'.
      lv_pack-doc_size              = lv_lines * 255.
      move lc_filename to lv_pack-obj_descr.
      append lv_pack to li_pack.
    *-- Attachment Header
      move space to lv_objhead-line.
      append lv_objhead to li_objhead.
    *-- Receiver list
      lv_receiver-rec_type           = 'U'.
      lv_receiver-com_type           = 'INT'.
      lv_receiver-notif_del          = 'X'.
      lv_receiver-notif_ndel         = 'X'.
      loop at ls_ifmail  into lv_admin.
        lv_receiver-receiver         = lv_admin-low.
        append lv_receiver to li_receiver.
        clear : lv_receiver-receiver,
                lv_admin.
      endloop.
    *--  E-Mail Document
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        exporting
          document_data              = lv_document
          commit_work                = 'X'
        importing
          sent_to_all                = lv_sent
        tables
          packing_list               = li_pack
          object_header              = li_objhead
          contents_bin               = li_attach
          contents_txt               = li_body
          receivers                  = li_receiver
        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.
        message id sy-msgid type 'I' number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      if lv_sent = 'X'.
        write : / text-t12.
        loop at s_ifmail into lv_admin.
          write : lv_admin-low.
        endloop.
        clear lv_sent.
      endif.
    endform.                    " SEND_EMAIL
    Attach the HTML content
      loop at i_html into lv_html.
        lv_attach = lv_html.
        append lv_attach to li_attach.
        clear : lv_html, lv_attach.
      endloop.  "loop at i_html
    Appending the text of boby
      lv_body-line+0(44)  = 'Please find attached Report of Discrepancies'.
      lv_body-line+45(30) = 'in Transactions'.
      append lv_body to li_body.
    Send the content i_email_input to s_dsmail
        perform send_email tables li_attach s_dsmail li_body
                           using  lc_filetype lc_subject lc_filename.
    endform.                    " EMAIL_LGCYTRANS

  • Attachments in Send Mail step.

    Hi all,
    My WF has 2 User Decisions as its first 2 starting steps where the user attaches word docs.
    Problem: Now dont know how to arry forward these attachments to the SEND Mail task. Unable to locate any User Dcsn. step container element to be bound to WF.
    Kindly help...
    Thanks and Regards,
    Sudipto.

    Hi Amardeep,
    Thanks.
    But cud u plz. be more specific.
    Where do I actually get the attachment to bind with the &attach_object. Actually the user attaches the attachment in the User Decision step. Now how to attach this attachment to my next step of SEND MAIL.
    Regards,
    Sudipto.

Maybe you are looking for