How to convert sapscript to excel & send it as attachment in mail?

Hi,
I have a requirement to send the customer statement  in excel format with all open items to the customer email address.  I am creating the customer statement via sapscript . Then I need to convert that into excel. I tried using CONVERT_OTF. But alignment is not coming properly. I have logo also in the script. That also I want in the excel . When I send the mail, the data is not showing correctly
Has anyone worked in similar scenario? Please tell me what are the ways for doing this?
Thanks in advance,
Jissa.

HI,
For sending script output through email
Please check this code it may help u.
FORM send_mail USING p_y16m_rcp_par STRUCTURE y16m_rcp_par.
Have a subject for the mail
g_s_document_data-obj_name = text-t02.
g_s_document_data-obj_descr = text-t03.
Fill receiver information
g_s_receivers-rec_type = p_y16m_rcp_par-rec_type.
g_s_receivers-rec_id = p_y16m_rcp_par-rec_id.
g_s_receivers-express = 'X'.
APPEND g_s_receivers TO g_t_receivers.
Call function to send mail
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = g_s_document_data
document_type = 'RAW'
PUT_IN_OUTBOX = ' '
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
OBJECT_HEADER =
object_content = g_t_object_content
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
receivers = g_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
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " SEND_MAIL
Regards,
Pavan.

Similar Messages

  • How to Convert file to excel and send it via email

    Hi experts.
    Can anyone tell me how to convert a spool data in to excel format and the send it through e-mail......
    We have a function module for converting spool data to pdf and send it through mail ie FM CONVERT_ABAPSPOOLJOB_2_PDF,
    but is there any FM for Excel ....
    Kindly help me.....
    Thanks
    Naveen

    you can send a file as an exel attachment in mail,
    step 1:
       send file data to an internal table.
    step 2:
       loop through the internal table(itab).
        concatinate itab-field1
                          abap_char_utilities=>horizontal tab
                         itab-field2
                         abap_char_utilities=>horizontal tab
                        abap_char_utilities=>vertical tab
            into t_attachment-line
    append t_attachment
    step 3:
    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 ).
    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 = 'XLS'.
       t_packing_list-doc_size = t_packing_list-body_num * 255.
      t_packing_list-obj_name   = 'Attachment'.
      t_packing_list-obj_descr  = 'mail xls'
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
        MOVE: mail id TO t_receivers-receiver,
        'U' TO t_receivers-rec_type,
        APPEND t_receivers.
      CALL  FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = w_doc_data
          put_in_outbox              = 'X'
          commit_work                = 'X'
        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.
    check the FM and creat the internal table types
    by this way you can send excel as an attachment 
    but problem in sending EXCEL attachment is if the data crosses the limit of excle file the file will not open.

  • How to convert pdf to excel

    How do I convert a pdf file to excel format?  I have a new computer and can't find how to convert.

    To convert a PDF file to Excel, you can subscribe to one of Adobe's services (Adobe ExportPDF or Adobe PDF Pack) or you can purchase Adobe Acrobat.

  • How to convert Sapscript into PDF in WDA

    Hi All,
    I have a requirement in Webdynpro in which I need to convert the Sap Script into PDF.
    Can you please tell me how to proceed ?
    Thanks in advance.
    Regards,
    Swapnil

    Hi,
    Check this document: Convert SAPScript to PDF file and instead of using gui_download/cl_gui* as mentioned in that doc, use CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE to open the PDF in WDA. You can refer that in this doc: Opening a Smartform in Web Dynpro ABAP
    Regards,
    Kiran

  • How to populate a table by sending a csv attachment to a particular mail id

    Hi Experts,
    I have to populate a table in the database by sending a csv attachment to a particular mail id.
    Eg:
    I have a table , test
    with fields: name, designation, address
    and i am sending a csv attachemnt with the values , name, designation, address to a generic email id say : [email protected]
    my table -test should be populated automatically with the values from the attached csv.
    Any idea how this can be achieved ?
    Regards,
    Archana

    Hi,
    Why cant you try uploading the data in your csv file to your table by using external table concepts? This would help you much i beleive.
      CREATE TABLE "EXT_EMP_TEST"
       (     "EMPNO" NUMBER,
         "EMPNAME" VARCHAR2(20 BYTE),
         "JOB" VARCHAR2(20 BYTE)
       ORGANIZATION EXTERNAL
        ( TYPE ORACLE_LOADER
          DEFAULT DIRECTORY "DUMP_DIR"
          ACCESS PARAMETERS
          ( RECORDS DELIMITED BY NEWLINE
               BADFILE 'emp.bad'
                          LOGFILE 't.log_xt'               
                          FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY ' " ' LDRTRIM
                          REJECT ROWS WITH ALL NULL FIELDS
                "EMPNO",
              "EMPNAME",
              "JOB"                                                                         
          LOCATION
           ( 'emp_det.dat'
       REJECT LIMIT UNLIMITED;
    {code}
    In the above code, default directory is the place where the file resides in your server. So before creating an external table you need to follow the below steps,
    1. Create a default directory.
    2. Place your file into that directory.
    3. Create an external table using the above script.
    4. Just execute the simple select statement upon that external table, {code} select * from EXT_EMP_TEST {code}
    *NOTE: In the above exaple i have used .dat file to load the data, you need to specify .csv over there*
    Regards,
    Sakthi.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How To Send A Text Attachment Through MAIL Adapter

    Hi Experts,
       I Did A Scenario that is  By using file adapter at the sender side and PI as a middle ware i have sent one text file to database
    Now here my question is
    I have to send the same text file which i have sent database... my using Mail Adapter
    Simply  File to Mail Scenario
    FILE         PI                MAIL
    But I have to send the same text file which i sent to database... by using mail adapter... Here all the configuration are done ... And the channels are working properly... only thing  here is..to send same text file using mail adapter..
    It will be good if  any one can explain step by step..
    Regards
    aravindh

    Hi Rajendra,
       Tanq for connecting me ... This  Blog helped me a lot ....And it is a useful answer to me..
    For this file to mail scenario we have got .txt as an attachment ... Its fine ... But her my Client is asking me to add CONTENT in the mail... Content in the sense..
    Example of content...
    Hi,
    Please find the attachment
    Regards,
    sap pi,
    They need in the form of like this...  To add content in the mail  What i have to do...DO i need to add more configurations if it is what are they...
    Please solve the issue.. It is appreciated  some one can explain me step by step or .. By sending me screen charts..
    Thanks in  advance....
    Regards
    vinay

  • How to get icloud email to send email with windows live mail

    What setting do i need to use get icloud email to send email through winndows live mail.  I can receive email

    The settings for iCloud's servers are listed here:
    http://support.apple.com/kb/HT4864

  • Send file as attachment via mail

    Dear All,
    I want to send a report (ALV) as attachment to some mail. I am using SO_NEW_DOCUMENT_SEND_API1. Can you please suggest how can I send mail as attachment. I am able to send ALV report as HTML format. I want to send it as attachment.
    Thanks and regards,
    Atanu

    Hi,
    plz check the below code.
    it sends Excel sheet attachment with the mail using FM 'SO_DOCUMENT_SEND_API1'
    code>>>>>>>>>>>>>>>>>>>>.
    form send_email_with_attachment .
    DATA: l_t_objbin LIKE solisti1 OCCURS 100 WITH HEADER LINE.
      DATA: i_body TYPE soli_tab WITH HEADER LINE.
      DATA: l_t_objtxt  LIKE solisti1   OCCURS 100 WITH HEADER LINE.
      DATA: l_t_objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
      DATA: l_t_objhead LIKE solisti1   OCCURS 1 WITH HEADER LINE.
      DATA: l_t_reclist LIKE somlreci1  OCCURS 5 WITH HEADER LINE.
      DATA: w_tabln TYPE i .              "for number of table lines
      DATA: w_line        TYPE so_text255.       " Line of text
      DATA: l_doc_chng  LIKE sodocchgi1.
      DATA: l_tab_lines LIKE sy-tabix.
      DATA: l_att_lines TYPE i.
      DATA: lv_lines  TYPE i.
      DATA : BEGIN OF wa_mrpnm,
               werks TYPE ZCSVT024D-werks,
               dispo TYPE ZCSVT024D-dispo,
               name_first TYPE ZCSVT024D-name_first,
               name_last  TYPE ZCSVT024D-name_last,
             END OF wa_mrpnm,
             l_i_mrpnm LIKE STANDARD TABLE OF wa_mrpnm.
      DATA : l_name TYPE string.
    *Used for delimiting the columns in Excel Sheet.
      CLASS cl_abap_char_utilities DEFINITION LOAD.
      CONSTANTS:
      cr_mark(2) TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
      constants c_l_newline type ABAP_CHAR1 value %_NEWLINE. "#EC NOTEXT
      CLEAR : l_t_objpack,
      l_t_objhead,
      l_t_objbin,
      l_t_objtxt,
      l_t_reclist.
      REFRESH: l_t_objpack,
      l_t_objhead,
      l_t_objbin,
      l_t_objtxt,
      l_t_reclist.
    Creating the content of the e-mail message text
      IF sy-sysid(1) = 'P'.
        IF p_order = 'X'.
         l_doc_chng-obj_name   = 'Subcontracting Setup Report'(m02).
          CONCATENATE 'Details of Orders Extract'(028) 'for Plant'(029)
                       p_werks
                       INTO l_doc_chng-obj_descr SEPARATED BY space.
          l_doc_chng-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( l_t_objtxt ).
        ELSE.
         l_doc_chng-obj_name   = 'TEST ONLY!! SC Setup Report'(m03).
          CONCATENATE 'Details of Forecast Extract'(030) 'for Plant'(029)
                       p_werks
                       INTO l_doc_chng-obj_descr SEPARATED BY space.
          l_doc_chng-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( l_t_objtxt ).
        ENDIF.
      ELSE.
        IF p_order = 'X'.
         l_doc_chng-obj_name   = 'Subcontracting Setup Report'(m02).
          CONCATENATE 'Details of Orders Extract'(028) 'for Plant'(029)
                       p_werks 'TEST TEST TEST'
                       INTO l_doc_chng-obj_descr SEPARATED BY space.
          l_doc_chng-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( l_t_objtxt ).
        ELSE.
         l_doc_chng-obj_name   = 'TEST ONLY!! SC Setup Report'(m03).
          CONCATENATE 'Details of Forecast Extract'(030) 'for Plant'(029)
                       p_werks 'TEST TEST TEST'
                       INTO l_doc_chng-obj_descr SEPARATED BY space.
          l_doc_chng-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( l_t_objtxt ).
        ENDIF.
      ENDIF.
      l_t_objtxt = 'Hi,'(036).
      APPEND l_t_objtxt.
      CLEAR l_t_objtxt.
      APPEND l_t_objtxt.
      CONCATENATE 'Please open the attachment to review details of the Report'(031)
                  'for plant'(029) p_werks INTO l_t_objtxt
                   SEPARATED BY space.
      APPEND l_t_objtxt.
      CLEAR l_t_objtxt.
      APPEND l_t_objtxt.
      DESCRIBE TABLE t_ddow LINES sy-tfill .
      IF sy-tfill GT 0 .
        MOVE 'These Materials have been marked as DDOW materials.'(032)
                TO l_t_objtxt.
        APPEND l_t_objtxt.
        CLEAR l_t_objtxt.
        APPEND l_t_objtxt.
        APPEND l_t_objtxt.
        APPEND l_t_objtxt.
        CONCATENATE 'Note! - This is an automatically generated email by the'(034)
                         'SAP system. Pls do not reply to the sender.'(035)
                   INTO  l_t_objtxt
                   SEPARATED BY space.
        APPEND l_t_objtxt.
        DESCRIBE TABLE l_t_objtxt LINES l_tab_lines.
        READ TABLE l_t_objtxt INDEX l_tab_lines.
       l_doc_chng-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( l_t_objtxt )
      Creating the entry for the email text in the packing list
        CLEAR l_t_objpack-transf_bin.
        l_t_objpack-head_start = 1.
        l_t_objpack-head_num = 1.
        l_t_objpack-body_start = 1.
        l_t_objpack-body_num = l_tab_lines.
        l_t_objpack-doc_type = 'RAW'.
        lv_lines = l_tab_lines.
        APPEND l_t_objpack.
    Columns Heading for Excel Attachment.
        CONCATENATE  'MRP Controller'(044)
                     'MRP Name'(047)
                     'Material'(037)
                     'Plant'(026)
                     'PP Cal'(038)
                     'Ship Date'(009)
                     'PO Number'(014)
                     'PO Line'(033)
                     'PP Text'(041)
             INTO i_body
            SEPARATED BY cr_mark.
        concatenate ' ' i_body into i_body separated by c_l_newline.
        APPEND i_body TO l_t_objtxt.
        CLEAR i_body.
      Get MRP Names
        SELECT werks dispo name_first name_last
          FROM ZCSVT024D
          INTO TABLE l_i_mrpnm
          FOR ALL ENTRIES IN t_ddow
          WHERE werks = t_ddow-werks
            AND dispo = t_ddow-dispo.
        IF sy-subrc = 0.
          SORT l_i_mrpnm by werks dispo.
        ENDIF.
    Data to be shown in Excel Sheet.
        LOOP AT t_ddow INTO w_ddow.
          CLEAR : l_name.
          READ TABLE l_i_mrpnm INTO wa_mrpnm WITH KEY werks = w_ddow-werks
                                                      dispo = w_ddow-dispo
                                                      BINARY SEARCH.
          IF sy-subrc = 0.
            CONCATENATE wa_mrpnm-name_first wa_mrpnm-name_last
              INTO l_name SEPARATED BY space.
          ENDIF.
          CONCATENATE  w_ddow-dispo
                       l_name
                       w_ddow-matnr
                       w_ddow-werks
                       w_ddow-mrppp
                       w_ddow-datum
                       w_ddow-ebeln
                       w_ddow-ebelp
                       w_ddow-pptxt
                INTO i_body
            SEPARATED BY cr_mark.
          concatenate ' ' i_body into i_body separated by c_l_newline.
          APPEND i_body TO l_t_objtxt.
          CLEAR : w_ddow.
        ENDLOOP.
        DESCRIBE TABLE l_t_objtxt LINES l_tab_lines.
        DESCRIBE TABLE l_t_objtxt LINES l_att_lines.
        l_tab_lines = l_tab_lines - lv_lines.
      Creating the entry for attachment in the packing list
      objpack-transf_bin = 'X'.
        lv_lines = lv_lines + 1.
        l_t_objpack-head_start = 2.
        l_t_objpack-head_num = 1.
        l_t_objpack-body_start = lv_lines.
        l_t_objpack-body_num = l_tab_lines.
        l_t_objpack-doc_type = 'XLS'.
        l_t_objpack-obj_name = 'DDOW_Materials'(045).
        l_t_objpack-obj_descr = 'DDOW Marked Materials'(046).
        l_t_objpack-doc_size = l_tab_lines * 255.
        APPEND l_t_objpack.
        lv_lines = l_att_lines.
         **RECEIVERS...
        LOOP AT t_ddow INTO w_ddow.
          REFRESH l_t_reclist .
          CLEAR l_t_reclist.
    * get the MRP controller from table
          READ TABLE t_mrpc INTO w_mrpc WITH KEY werks = p_werks
                                                 dispo = w_ddow-dispo
                                                 BINARY SEARCH .
          IF sy-subrc EQ 0 .
            MOVE: 'X'               TO l_t_reclist-express   ,
                  'U'               TO l_t_reclist-rec_type  ,
                  w_mrpc-smtp_addr  TO l_t_reclist-receiver  .
                  APPEND l_t_reclist.
            EXIT.
          ENDIF.
        ENDLOOP.
      Sending the document
        IF NOT l_t_reclist[] IS INITIAL.
          CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
            EXPORTING
              document_data              = l_doc_chng
              commit_work                = 'X'
            TABLES
              packing_list               = l_t_objpack
              object_header              = l_t_objhead
              contents_bin               = l_t_objbin
              contents_txt               = l_t_objtxt
              receivers                  = l_t_reclist
            EXCEPTIONS
              too_many_receivers         = 1
              document_not_sent          = 2
              operation_no_authorization = 4
              OTHERS                     = 99.
        ENDIF.
        IF sy-subrc <> 0.
    * Do nothing
        ELSE.
          COMMIT WORK AND WAIT.
          MESSAGE s899(8a) WITH 'Email Message sent successfully'."#EC
        ENDIF.
      ENDIF.
    <<<<<<<<<<<<<<<<<<<<<<<
    regards,
    vikas.
    plz reward if helpful..

  • How to Convert Report into Excel Sheet when Sending Mail.

    Dear Friends,
    i want to send mail to HOD of Product with an Excel Sheet .
    i want to send Pending Issue details to HOD in Excel Sheet attachment .
    here i have pending issue report now i need to send it in Excel Sheet attachment .
    i have table where i have manage Product ID and HOD OF PRODUCT.
    CREATE TABLE  "MAP_USER_PRODUCT_DTL"
       (     "ID" NUMBER NOT NULL ENABLE,
         "PRODUCT_ID"NUMBER,
         "USER_ID" VARCHAR2(5) NOT NULL ENABLE,
         "HOD_PROD" VARCHAR2(100)========================================Value is Y OR N IF HOD then Y else N
         CONSTRAINT "MAP_USER_PRODUCT_DTL_PK" PRIMARY KEY ("ID") ENABLE
    /i have one more table where all complete issue detail insert.
    CREATE TABLE  "CRM_ISSUE_PROBLEM"
       (     "ID" NUMBER,
         "SUBJECT" VARCHAR2(255) NOT NULL ENABLE,
         "CLIENT_ID" NUMBER,
         "ASSIGNED_TO_ID" VARCHAR2(100),
         "ASSIGNED_ON" DATE,
         "DESCRIPTION" VARCHAR2(4000),
         "PRODUCT_ID" NUMBER NOT NULL ENABLE,
         "STATUS_ID" NUMBER NOT NULL ENABLE,
          CONSTRAINT "CRM_ISSUE_PROBLEM_PK" PRIMARY KEY ("ID") ENABLE
    Here STATUS_ID is Like Pending ISsue,Open Issue and Close Issue .i want to send mail to HOD with Pending Issue Report convert into Excel Sheet and send to HOD?
    How can i do this.
    Thanks
    Edited by: Vedant on Oct 12, 2011 12:36 AM
    Edited by: Vedant on Oct 12, 2011 2:22 AM

    Hello Vedant,
    Would it suffice if you send a CSV file?
    If yes, then see following code.. run the code under APEX > Home > SQL Workshop > SQL Commands
    DECLARE
            ln_id NUMBER;
            lc_clob CLOB;
         lb_blob BLOB;
         li_in PLS_INTEGER := 1;
         li_out PLS_INTEGER := 1;
         li_lang PLS_INTEGER := 0;
         li_warning PLS_INTEGER := 0;
         lv_mail_rcpts VARCHAR2(2000) := '[email protected]';
         lv_mail_from VARCHAR2(100) := '[email protected]';     
           lv_clmn_separator VARCHAR2(1) := ',';
    BEGIN
         -- Build file content as CLOB
      -- Replace with your query
         FOR i IN (select object_id A, object_name B, object_type C, status D, temporary E, generated F, secondary G,namespace H from user_objects where rownum < 10)               
         LOOP
        IF lc_clob IS NULL THEN
          lc_clob := i.A||lv_clmn_separator||i.B||lv_clmn_separator||i.C||lv_clmn_separator||i.D||lv_clmn_separator||i.E||lv_clmn_separator||i.F||lv_clmn_separator||i.G||lv_clmn_separator||i.H;
        ELSE
          lc_clob := lc_clob||CHR(10)||i.A||lv_clmn_separator||i.B||lv_clmn_separator||i.C||lv_clmn_separator||i.D||lv_clmn_separator||i.E||lv_clmn_separator||i.F||lv_clmn_separator||i.G||lv_clmn_separator||i.H;
        END IF;
         END LOOP; 
         -- Convert CLOB to BLOB
         DBMS_LOB.CREATETEMPORARY(lb_blob,TRUE);
         DBMS_LOB.convertToBlob(lb_blob,lc_clob,DBMS_LOB.LOBMAXSIZE,li_in,li_out,DBMS_LOB.DEFAULT_CSID,li_lang,li_warning);
         -- Send mail
         ln_id:= APEX_MAIL.SEND(
           p_to        => lv_mail_rcpts,
                 p_from      => lv_mail_from,
                 p_subj      => 'Subject Goes here',
                 p_body      => 'Body goes here'
           -- add CSV file as attachment
         APEX_MAIL.ADD_ATTACHMENT
           p_mail_id   => ln_id,
           p_attachment => lb_blob,
           p_filename   => 'filename.csv',
           p_mime_type  => 'application/csv'
      -- push mail queue
      APEX_MAIL.PUSH_QUEUE;
         -- empty temporary space
         DBMS_LOB.FREETEMPORARY ( lob_loc =>  lb_blob);       
         COMMIT;
    END;Regards,
    Hari

  • How to convert sapscript(Purchage order) inot pdf format & send in  mail

    Dear Gentlemen,
    I got one req.
    <b>convertion of sapscript(purchage order) to pdf format and send converted pdf format in the mail.</b>
      Can anybody please give detail & proper way to achive this requriment.
    It is very useful to me, I am thankful to everybody, give help in this matter.
    Regards,
    Vasu

    chk this one
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    some function modules useful would be
    CONVERT_OTF
    SO_NEW_DOCUMENT_ATT_SEND_API1 to send mails with attachments
    plzz refer to this link..it will solve ur problem
    Re: Sending a PDF document as an attachment
    sending the mail with PDF attachment

  • How to convert SAPScript data to Excel file

    Hi Experts,
    Curenntly I am converting SAP Script data to PDF file and send an e-mail with attachment (PDF file).
    Same like this, is that possible to covert thda Script data to Excel file to send mail with attachment.???
    If, yes please sugget with respective Function Modules.
    Thanks In Advance.
    Best Regards.

    Hi,
    Thanks for response, Here providing more inforamation.
    Presently my report displaying Customer information. As per user requirement, coverting the Script data to PDF by using
    CALL FUNCTION 'CONVERT_OTF_MEMORY'
              EXPORTING
                format                = 'PDF'
                max_linewidth         = 132
              IMPORTING
                bin_filesize          = doc_size
              TABLES
                lines                 = htline.
    Now user want to add two radiobuttons on selection screen for PSF file & Excel file
    If user seleacts Excel fiel radio button, then I need to covert the SAP Script data to Excel file lik I have done for PDF.
    I'd like to know is that possible covert the Script data to Excel file. If yes, suggest with FMs or process.
    Best Regards.

  • How to convert abap output/excel output to pie charts

    Hi.......
    I've managed to output my Hierarchial sequential report output into a excel file....converting the abap output to xml and then mailing it.....now how can i convert this to pie chart......and mail it.....is it possible to have a pie chart in sheet1 and excel output in other sheet2 in the same excel sheet.......i've looked on the demo programs....in the package SOFFICEINTEGRATION and programs like SAPRDEMOEXCELINTEGRATION2.This are in object oriented language..............can any one come with coding in abap languge with step by step procedure to write the logic....i even got to look into FM called XXL_FULL_API.......
    Points wud be surely rewarded.............Thank in Advance

    Try demo sample program GFW_PROG_PIE
    ot t_code GRAL to find such programs.
    In addition to this please also check the chart engine (cl_gui_chart_engine).
    You can download --> SAP Chart Designer from SDN -> Downloads -> WebAS.

  • How to convert Abap output/excel output into pie charts

    Hi.......
    I've managed to output my Hierarchial sequential report output into a excel file....converting the abap output to xml and then mailing it.....now how can i convert this to pie chart......and mail it.....is it possible to have a pie chart in sheet1 and excel output in other sheet2 in the same excel sheet.......i've looked on the demo programs....in the package SOFFICEINTEGRATION and programs like SAPRDEMOEXCELINTEGRATION2.This are in object oriented language..............can any one come with coding in abap languge with step by step procedure to write the logic....i even got to look into FM called XXL_FULL_API.......
    Points wud be surely rewarded.............Thank in Advance

    Hi Younus Khan,
    sample code to load output to excel sheet.
    Use function module GUI_UPLOAD
    The FILETYPE refer to the type of file format you need: For e.g 'WK1' - Excel format , 'ASC' - Text Format etc.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    FILENAME = 'C:\test.csv'
    FILETYPE = 'ASC'
    TABLES
    DATA_TAB = itab
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    NO_AUTHORITY = 6
    UNKNOWN_ERROR = 7
    BAD_DATA_FORMAT = 8
    HEADER_NOT_ALLOWED = 9
    SEPARATOR_NOT_ALLOWED = 10
    HEADER_TOO_LONG = 11
    UNKNOWN_DP_ERROR = 12
    ACCESS_DENIED = 13
    DP_OUT_OF_MEMORY = 14
    DISK_FULL = 15
    DP_TIMEOUT = 16
    OTHERS = 17.
    or,
    U can use the FM
    SAP_CONVERT_TO_XLS_FORMAT
    to convert itab data to excel
    check this FM also
    GUI_DOWNLOAD
    And, for converting into xml format. I did it in ecc6.0
    *& Report ZTESTSDN
    REPORT ztestsdn.
    TABLES: vekp,
    likp,
    vbak.
    TYPE-POOLS: ixml.
    DATA: itab LIKE but000 OCCURS 0 WITH HEADER LINE.
    TYPES: BEGIN OF my_xml ,
    data(256) TYPE x,
    END OF my_xml.
    DATA: xml_table TYPE TABLE OF my_xml.
    DATA: l_xml_size TYPE i,
    ld_fullpath TYPE string.
    START-OF-SELECTION.
    SELECT * FROM but000 INTO TABLE itab UP TO 10 ROWS.
    CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
    EXPORTING
    I_FIELD_SEPERATOR = ','
    I_LINE_HEADER =
    I_FILENAME =
    I_APPL_KEEP = ' '
    I_XML_DOC_NAME =
    IMPORTING
    pe_bin_filesize = l_xml_size
    TABLES
    i_tab_sap_data = itab
    CHANGING
    i_tab_converted_data = xml_table
    EXCEPTIONS
    CONVERSION_FAILED = 1
    OTHERS = 2
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    bin_filesize = l_xml_size
    filename = 'C:\test.txt'
    filetype = 'BIN'
    IMPORTING
    filelength = l_xml_size
    TABLES
    data_tab = xml_table
    FIELDNAMES =
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    You can go use ADOBE AIR for developing the pie chart widget...
    kindly reward if found helpful.
    cheers,
    Hema.

  • How to capture the screen and send it to attachment for that mail

    hi sir ,
         how to capture the screen shot and attach with that e-mail , whether it is possible or not ..
    Regards,
    kumar

    hi sir,
        i am asking about while creating the support message from help menu in sap..
    while creating the support message we have to give component , priority and text also .. after that click the send icon in that support desk message .. while clicking the send button the entire screen ( what  we have entered in that creen na ) i have to capture the screen ( it may be save in local file also )  after that it will attach into attachment and then send it to ...
    Regards,
    kumar

  • How to convert a oracle 6i Report to pdf and also mailed at run time.

    I need the code of oracle report to convert it into pdf and aslo mail it to specified email address at run time.
    I need full code using add_parameter() built in.

    Hi!
    R u talking about FORMS report or u want to generate any EXCEL report from Oracle PL/SQL?
    Regards.
    Satyaki De.

Maybe you are looking for