Workflow - Send email with transaction attach or transaction attach link

Hi,
I need to send an email from a WF process to an Outlook/LotusNotes account, this email must have a transaction attach or a transaction attach link.
How I do this?
Thanks,
Jhonny

See the documentation for report program RSWUWFML2. Also search this forum with the program name. This has been discussed a few times before.
Cheers,
Ramki Maley.

Similar Messages

  • How do I send email with pictures attached, using PSE 9 and Windows 7 ?

    How do I send email with pictures attached, using PSE 9 and Windows 7 ?

    Try email attachment workflow in Organizer. http://tv.adobe.com/watch/learn-photoshop-elements-9/sharing-your-images-via-email/
    Thanks
    Andaleeb

  • I have Windows 7, Microsoft Outlook and PSE 13. I have used the "Share photos as embedded images" feature frequently, but today when I went to use it, it wasn't there, only the option to send email with files attached. How do I get back the ability to sen

    I have Windows 7, Microsoft Outlook and PSE 13. I have used the "Share photos as embedded images" feature frequently, but today when I went to use it, it wasn't there, only the option to send email with files attached. How do I get back the ability to send emails with photos embedded. I like adding the frames and backgrounds and I think it's easier for recipients to look at the photos. Thanks for any suggestions of things to try.
    Gail

    I had a similar problem in that my wife's iphone 5 could not send pics with imessage.  Had to set the settings to default to SMS or whatever.  After laboring many hours on the web I coincidentally was on the phone with the internet people to question my internet speed.  They changed the router channel, which is something that I am capable of doing myself.  After that, the pics go over imessage.  My own Iphone didn't have the problem.  We are both latest IOS 7.0.6.

  • I am have trouble sending email with an attachment?

    I am having trouble sending emails with an attachment.  Does anyone have a solution to this problem?

    Impossible to answer with information provided
    Allan

  • Unable to send email with an attachement (photo) through activesync (zarafa) after upgrading to ios8

    Hello,
    I just upgrading to ios 8 (8.0.2) and I am now unable to send email with an attachement (photo) through activesync (zarafa).
    It works fine with smtp or through activesync but without attachement.
    Is there any solution?
    Thx.

    It worked fine with the last version of iOS 7 and still works fine with outlook connected from a PC to the same activesync server.

  • Send email with XMl attachment

    Hi All,
    My requrement are, to send emails to particular person "PDF" attachment and "XML" attachments.
    i did pdf by using convert spool to pef and send email to that vendor.its working .
    But i dnt know how to send email with XML attachment.Is there any function for convert spool to xml and email to that vendor.Please send me code ASAP.
    i have to sumbit this object soon.Please help me regarding this issue.
    Abhi...

    Hi,
       Try this out.
    ISR_FI_SEND_EMAIL
    ISR_FI_SEND_EMAIL_NEW_USER
    SLS_CUST_SEND_EMAIL_TOOL
    OR
    report y_cr17_mail.
    data method1 like sy-ucomm.
    data g_user like soudnamei1.
    data g_user_data like soudatai1.
    data g_owner like soud-usrnam.
    data g_receipients like soos1 occurs 0 with header line.
    data g_document like sood4 .
    data g_header like sood2.
    data g_folmam like sofm2.
    data g_objcnt like soli occurs 0 with header line.
    data g_objhead like soli occurs 0 with header line.
    data g_objpara like selc occurs 0 with header line.
    data g_objparb like soop1 occurs 0 with header line.
    data g_attachments like sood5 occurs 0 with header line.
    data g_references like soxrl occurs 0 with header line.
    data g_authority like sofa-usracc.
    data g_ref_document like sood4.
    data g_new_parent like soodk.
    data: begin of g_files occurs 10 ,
    text(4096) type c,
    end of g_files.
    data : fold_number(12) type c,
    fold_yr(2) type c,
    fold_type(3) type c.
    parameters ws_file(4096) type c default 'c:\debugger.txt'.
    Can me any file fromyour pc ....either xls or word or ppt etc ...
    g_user-sapname = sy-uname.
    call function 'SO_USER_READ_API1'
    exporting
    user = g_user
    PREPARE_FOR_FOLDER_ACCESS = ' '
    importing
    user_data = g_user_data
    EXCEPTIONS
    USER_NOT_EXIST = 1
    PARAMETER_ERROR = 2
    X_ERROR = 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.
    fold_type = g_user_data-outboxfol+0(3).
    fold_yr = g_user_data-outboxfol+3(2).
    fold_number = g_user_data-outboxfol+5(12).
    clear g_files.
    refresh : g_objcnt,
    g_objhead,
    g_objpara,
    g_objparb,
    g_receipients,
    g_attachments,
    g_references,
    g_files.
    method1 = 'SAVE'.
    g_document-foltp = fold_type.
    g_document-folyr = fold_yr.
    g_document-folno = fold_number.
    g_document-objtp = g_user_data-object_typ.
    *g_document-OBJYR = '27'.
    *g_document-OBJNO = '000000002365'.
    *g_document-OBJNAM = 'MESSAGE'.
    g_document-objdes = 'sap-img.com testing by program'.
    g_document-folrg = 'O'.
    *g_document-okcode = 'CHNG'.
    g_document-objlen = '0'.
    g_document-file_ext = 'TXT'.
    g_header-objdes = 'sap-img.com testing by program'.
    g_header-file_ext = 'TXT'.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
    exporting
    method = method1
    office_user = sy-uname
    ref_document = g_ref_document
    new_parent = g_new_parent
    importing
    authority = g_authority
    tables
    objcont = g_objcnt
    objhead = g_objhead
    objpara = g_objpara
    objparb = g_objparb
    recipients = g_receipients
    attachments = g_attachments
    references = g_references
    files = g_files
    changing
    document = g_document
    header_data = g_header
    FOLMEM_DATA =
    RECEIVE_DATA =
    File from the pc to send...
    method1 = 'ATTCREATEFROMPC'.
    g_files-text = ws_file.
    append g_files.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
    exporting
    method = method1
    office_user = g_owner
    ref_document = g_ref_document
    new_parent = g_new_parent
    importing
    authority = g_authority
    tables
    objcont = g_objcnt
    objhead = g_objhead
    objpara = g_objpara
    objparb = g_objparb
    recipients = g_receipients
    attachments = g_attachments
    references = g_references
    files = g_files
    changing
    document = g_document
    header_data = g_header
    method1 = 'SEND'.
    g_receipients-recnam = 'MK085'.
    g_receipients-recesc = 'B'.
    g_receipients-sndex = 'X'.
    append g_receipients.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
    exporting
    method = method1
    office_user = g_owner
    ref_document = g_ref_document
    new_parent = g_new_parent
    importing
    authority = g_authority
    tables
    objcont = g_objcnt
    objhead = g_objhead
    objpara = g_objpara
    objparb = g_objparb
    recipients = g_receipients
    attachments = g_attachments
    references = g_references
    files = g_files
    changing
    document = g_document
    header_data = g_header.
    *-- End of Program
    Also check this links as well.
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
    Hope this will help.
    Regards

  • Set a specific time to send email with an attachment ? Possible ?

    Is it possible to set a specific time to send an email with an attachment automatically ?
    if yes, what is the trick for Mail 4.4.
    Thanks in Advance.

    Open Automator, click on Mail on the left pane and look around. The description of each action is pretty good.
    Pretty much your workflow should look like something like this:
    *Get specified finder items
    *New mail message
    *Send outgoing messages
    Message was edited by: WBW

  • Send Email with Excel attachment with formatting(bold, color) in Background

    Hi,
    I have requirement wherein I have to send an email with excel attachment with proper formatting of certain fields in the excel sheet like making it bold or setting different color. The data is available in an internal table. Just to to format it and send an email when the program is executed in background mode.
    Any pointers on this would be highly appreciated!
    Thanks,
    Anil.

    I  resolved my own problem using the BCS_EXAMPLE_7 program as sample.

  • Send Email with Multiple Attachment

    Hi,
    How do you send an email with multiple attachment of different types thru SO_NEW_DOCUMENT_ATT_SEND_API1?
    Please help.
    Tyken

    Hi,
    Try this code.
    This program will allowed you to send email with attachment.
    First, specify the attachment file from your local hardisk and execute.
    Next, specify the sender email address and click the send button.
    Written by : SAP Basis, ABAP Programming and Other IMG Stuff
                   http://www.sap-img.com
    report y_cr17_mail.
    data method1 like sy-ucomm.
    data g_user like soudnamei1.
    data g_user_data like soudatai1.
    data g_owner like soud-usrnam.
    data g_receipients like soos1 occurs 0 with header line.
    data g_document like sood4 .
    data g_header like sood2.
    data g_folmam like sofm2.
    data g_objcnt like soli occurs 0 with header line.
    data g_objhead like soli occurs 0 with header line.
    data g_objpara  like selc occurs 0 with header line.
    data g_objparb  like soop1 occurs 0 with header line.
    data g_attachments like sood5 occurs 0 with header line.
    data g_references like soxrl occurs 0 with header line.
    data g_authority like sofa-usracc.
    data g_ref_document like sood4.
    data g_new_parent like soodk.
    data: begin of g_files occurs 10 ,
      text(4096) type c,
       end of g_files.
    data : fold_number(12) type c,
           fold_yr(2) type c,
           fold_type(3) type c.
    parameters ws_file(4096) type c default 'c:\debugger.txt'.
    Can me any file fromyour pc ....either xls or word or ppt etc ...
    g_user-sapname = sy-uname.
    call function 'SO_USER_READ_API1'
    exporting
       user                            = g_user
       PREPARE_FOR_FOLDER_ACCESS       = ' '
    importing
       user_data                       = g_user_data
    EXCEPTIONS
       USER_NOT_EXIST                  = 1
       PARAMETER_ERROR                 = 2
       X_ERROR                         = 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.
    fold_type = g_user_data-outboxfol+0(3).
    fold_yr = g_user_data-outboxfol+3(2).
    fold_number =  g_user_data-outboxfol+5(12).
    clear g_files.
    refresh : g_objcnt,
      g_objhead,
      g_objpara,
      g_objparb,
      g_receipients,
      g_attachments,
      g_references,
      g_files.
    method1 = 'SAVE'.
    g_document-foltp  = fold_type.
    g_document-folyr   = fold_yr.
    g_document-folno   = fold_number.
    g_document-objtp   = g_user_data-object_typ.
    *g_document-OBJYR   = '27'.
    *g_document-OBJNO   = '000000002365'.
    *g_document-OBJNAM = 'MESSAGE'.
    g_document-objdes   = 'sap-img.com testing by program'.
    g_document-folrg   = 'O'.
    *g_document-okcode   = 'CHNG'.
    g_document-objlen = '0'.
    g_document-file_ext = 'TXT'.
    g_header-objdes =  'sap-img.com testing by program'.
    g_header-file_ext = 'TXT'.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
      exporting
        method             = method1
       office_user        = sy-uname
       ref_document       = g_ref_document
       new_parent         =  g_new_parent
    importing
       authority          =  g_authority
    tables
       objcont            = g_objcnt
       objhead            = g_objhead
       objpara            = g_objpara
       objparb            = g_objparb
       recipients         = g_receipients
       attachments        = g_attachments
       references         = g_references
       files              = g_files
      changing
        document           = g_document
       header_data        = g_header
      FOLMEM_DATA        =
      RECEIVE_DATA       =
    File from the pc to send...
    method1 = 'ATTCREATEFROMPC'.
    g_files-text = ws_file.
    append g_files.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
      exporting
        method             = method1
       office_user        = g_owner
       ref_document       = g_ref_document
       new_parent         =  g_new_parent
    importing
       authority          =  g_authority
    tables
       objcont            = g_objcnt
       objhead            = g_objhead
       objpara            = g_objpara
       objparb            = g_objparb
       recipients         = g_receipients
       attachments        = g_attachments
       references         = g_references
       files              = g_files
      changing
        document           = g_document
       header_data        = g_header
    method1 = 'SEND'.
    g_receipients-recnam = 'MK085'.
    g_receipients-recesc = 'B'.
    g_receipients-sndex = 'X'.
    append  g_receipients.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
      exporting
        method             = method1
       office_user        = g_owner
       ref_document       = g_ref_document
       new_parent         =  g_new_parent
    importing
       authority          =  g_authority
    tables
       objcont            = g_objcnt
       objhead            = g_objhead
       objpara            = g_objpara
       objparb            = g_objparb
       recipients         = g_receipients
       attachments        = g_attachments
       references         = g_references
       files              = g_files
      changing
        document           = g_document
       header_data        = g_header.
    *-- End of Program
    Reward pts if usefull.
    Regards,
    Dhan

  • Send email with PDF attachements (Smartform/SAP script)

    Hello All,
    I have 3 existing programs A, B & C whose output is in SAP Script/Smartform. Now I need to create new program D which needs to execute program A, B & C and then convert their smartform/SAP script output into PDF format and send email with attachements (PDF files). Any pointers how I can proceed. Thanks a lot.

    hi Sarita,
      v_ctrlparams-no_dialog = 'X'.
      v_ctrlparams-getotf = 'X'.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname = 'Smartform name'
        IMPORTING
          fm_name  = v_func_mod.
      CALL FUNCTION v_func_mod
        EXPORTING
          control_parameters = v_ctrlparams
        IMPORTING
          job_output_info    = v_joboutput
        TABLES
          t_nonsigner        = t_nonsigner.
    fill the document
      doc_chng-obj_name = 'Descriptoipn'.
    Fill the subject line
    doc_chng-obj_descr = 'Manpowe'.
      doc_chng-obj_descr = 'Reminder .
      doc_chng-sensitivty = 'P'.
    Fill the content of the mail
      objcont = 'Dear all,'.
      APPEND objcont.
      CLEAR objcont.
      APPEND objcont.
      CLEAR objcont.
      objcont =
    'The manpower sign-off is pending for the list of employees as per th' &
    'e attached sheet.'
      APPEND objcont.
      CLEAR objcont.
      APPEND objcont.
      CLEAR objcont.
      objcont =
      'Please click on the following link for the manpower sign-off:'.
      APPEND objcont.
      CLEAR objcont.
      APPEND objcont.
      CLEAR objcont.
      DESCRIBE TABLE objcont LINES entries.
      READ TABLE objcont INDEX entries.
      doc_chng-doc_size = ( entries - 1 ) * 255 + STRLEN( objcont ).
    Creating the entry for the compressed document
      CLEAR objpack-transf_bin.
      objpack-head_start = 1.
      objpack-head_num   = 0.
      objpack-body_start = 1.
      objpack-body_num   = entries.
      objpack-doc_type   = 'RAW'.
      APPEND objpack.
    Creating the document attachment
    (Assume the data in OBJBIN are given in BMP format)
      LOOP AT v_joboutput-otfdata INTO wa_otfdata.
        APPEND wa_otfdata TO objbin.
        CLEAR wa_otfdata.
      ENDLOOP.
      DESCRIBE TABLE objbin LINES tab_lines.
      objhead = 'NonSignerDetails.otf'. APPEND objhead.
    Creating the entry for the compressed attachment
      objpack-transf_bin = 'X'.
      objpack-head_start = 1.
      objpack-head_num   = 1.
      objpack-body_start = 1.
      objpack-body_num   = tab_lines.
      objpack-doc_type   = 'OTF'.
      objpack-obj_name   = 'ATTACHMENT'.
      objpack-obj_descr = 'NonSignerDetails'.
      objpack-doc_size   = tab_lines * 255.
      APPEND objpack.
    Sending the document
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = doc_chng
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = objpack
          object_header              = objhead
          contents_bin               = objbin
          contents_txt               = objcont
          receivers                  = reclist
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          OTHERS                     = 99.
    hope this will help u..
    regards,
    Santosh Thorat

  • Sending email with calendar attachment

    Hi folks
    I know that is is possible to send emails from ABAP with attachments, but is it possible to have a calendar file (eg. .cal or .vcs) as attachment?
    Thanks in Advance
    Anton Kruse

    For those interested...
    The VCALENDAR section must include:
    METHOD:PUBLISH and
    CALSCALE:GREGORIAN
    Each VEVENT section must include:
    DTSTAMP and
    UID values.
    After that it imports just fine. So the modified example that works looks like this:
    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//linxas/workflow//NONSGML v1.0//EN
    METHOD:PUBLISH
    CALSCALE:GREGORIAN
    BEGIN:VEVENT
    UID:[email protected]
    DTSTART:20070714T170000Z
    DTEND:20070715T035959Z
    DTSTAMP:20070620T140000Z
    SUMMARY:Bastille Day Party
    DESCRIPTION:Bastille Day Party Baby
    END:VEVENT
    END:VCALENDAR

  • Issue in Sending email with EXCEL attachment

    Hi,
    Im using the FM SO_NEW_DOCUMENT_ATT_SEND_API1 for sending emails to a list of recipients with an excel attachment. In the attachment data, as the field length is 255 for the structure SOLISTI1, for the records having more than 255 characters, data is being truncated. I did a search in this forum and done some changes , still it is not working properly.
    I have used SCMS_TEXT_TO_XSTRING, SCMS_XSTRING_TO_BINARY FMs for converting the data to hexa format. This case, records having more than 255 are displayed properly in the attachment, but there are blank lines inserted between two records.
    Please suggest me to resolve this isssue.
    Thanks in advance.
    Jayashree

    Hi Jayashree,
    you might want to check out the example link by Saso in his post Send external email from within ABAP program to xls.
    For the rest I can only guess that there might be some issues with the format you use for Excel. In case of empty lines and using a text format for Excel the issue is in most cases that there are too many carriage return line feeds in the text fiel (cl_abap_char_utilities=>cr_lf).
    Hope that helps.
    Best Regards
    Michael

  • Send email with excel attachment in outlook structure - SAP 6.0

    Hello experts..
    I need send a email with a excel attachment and use the signature in outlook to send.
    The attachment will be create in the process of send email program.
    Is it possible?
    How can I created and attach in the same process?
    How can I use the outlook strutucture to send a email?

    I  resolved my own problem using the BCS_EXAMPLE_7 program as sample.

  • Command to send email with graphic attachment

    Which command would you recommend to send an email from the commandline with a picture attachment? I have read that the "mail" command does not handle attachments.

    Hi Mahongue,
       I apologize for the late reply but that's part of the difficulties associated with posing the questions in so many threads. OK, I confess; I am also very late in reading Michael's link. Of course I wouldn't have recognized the script before answering on another of your threads. The script in the MacOSXHint to which Michael linked is a version of Dave Wotton's mail_files script to which you linked. Thus, I see now why you didn't know how to do that in Perl. Therefore I did a little searching for you.
       It seems as though the simplest way of e-mailing an attachment in Perl is with MIME::Lite. That isn't installed by default but is easily installed with the CPAN shell. The Perl script that I found most often is mailattach, which uses MIME::Lite. You can find a large number of such scripts at the Perl Archive: Emailing/With Attachments. However, possibly my favorite discussion of it was found on a page about How to send email attachments using Perl / MIME::Lite. There is a very simple example on that page.
       MIME::Lite will not only encode the attachment and include it in the e-mail message, it will also send the message. There are several other Perl packages that can send attachments and most of them probably also send the message but that's trivial to do with Perl regardless. One of the examples I found even invoked sendmail from within the Perl.
    Gary
    ~~~~
       You're all clear now, kid. Now blow this thing so we can
       all go home.
             -- Han Solo

  • Send email with an attachment

    Hello Experts
    I have created one ALV report.
    Now, my requirement is that
    1. While selecting one checkbox (Send e-mail), I want to send e-mail while running this report in background.
    2. Report should be Excel or text as an attachment of e-mail
    Can we do that?
    Points will be awarder immediately.
    Regards
    n.master

    Hi
    The code below will send the mail with PDF attachment.. you can modify the same for your txt format too..
    but PDF is preffered as it is better in its look and feel..
    *&      Form  Spool_to_mail
       Getting the Spool number and the file in pdf format to given
       EmailID
       email---->  Email id
       SPOOL---->  Spool No
    FORM spool_to_mail USING p_email TYPE char255
                             p_spool TYPE sy-spono.
      DATA:    lv_arcpar TYPE arc_params,
               lv_print_parms TYPE pri_params,
               lv_bytecount   TYPE i,
               lv_rqident     TYPE tsp01-rqident,
               lv_mi_rqident   TYPE  tsp01-rqident,
               lv_text TYPE pri_params-prtxt.   "List Text
      DATA:    lv_gd_buffer TYPE string.
      DATA :   lt_mess_att TYPE STANDARD TABLE OF solisti1,
               lt_mtab_pdf TYPE STANDARD TABLE OF tline,
               lt_objpack  TYPE STANDARD TABLE OF sopcklsti1,
               lt_objtxt   TYPE STANDARD TABLE OF solisti1,
               lt_objbin   TYPE STANDARD TABLE OF solisti1,
               lt_reclist  TYPE STANDARD TABLE OF somlreci1,
               lt_doc_chng TYPE  sodocchgi1,
               lt_objhead TYPE soli_tab,
               lv_l_attachment  TYPE i,
               lv_l_testo TYPE i.
      DATA:  lwa_mtab_pdf TYPE tline,
             lwa_objpack  TYPE sopcklsti1,
             lwa_mess_att TYPE solisti1,
             lwa_objtxt   TYPE solisti1,
             lwa_objbin  TYPE solisti1,
             lwa_reclist TYPE somlreci1.
      DATA : lv_val(1).
      CONSTANTS : lc_lines TYPE pri_params-linct VALUE 65,  "Line count
                  lc_rows  TYPE pri_params-linsz VALUE 255,  "Rows
                  lc_temp_print_paart TYPE pri_params-paart VALUE
                  'X_65_255'.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          no_dialog              = 'X'
        IMPORTING
          out_parameters         = lv_print_parms
          out_archive_parameters = lv_arcpar
          valid                  = lv_val
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 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.
      lv_print_parms-paart = lc_temp_print_paart.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          in_archive_parameters  = lv_arcpar
          in_parameters          = lv_print_parms
          layout                 = 'X_65_255'
          line_count             = lc_lines
          line_size              = lc_rows
          list_text              = lv_text
          no_dialog              = 'X'
        IMPORTING
          out_archive_parameters = lv_arcpar
          out_parameters         = lv_print_parms
          valid                  = lv_val
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 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.
      lv_mi_rqident = p_spool.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid              = lv_mi_rqident
          no_dialog                = 'X'
          dst_device               = lv_print_parms-pdest
        IMPORTING
          pdf_bytecount            = lv_bytecount
          pdf_spoolid              = lv_rqident
        TABLES
          pdf                      = lt_mtab_pdf
        EXCEPTIONS
          err_no_abap_spooljob     = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_destdevice       = 5
          user_cancelled           = 6
          err_spoolerror           = 7
          err_temseerror           = 8
          err_btcjob_open_failed   = 9
          err_btcjob_submit_failed = 10
          err_btcjob_close_failed  = 11
          OTHERS                   = 12.
      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 lt_mtab_pdf INTO lwa_mtab_pdf.
        TRANSLATE lwa_mtab_pdf USING ' ~'.
        CONCATENATE lv_gd_buffer lwa_mtab_pdf INTO lv_gd_buffer.
        CLEAR lwa_mtab_pdf.
      ENDLOOP.
      TRANSLATE lv_gd_buffer USING '~ '.
      DO.
        lwa_mess_att = lv_gd_buffer.
        APPEND lwa_mess_att TO lt_mess_att.
        CLEAR lwa_mess_att.
        SHIFT lv_gd_buffer LEFT BY 255 PLACES.
        IF lv_gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
      CLEAR:  lwa_reclist, lt_reclist[],
              lt_objhead, lt_objhead[],
              lwa_objtxt,  lt_objtxt[],
              lwa_objbin,  lt_objbin[],
              lwa_objpack, lt_objpack[].
    Object with PDF.
      "   CLEAR LT_OBJBIN.
      REFRESH lt_objbin.
      lt_objbin[] = lt_mess_att[].
      DESCRIBE TABLE  lt_objbin LINES lv_l_attachment.
    Object with main text of the mail.
      lwa_objtxt = ''.
      APPEND lwa_objtxt TO lt_objtxt.
      CLEAR lwa_objtxt.
      DESCRIBE TABLE lt_objtxt LINES lv_l_testo.
    Document information.
      lt_doc_chng-obj_name   = 'STATUS_REPORT'.
      lt_doc_chng-expiry_dat = sy-datum + 10.
      lt_doc_chng-obj_descr  = 'Generated File'.                "#EC NOTEXT
      lt_doc_chng-sensitivty = 'F'.
      lt_doc_chng-sensitivty = 'O'.
      lt_doc_chng-obj_prio   = '1'.
      lt_doc_chng-doc_size   = lv_l_testo * 255.
    Pack to main body.
      CLEAR lwa_objpack-transf_bin.
      lwa_objpack-head_start = 1.
      lwa_objpack-head_num   = 0.
      lwa_objpack-body_start = 1.
      lwa_objpack-body_num   = lv_l_testo.
      lwa_objpack-doc_type   = 'RAW'.
      APPEND lwa_objpack TO lt_objpack.
      CLEAR lwa_objpack.
    Pack to PDF.
      lwa_objpack-transf_bin = 'X' .
      lwa_objpack-head_start = 1.
      lwa_objpack-head_num   = 1.
      lwa_objpack-body_start = 1.
      lwa_objpack-body_num   = lv_l_attachment.
      lwa_objpack-doc_type   = 'PDF'.
      lwa_objpack-obj_name   ='SPOOL'.
      lwa_objpack-obj_descr = 'Generated File details'.         "#EC NOTEXT
      lwa_objpack-doc_size = lv_l_attachment * 255.
      APPEND lwa_objpack TO lt_objpack.
      CLEAR lwa_objpack.
      CLEAR lwa_reclist.
      lwa_reclist-copy = 'X'.
    e-mail receivers.
      lwa_reclist-receiver   = p_email.
      lwa_reclist-rec_type   = 'U'.
      lwa_reclist-notif_del  = 'X'.
      lwa_reclist-notif_ndel = 'X'.
      APPEND lwa_reclist TO lt_reclist.
    funcion module for sending email.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = lt_doc_chng
          put_in_outbox              = ' '
          commit_work                = 'X'
        TABLES
          packing_list               = lt_objpack
          object_header              = lt_objhead
          contents_bin               = lt_objbin
          contents_txt               = lt_objtxt
          receivers                  = lt_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.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      REFRESH : lt_objpack, lt_objhead, lt_objbin, lt_objtxt,
               lt_reclist.
    ENDFORM. "Spool_to_mail

Maybe you are looking for

  • Can I unlocked an iphone 4s from Verizone to Movistar Phone Line?

    Dear,  can you help me with this please? I have an Iphone 4S. I want to know if This is Unlocked, or If this is Locked, and also I wonder, If my Phone is Locked, can I unloked, or can you unlocked If I get you the model and all the information about

  • Cap. 5 -- Shuffled Answers of varying lengths not vertically aligning

    I created a question pool all mutiple choice and have the answers in each question slide set to shuffle.  The answers on some slides are different lengths (some one line, some two).  I have tried to make all of them the same size, align vertically, h

  • Optimal Drive and Application Setup

    Good day all.   First off I apologize if this is the wrong section for posting this.  This question is not for any one specific app but more for the best setup across the entire suite. I have been a member of the Adobe Suites for quite a few years bu

  • Oracle - CCMS Monitor Templates

    Hi, In RZ20, The Oracle (Tablespaces) monitor templates are not available under Database. And the MTE class CCMS_DB_mcmtc is not there in the list. How to Maintain the data for this MTE class. Is it possible to create new MTE class.? Please Advice. T

  • Controlling a 24V .2A motor

    I had no answer on getting a MID-7654 to control a 24V, .2A servo, so I thought I would ask it a different way. Is there any way at all to control a 24V, .2A servo through LabVIEW? I have found quite a few sites with stand alone controller/drivers, b