Need to send my ALV report via Email.

hi
I have this ALV report. I know I can go up to the toolbar and email the report manually to the user. But I am looking for a code to do that automatically. meaning When I run the report in the selection screen i will provide the email address and the report after its ran it should also email that (when its done manually it sends the attachment as an PDF, which i have no problem with) report as PDF.
Please help me with the code i need to use..
I tried with the following but the program crashes
CALL FUNCTION 'RFC_MAIL' DESTINATION 'LOCAL_EXEC'
EXPORTING USER = '[email protected]'
TABLES MAIL = REC.

You can output the report to a spool and then convert the spool to PDF using standard FM <b>CONVERT_ABAPSPOOLJOB_2_PDF</b>. Then use FM <b>SO_DOCUMENT_SEND_API1</b> to attach the pdf data in an outgoing email.
Here is the sample codes:
*& Report  ZEMAILPDF                                                *
*& Converts spool request into PDF document and emails it to           *
*& recipicant.                                                         *
*& Execution                                                           *
*& This program can be run in background or online and a spool request *
*& will still be created                                               *
REPORT  zemailpdf.
PARAMETER: p_email1 LIKE somlreci1-receiver
                                    DEFAULT '[email protected]',
           p_sender LIKE somlreci1-receiver
                                    DEFAULT ''[email protected]'',
           p_delspl  AS CHECKBOX,
           p_online no-display.
*DATA DECLARATION
DATA: gd_recsize TYPE i.
* Spool IDs
TYPES: BEGIN OF t_tbtcp.
        INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
      wa_tbtcp TYPE t_tbtcp.
* Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
      gd_eventparm LIKE tbtcm-eventparm,
      gd_external_program_active LIKE tbtcm-xpgactive,
      gd_jobcount LIKE tbtcm-jobcount,
      gd_jobname LIKE tbtcm-jobname,
      gd_stepcount LIKE tbtcm-stepcount,
      gd_error    TYPE sy-subrc,
      gd_reciever TYPE sy-subrc.
DATA:  w_recsize TYPE i,
       w_spool_nr like sy-spono.
*       %_print LIKE pri_params.
DATA: gd_subject   LIKE sodocchgi1-obj_descr,
      it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
      it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
      gd_sender_type     LIKE soextreci1-adr_typ,
      gd_attachment_desc TYPE so_obj_nam,
      gd_attachment_name TYPE so_obj_des.
* Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
      gd_destination LIKE rlgrap-filename,
      gd_bytecount LIKE tst01-dsize,
      gd_buffer TYPE string.
* Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
        INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE  sy-sysid VALUE 'DEV',
           c_no(1)     TYPE c   VALUE ' ',
           c_device(4) TYPE c   VALUE 'LOCL'.
*START-OF-SELECTION.
START-OF-SELECTION.
* Write statement to represent report output. Spool request is created
* if write statement is executed in background. This could also be an
* ALV grid which would be converted to PDF without any extra effort
  WRITE 'Hello World'.
  new-page.
  commit work.
  new-page print off.
  If p_online = 'X'.
*   Processing performed when program calls itself when run online 
    gd_spool_nr = sy-spono.
    EXPORT gd_spool_nr TO MEMORY ID 'SPOOLTOPDF'.
    EXIT.
  endif.
  IF sy-batch EQ 'X'.
    PERFORM get_job_details.
    PERFORM obtain_spool_id.
  ELSE.
    gd_spool_nr = sy-spono.
* If executed online, it submits a program to perform the write statements
* instructing it to create a spool request, this could be another program
* which just performs the write statements and then exports sy-spono
* to memory. But in this example it calls itself passing X to parameter
* p_online, which takes it down an alternative procesing path.
    submit ZSPOOLTOPDF2
           with p_online = 'X'
           to sap-spool
           spool parameters   %_print
*           archive parameters %_print
           without spool dynpro
           and return.
  ENDIF.
* Get spool id from program called above
  IMPORT gd_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
  PERFORM convert_spool_to_pdf.
  PERFORM process_email.
  if p_delspl EQ 'X'.
    PERFORM delete_spool.
  endif.
  IF sy-sysid = c_dev.
    wait up to 5 seconds.
    SUBMIT rsconn01 WITH mode   = 'INT'
                    WITH output = 'X'
                    AND RETURN.
  ENDIF.
*       FORM obtain_spool_id                                          *
FORM obtain_spool_id.
  CHECK NOT ( gd_jobname IS INITIAL ).
  CHECK NOT ( gd_jobcount IS INITIAL ).
  SELECT * FROM  tbtcp
                 INTO TABLE it_tbtcp
                 WHERE      jobname     = gd_jobname
                 AND        jobcount    = gd_jobcount
                 AND        stepcount   = gd_stepcount
                 AND        listident   <> '0000000000'
                 ORDER BY   jobname
                            jobcount
                            stepcount.
  READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
  IF sy-subrc = 0.
    message s004(zdd) with gd_spool_nr.
    gd_spool_nr = wa_tbtcp-listident.
    MESSAGE s004(zdd) WITH gd_spool_nr.
  ELSE.
    MESSAGE s005(zdd).
  ENDIF.
ENDFORM.
*       FORM get_job_details                                          *
FORM get_job_details.
* Get current job details
  CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
       IMPORTING
            eventid                 = gd_eventid
            eventparm               = gd_eventparm
            external_program_active = gd_external_program_active
            jobcount                = gd_jobcount
            jobname                 = gd_jobname
            stepcount               = gd_stepcount
       EXCEPTIONS
            no_runtime_info         = 1
            OTHERS                  = 2.
ENDFORM.
*       FORM convert_spool_to_pdf                                     *
FORM convert_spool_to_pdf.
  CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
       EXPORTING
            src_spoolid              = gd_spool_nr
            no_dialog                = c_no
            dst_device               = c_device
       IMPORTING
            pdf_bytecount            = gd_bytecount
       TABLES
            pdf                      = it_pdf_output
       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.
  CHECK sy-subrc = 0.
* Transfer the 132-long strings to 255-long strings
  LOOP AT it_pdf_output.
    TRANSLATE it_pdf_output USING ' ~'.
    CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
  ENDLOOP.
  TRANSLATE gd_buffer USING '~ '.
  DO.
    it_mess_att = gd_buffer.
    APPEND it_mess_att.
    SHIFT gd_buffer LEFT BY 255 PLACES.
    IF gd_buffer IS INITIAL.
      EXIT.
    ENDIF.
  ENDDO.
ENDFORM.
*       FORM process_email                                            *
FORM process_email.
  DESCRIBE TABLE it_mess_att LINES gd_recsize.
  CHECK gd_recsize > 0.
  PERFORM send_email USING p_email1.
*  perform send_email using p_email2.
ENDFORM.
*       FORM send_email                                               *
*  -->  p_email                                                       *
FORM send_email USING p_email.
  CHECK NOT ( p_email IS INITIAL ).
  REFRESH it_mess_bod.
* Default subject matter
  gd_subject         = 'Subject'.
  gd_attachment_desc = 'Attachname'.
*  CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
  it_mess_bod        = 'Message Body text, line 1'.
  APPEND it_mess_bod.
  it_mess_bod        = 'Message Body text, line 2...'.
  APPEND it_mess_bod.
* If no sender specified - default blank
  IF p_sender EQ space.
    gd_sender_type  = space.
  ELSE.
    gd_sender_type  = 'INT'.
  ENDIF.
* Send file by email as .xls speadsheet
  PERFORM send_file_as_email_attachment
                               tables it_mess_bod
                                      it_mess_att
                                using p_email
                                      'Example .xls documnet attachment'
                                      'PDF'
                                      gd_attachment_name
                                      gd_attachment_desc
                                      p_sender
                                      gd_sender_type
                             changing gd_error
                                      gd_reciever.
ENDFORM.
*       FORM delete_spool                                             *
FORM delete_spool.
  DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
  ld_spool_nr = gd_spool_nr.
  CHECK p_delspl <> c_no.
  CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
       EXPORTING
            spoolid = ld_spool_nr.
ENDFORM.
*&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
*       Send email
FORM send_file_as_email_attachment tables it_message
                                          it_attach
                                    using p_email
                                          p_mtitle
                                          p_format
                                          p_filename
                                          p_attdescription
                                          p_sender_address
                                          p_sender_addres_type
                                 changing p_error
                                          p_reciever.
  DATA: ld_error    TYPE sy-subrc,
        ld_reciever TYPE sy-subrc,
        ld_mtitle LIKE sodocchgi1-obj_descr,
        ld_email LIKE  somlreci1-receiver,
        ld_format TYPE  so_obj_tp ,
        ld_attdescription TYPE  so_obj_nam ,
        ld_attfilename TYPE  so_obj_des ,
        ld_sender_address LIKE  soextreci1-receiver,
        ld_sender_address_type LIKE  soextreci1-adr_typ,
        ld_receiver LIKE  sy-subrc.
data:   t_packing_list like sopcklsti1 occurs 0 with header line,
        t_contents like solisti1 occurs 0 with header line,
        t_receivers like somlreci1 occurs 0 with header line,
        t_attachment like solisti1 occurs 0 with header line,
        t_object_header like solisti1 occurs 0 with header line,
        w_cnt type i,
        w_sent_all(1) type c,
        w_doc_data like sodocchgi1.
  ld_email   = p_email.
  ld_mtitle = p_mtitle.
  ld_format              = p_format.
  ld_attdescription      = p_attdescription.
  ld_attfilename         = p_filename.
  ld_sender_address      = p_sender_address.
  ld_sender_address_type = p_sender_addres_type.
* Fill the document data.
  w_doc_data-doc_size = 1.
* Populate the subject/generic message attributes
  w_doc_data-obj_langu = sy-langu.
  w_doc_data-obj_name  = 'SAPRPT'.
  w_doc_data-obj_descr = ld_mtitle .
  w_doc_data-sensitivty = 'F'.
* Fill the document data and get size of attachment
  CLEAR w_doc_data.
  READ TABLE it_attach INDEX w_cnt.
  w_doc_data-doc_size =
     ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
  w_doc_data-obj_langu  = sy-langu.
  w_doc_data-obj_name   = 'SAPRPT'.
  w_doc_data-obj_descr  = ld_mtitle.
  w_doc_data-sensitivty = 'F'.
  CLEAR t_attachment.
  REFRESH t_attachment.
  t_attachment[] = it_attach[].
* Describe the body of the message
  CLEAR t_packing_list.
  REFRESH t_packing_list.
  t_packing_list-transf_bin = space.
  t_packing_list-head_start = 1.
  t_packing_list-head_num = 0.
  t_packing_list-body_start = 1.
  DESCRIBE TABLE it_message LINES t_packing_list-body_num.
  t_packing_list-doc_type = 'RAW'.
  APPEND t_packing_list.
* Create attachment notification
  t_packing_list-transf_bin = 'X'.
  t_packing_list-head_start = 1.
  t_packing_list-head_num   = 1.
  t_packing_list-body_start = 1.
  DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
  t_packing_list-doc_type   =  ld_format.
  t_packing_list-obj_descr  =  ld_attdescription.
  t_packing_list-obj_name   =  ld_attfilename.
  t_packing_list-doc_size   =  t_packing_list-body_num * 255.
  APPEND t_packing_list.
* Add the recipients email address
  CLEAR t_receivers.
  REFRESH t_receivers.
  t_receivers-receiver = ld_email.
  t_receivers-rec_type = 'U'.
  t_receivers-com_type = 'INT'.
  t_receivers-notif_del = 'X'.
  t_receivers-notif_ndel = 'X'.
  APPEND t_receivers.
  CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
       EXPORTING
            document_data              = w_doc_data
            put_in_outbox              = 'X'
            sender_address             = ld_sender_address
            sender_address_type        = ld_sender_address_type
            commit_work                = 'X'
       IMPORTING
            sent_to_all                = w_sent_all
       TABLES
            packing_list               = t_packing_list
            contents_bin               = t_attachment
            contents_txt               = it_message
            receivers                  = t_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.
* Populate zerror return code
  ld_error = sy-subrc.
* Populate zreceiver return code
  LOOP AT t_receivers.
    ld_receiver = t_receivers-retrn_code.
  ENDLOOP.
ENDFORM.
<i><b>**** Points are always welcome ****</b></i>

Similar Messages

  • How Long does Apple need to send me my bill via email?

    I bought my iPad 4 days ago(Saturday) and still didn't receive the bill via email yet neither does it appear on my bank account.
    How long does apple need? Is this normal?

    It can take a while for you to get your iTunes receipt, depending on business hours. You can see your orders by signing in to iTunes. Details are here: http://support.apple.com/kb/HT2727

  • SEND COST CENTER REPORTS VIA EMAIL

    http://www.fileuploadx.de/228589
    If I use the sending option in this screen I only can send one report. But I want to send all reports.
    Is there a way to select all reports ?
    Markus

    We haven't changed the mail server either. I took a look at the log, and even though I haven't logged into financial reporting at all since I tried to resend again this morning, it seems to keep on logging the following:
    03-25 14:02:53 INFO CleanConMgrThread     Total number of Alive ADM connections are 0
    03-25 14:07:53 INFO CleanConMgrThread     Total number of Alive ADM connections are 0
    03-25 14:12:53 INFO CleanConMgrThread     Total number of Alive ADM connections are 0
    03-25 14:17:53 INFO CleanConMgrThread     Total number of Alive ADM connections are 0
    03-25 14:22:53 INFO CleanConMgrThread     Total number of Alive ADM connections are 0
    03-25 14:27:53 INFO CleanConMgrThread     Total number of Alive ADM connections are 0
    03-25 14:32:53 INFO CleanConMgrThread     Total number of Alive ADM connections are 0
    03-25 14:37:53 INFO CleanConMgrThread     Total number of Alive ADM connections are 0
    03-25 14:42:53 INFO CleanConMgrThread     Total number of Alive ADM connections are 0
    03-25 14:47:53 INFO CleanConMgrThread     Total number of Alive ADM connections are 0
    This seems very strange and didn't happen after batches successfully emailed

  • Want to send report Via Email

    hi,
    i am using forms 6.0
    I want to send my report Via Email to an email address in HTML Farmat.i want to set destination property at run time retriving from database. (mean without giving any runtime parameter manually)Plz tell me how i can do that i am working in windows environment.
    Waiting 4 ur reply.
    Thanx in advance.
    Zahid Raj.

    Hi Zahid
    From Forms 6.0, you need to call Reports using standard SRW.Run_Product call. Please refer to the product document for other SRw calls which can be used for Forms/Reports integration. In this SRW call, you need to sent the runtime argument to Reports. In your case, write a pl/sql code which would set the destype=mail, desformat=html and desname set to the email address for reciever which you would be fetching from DB in Forms application. And then send these arguments in the SRW call to run the Reports.
    Thanks
    Rohit
    Thanks
    Rohit

  • Send report Via Email in HTML format

    hi,
    i am using forms 6.0
    I want to send my report Via Email to an email address in HTML Farmat.i want to set destination property at run time retriving from database. (mean without giving any runtime parameter manually)Plz tell me how i can do that i am working in windows environment.
    Waiting 4 ur reply.
    Thanx in advance.
    Zahid Raj.

    Zahid,
    reports6i sends mails where the Report itself is attached as a file in the format you specified. The support for sending a report as part of the HTML mail body is provided in Reports9i.
    Frank

  • Sending documents as attachments via email

    Hi,
    I have a selection screen with purchase order number as "select-options" and 2 radio buttons one for downloading and opening the SAP Script output to the local file and the other raido button would convert the SAP Script output into .pdf file and send that file as an attachment via e-mail to the receipent(only one).
    I'm through with the first operation. Now need to know about the e-mailing procedure and the function module(s) to be used and their import, export, etc. parameters.
    Thanks & Regards,
    Rajesh

    Hi Rajesh,
    You can use standard SAP program <b>RSTXPDFT4</b> to convert SAPSript spools request to PDF.
    Also please check this link for sample code to sending an attachment (PDF) via email:
    http://www.sapgenie.com/abap/code/abap31.htm
    Hope this will help.
    Regards,
    Ferry Lianto

  • How to send a ALV report as a workitem

    Hi All,
    How to send a ALV report to the SAP Inbox for approval.
    Requirement: When the reviewer executes the report and click on send button.
    It will go to the approver for report approval.
    How to send a report when reviewer click on the send button.
    I am unable to find a solution when the user click on the send button the report will go to the approver.
    Please help me out on this...
    Regards,
    Siraj,
    +918008322278.

    Hi Siraj
    I do not have a ready sample with me; however, here can be a logical sequencing of steps which you can follow to achieve this:
    1) Define a custom PF STATUS in the ALV with the SEND Button
    2) In the User Command routine for ALV, code for SEND
    3) See how standard ALV - EXPORT to EXCEL Works - Debug and find the steps to generate an EXCEL - in the SEND Functionality
    4) Once Excel is downloaded, create a SOFM document for the same - Check the method CREATE of object SOFM on the coding required to do it
    5) Generate the SOFM Object Instance using the document created and calling FM SWO_INVOKE
    6) Now you have the run time instance of the report output as a document
    7) Define a custom Business object and a custom workflow based on that object
    8) Define a custom event with the event parameter of type SOFM
    9) From your SEND routine of the report -> trigger the event and pass the SOFM Instance of the excel as event parameter
    10) Workflow will have this object via binding from event to workflow container
    11) In the decision step to approver, bind this to _ATTACH_OBJECTS
    For each of these, you will find some  link already on SCN.
    Hope this helps.
    Once you have the solution, by the above steps or a better one, do remember to create a document on SCN in order to help others - this is a valid requirement and it would be good to have a ready reckoner :-)
    regards,
    Modak

  • Plz send me alv report

    could any body send me alv report functional, tech specs,
    plz send me if possible

    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    Check these links for sample reports.
    http://www.erpgenie.com/abap/code/abap28.htm
    ALV REPORTS
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919

  • Hardware Error Reporting Via Email

    Hello All
    I have a question i hope someone can help me out with.
    what i want to know is if there is a oem and or third part software that would send you server errors (mainly looking at windows) via emails. For example: if a hardware issue was to arise with lets say a HDD or some other component and the error is logged.
    Would i be able to get a program to send me that error via email automatically every time an issue arises with a any hardware component or software.
    Thanks in advance.

    Hi,
    what you really need is a monitoring tool. Something like say System Center Operation Manager, nagios, HP SIM...
    Many OEMS (HP, Dell, IBM/Lenovo,..) offer specific tools and configuratiotns for server grade hardware. this mostly consists of an IPMI with some vendor specifics (think HP ILO, Dell iDrac,..). this is modelspecific hardware to monitor (and configure) the
    hardware. Most of these can send out emails.
    Yous should never rely on the local server (only) to alert you of problems; it might be on fire when it needs to send out that mail! Have dedicated monitoring hardware.
    MCP/MCSA/MCTS/MCITP

  • Send CSV or table via email in daily job?

    Hello,
    I built a application where our employees can order meals. In case the whole application and everything crashes down, the DBA has 2 days to restore the application, database, etc...
    To "survive" the 2 days I want to make a daily export of the necessary data, that the kitchen can continue its work.
    Now I planned to make a view with the necessary data and export this as plain text in an email.
    Is there another better possibility? Maybe create a CSV file and attach this to a email and send it via a daily job? Or is it possible to send a whole table via email?
    Everything should work automatically via a job.
    Thank you so much,
    Lisa

    You could have a daily batch job run, where the job pulls the required info into a report, generates the report and sends it to required folks..: http://nzchaudhry.wordpress.com/2011/06/28/sending-report-as-email-attachment-in-oracle-apex/
    Thank you,
    Tony Miller
    Webster, TX
    There are two kinds of pedestrians -- the quick and the dead.
    If this question is answered, please mark the thread as closed and assign points where earned..

  • I'm having a problem sending a word doc via email. I have Mac for Office 08, when I save the document as a .doc or .docx, and send it to someone, they receive it as a blank document. Yet, when I open it on my Mac, it has a "word" icon. How do I fix?

    I'm having a problem sending a word doc via email. I have Mac for Office 08, and I'm using Mavericks OS. When I save the document as a .doc or .docx, and send it to someone, (doesn't matter if its safari, chrome or firefox or on my yahoo or gmail accounts) they receive it as a blank document. Yet, when I open it on my Mac, it has a "word" icon and I can read it. How do I fix?

    I suggest you post on the Microsoft Mac forums since it's their software you're having issues with.
    http://answers.microsoft.com/en-us/mac

  • Sending a binary attachment via email, looking for a more clean way

    Hi experts.
    I finally managed to send a binary attachment via email. Why "finally"? Never done before!
    Also I got to manage the "not standard" .SAP file extension, because the attachment is a transaction link.
    So let me explain how i did it:
    take SO_NEW_DOCUMENT_ATT_SEND_API1, filling following input data:
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = st_docdata
          commit_work                = 'X'
        TABLES
          packing_list               = lt_packlist
          contents_hex               = lt_hex
          contents_txt               = lt_content
          receivers                  = lt_recv
        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.
    But how to fill lt_hex? Well I did not found a way to transfer text data into raw data structure (lt_hex is type SOLIX).
    So, here is the trick:
    fill another table, lt_bin type SOLISTI1, with attachment content (text data);
    dump lt_bin content to a file on application server, having care to specify TEXT MODE and UTF-8 encoding;
    now reopen the same file in BINARY MODE and transfer content to lt_hex.
    Why I did not use parameter
    content_bin
    ? Because SAP ECC 6 is unicode enabled (I think UTF-16) and file has got to be UTF-8 or ASCII. Also, packing_list for attachment must specify binary tranfer mode. And doing so each UTF-16 character (2 bytes) is split into 2 characters (1 char + 1 NUL byte). Attachment is now unusable.
    What is the question? Here it is: how to fill lt_hex data directly from text (UTF-16) data, avoiding conversion errors?
    Thank you in advance.

    Hi Chhayank,
    the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
    Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
    ~Florian

  • Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Hi Chhayank,
    the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
    Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
    ~Florian

  • I need to send sm37 Spool Report Automatically to one or more user ids.

    Hai Gurus,
    I need to send sm37 Spool Report Automatically to one or more user ids.
    Kindly guide me

    Thanks.. .
    is it possible to create Many distribution list for each & every Spool Report ?
    I mean, Can i create separate distribution list for each Reports ?. EX: ME2N Report.
    Edited by: Swetha SAP Girl on Jul 6, 2009 10:11 AM

  • How to generate payment advice in F110 and send it to Vendors Via Email

    Dear SAP Experts
    Could anybody tell me how to generate payment advice in F110 and send it to Vendors Via Email?
    It would be much appreciated if someone can provide the configuration procedure, thanks so much in advance.
    Cheers & Best Regards
    Ray

    Hi Sama,
    Thanks for your post, here I just share some of my idea.
    The following step is to configure the payment advice.
    In OBVU (payment methods in cpy code) I entered my payment advice form
    In OBVU (payment methods in cpy code)  set  "Always pyt advice"
    In OBVCU (payment method by country)  leave the payment medium program (RFFOD__T)
    For the email sending program, should develp some customized program to realize that, Thanks.
    Cheers & Best Regards
    Ray

Maybe you are looking for

  • How to upload pdf and doc/docx with ADF?

    I am using 11.1.2.3.0, I want to be able to upload pdf and/or word documents in my web application. Can anyone help me with a tutorial or a sample example because all what I am finding till now are related to processing photos but it is not my case.

  • Converting file content into xstring

    Hi all, can any please let me know how to convert application server filecontent to xstring. thanks in advance Lucky

  • Invoice Accounted in AP and transfered to GL. But cannot be found in GL!!

    Helloo, I have a list of invoices which have been accounted and transferred to GL. But when querying nothing is found in GL. Are they stuck somewhere in a table? any specific program to run? thanks for the replies

  • Delete Personnel Numbers

    Hi My clent has deleted one personnel Number by using PU00, But when he go to Pa20 and enter particular deleted personnel number system gives a message "personnel number not assigned" but a flag will come in front of Personnel data. Please suggest ho

  • Configuring nwdi in my landscap .............. urgent friends

    hi friends                           urgent ...................... advance thank for your valuable time i our organation we are planning to install nwdi for ep 7.0. i am very new to nwdi. i would like to know how to configur the nwdi in my land scape