Sending a mail Thro abab report

Hi Experts,
          I want to send a Excel file to my cusomer while i am running analysis report. what FMs are available for sending Local Excel file? and what is procedure to send a local PC Excel file to somebody thro abap report?
Thanks,
Neptune.M

Hi Neptune,
To send the excel file in your local system, check this following code.
Sending mail with attachment
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
Thanks,
Susmitha

Similar Messages

  • Send a mail thro abap report

    Hi,
       i am using SO_NEW_DOCUMENT_ATT_SEND_API1 function module to send a mail of my text file to the customer.
    My problem is, the attachment file alignment is not correct. that means it is not aligning to the left or right.
    i am using tables parameters as
       contents_bin = objbin (attachment of mail)
       contents_txt = objtxt ( contents of mail)
      how can i rectify the alignment problem?
    Regards,
    Neptune.M

    hi,
    the below program will help you to send email with any kind of attachment.It is working fine for me.Just try it.
    REPORT ZSAMPL_001 .
    INCLUDE ZINCLUDE_01.
    DATA
    DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA : file_name TYPE string.
    data : path like PCFILE-PATH.
    data : extension(5) type c.
    data : name(100) type c.
    SELECTION SCREEN
    PARAMETERS : receiver TYPE somlreci1-receiver lower case.
    PARAMETERS : p_file LIKE rlgrap-filename OBLIGATORY.
    *PARAMETERS : appfn(150) TYPE c LOWER CASE OBLIGATORY.
    DATA : pos TYPE i.
    DATA : len TYPE i.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CLEAR p_file.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    file_name = p_file.
    START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM ml_customize USING 'Tst' 'Testing'.
    PERFORM ml_addrecp USING receiver 'U'.
    PERFORM upl.
    PERFORM doconv TABLES itab objbin.
    PERFORM ml_prepare USING 'X' extension name.
    PERFORM ml_dosend.
    SUBMIT rsconn01
    WITH mode EQ 'INT'
    AND RETURN.
    FORM
    FORM upl.
    file_name = p_file.
    *file_name = appfn.
    *OPEN DATASET appfn FOR INPUT IN BINARY MODE.
    *DO.
    READ DATASET appfn INTO ITAB.
    IF SY-SUBRC EQ 0.
    *APPEND ITAB.
    ELSE.
    *APPEND ITAB.
    EXIT.
    ENDIF.
    *ENDDO.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = file_name
    filetype = 'BIN'
    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.
    path = file_name.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
    EXPORTING
    complete_filename = path
    CHECK_DOS_FORMAT =
    IMPORTING
    DRIVE =
    EXTENSION = extension
    NAME = name
    NAME_WITH_EXT =
    PATH =
    EXCEPTIONS
    INVALID_DRIVE = 1
    INVALID_EXTENSION = 2
    INVALID_NAME = 3
    INVALID_PATH = 4
    OTHERS = 5
    ENDFORM. "upl
    ***INCLUDE ZINCLUDE_01 .
    Data
    tables crmrfcpar.
    DATA: docdata LIKE sodocchgi1,
    objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
    objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
    objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objhex LIKE solix OCCURS 10 WITH HEADER LINE,
    reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    DATA: tab_lines TYPE i,
    doc_size TYPE i,
    att_type LIKE soodk-objtp.
    DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
    data v_rfcdest               LIKE crmrfcpar-rfcdest.
    FORM
    FORM ml_customize USING objname objdesc.
    Clear Variables
    CLEAR docdata.
    REFRESH objpack.
    CLEAR objpack.
    REFRESH objhead.
    REFRESH objtxt.
    CLEAR objtxt.
    REFRESH objbin.
    CLEAR objbin.
    REFRESH objhex.
    CLEAR objhex.
    REFRESH reclist.
    CLEAR reclist.
    REFRESH listobject.
    CLEAR listobject.
    CLEAR tab_lines.
    CLEAR doc_size.
    CLEAR att_type.
    Set Variables
    docdata-obj_name = objname.
    docdata-obj_descr = objdesc.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addrecp USING preceiver prec_type.
    CLEAR reclist.
    reclist-receiver = preceiver.
    reclist-rec_type = prec_type.
    APPEND reclist.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addtxt USING ptxt.
    CLEAR objtxt.
    objtxt = ptxt.
    APPEND objtxt.
    ENDFORM. "ml_customize
    FORM
    FORM ml_prepare USING bypassmemory whatatt_type whatname.
    IF bypassmemory = ''.
    Fetch List From Memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listobject
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'LIST_FROM_MEMORY'.
    ENDIF.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    COMPRESSED_SIZE =
    TABLES
    in = listobject
    out = objbin
    EXCEPTIONS
    OTHERS = 1
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'TABLE_COMPRESS'.
    ENDIF.
    ENDIF.
    Header Data
    Already Done Thru FM
    Main Text
    Already Done Thru FM
    Packing Info For Text Data
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'TXT'.
    APPEND objpack.
    Packing Info Attachment
    att_type = whatatt_type..
    DESCRIBE TABLE objbin LINES tab_lines.
    READ TABLE objbin INDEX tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = att_type.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = whatname.
    APPEND objpack.
    Receiver List
    Already done thru fm
    ENDFORM. "ml_prepare
    FORM
    FORM ml_dosend.
    SELECT SINGLE * FROM crmrfcpar WHERE consumer = 'CRM'.
    v_rfcdest = crmrfcpar-rfcdest.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' DESTINATION v_rfcdest
    EXPORTING
    document_data = docdata
    put_in_outbox = 'X'
    commit_work = 'X' "used from rel. 6.10
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    CONTENTS_HEX = objhex
    OBJECT_PARA =
    object_parb =
    receivers = 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 'SO' TYPE 'S' NUMBER '023'
    WITH docdata-obj_name.
    ENDIF.
    ENDFORM. "ml_customize
    FORM
    FORM ml_spooltopdf USING whatspoolid.
    DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
    Call Function
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
    src_spoolid = whatspoolid
    TABLES
    pdf = pdf
    EXCEPTIONS
    err_no_otf_spooljob = 1
    OTHERS = 12.
    Convert
    PERFORM doconv TABLES pdf objbin.
    ENDFORM. "ml_spooltopdf
    FORM
    FORM doconv TABLES
    mypdf STRUCTURE tline
    outbin STRUCTURE solisti1.
    Data
    DATA : pos TYPE i.
    DATA : len TYPE i.
    Loop And Put Data
    LOOP AT mypdf.
    pos = 255 - len.
    IF pos > 134. "length of pdf_table
    pos = 134.
    ENDIF.
    outbin+len = mypdf(pos).
    len = len + pos.
    IF len = 255. "length of out (contents_bin)
    APPEND outbin.
    CLEAR: outbin, len.
    IF pos < 134.
    outbin = mypdf+pos.
    len = 134 - pos.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF len > 0.
    APPEND outbin.
    ENDIF.
    ENDFORM. "doconv
    FORM
    FORM ml_saveforbp USING jobname jobcount.
    Data
    *data : yhead like yhrt_bp_head.
    *DATA : ydocdata LIKE yhrt_bp_docdata,
    *yobjtxt LIKE yhrt_bp_objtxt OCCURS 0 WITH HEADER LINE,
    *yreclist LIKE yhrt_bp_reclist OCCURS 0 WITH HEADER LINE.
    *DATA : seqnr TYPE i.
    Head
    *yhead-jobname = jobname.
    *yhead-jobcount = jobcount..
    *MODIFY yhrt_bp_head FROM yhead.
    Doc Data
    *ydocdata-jobname = jobname.
    *ydocdata-jobcount = jobcount.
    *MOVE-CORRESPONDING docdata TO ydocdata.
    *MODIFY yhrt_bp_docdata FROM ydocdata.
    Objtxt
    *seqnr = 0.
    *LOOP AT objtxt.
    *seqnr = seqnr + 1.
    *yobjtxt-jobname = jobname.
    *yobjtxt-jobcount = jobcount.
    *yobjtxt-seqnr = seqnr.
    *MOVE-CORRESPONDING objtxt TO yobjtxt.
    *MODIFY yhrt_bp_objtxt FROM yobjtxt.
    *ENDLOOP.
    RecList
    *seqnr = 0.
    *LOOP AT reclist.
    *seqnr = seqnr + 1.
    *yreclist-jobname = jobname.
    *yreclist-jobcount = jobcount.
    *yreclist-seqnr = seqnr.
    *MOVE-CORRESPONDING reclist TO yreclist.
    *MODIFY yhrt_bp_reclist FROM yreclist.
    *ENDLOOP.
    ENDFORM. "ml_saveforbp
    FORM
    FORM ml_fetchfrombp USING jobname jobcount.
    *CLEAR docdata.
    *REFRESH objtxt.
    *REFRESH reclist.
    *SELECT SINGLE * FROM yhrt_bp_docdata
    *INTO corresponding fields of docdata
    *WHERE jobname = jobname
    *AND jobcount = jobcount.
    *SELECT * FROM yhrt_bp_objtxt
    *INTO corresponding fields of TABLE objtxt
    *WHERE jobname = jobname
    *AND jobcount = jobcount
    *ORDER BY seqnr.
    *SELECT * FROM yhrt_bp_reclist
    *INTO corresponding fields of TABLE reclist
    *WHERE jobname = jobname
    *AND jobcount = jobcount
    *ORDER BY seqnr.
    ENDFORM. "ml_fetchfrombp
    Regards,
    Abdul Hakim

  • Need to send Automatic mails when the report successful or Fail.

    Hello Experts,
    Created one report for reconciliation to check BW and R/3 figures.
    There are exceptions designed using reporting Agent settings on the same report.
    (When the values from R/3 to BW are matching it shows Green color and if the values are not matching report shows red color in the columns.)
    There are some mandatory variables for Company code, Period and Currency Type.
    Selections for  Company code and Period are fixed but We have three currency types (00,10,30)
    Reports needs to be executed for three currency types.
    Requirement is that
    when the report is executed for One currency type  (Ex u2013 00)
    If the key figure column shows Green color , Immediately mail has to be sent to necessary mail IDs saying the status successful.
    If the key figure column shows Red color , Immediately mail has to be sent to necessary mail IDs saying the status Failed.
    Like this the same report has to be executed for other two currency types and send the the same status as above phenomenon.
    Sending mails can be taken care by BASIS people with SMTP configuration.
    I want to know the development needs to be done from BW side.
    Are there are any settings in BW to send the message as Successful  when the report shows green color and message as failed when red color appears in the report.
    Regards,
    Siva.

    Hi,
    As i understand you need to set up an alert framework.
    Please check :
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b6d59590-0201-0010-5f9d-adb9f6b14d80?quicklink=index&overridelayout=true
    This can also be achieved using BEx broadcaster
    Please check :
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/efdbd593-0e01-0010-4eb1-a09ffedd550a?quicklink=index&overridelayout=true
    Hope this helps.
    -Vikram

  • Send E-mail from Interactive Report, mulitple e-mail addresses

    I am using Apex 4.1. I would like to enter multiple e-mail addresses in the TO field of the download, e-mail section of an interactive report. To be clear when I click on download from the actions menu of an interactive report and choose E-mail, you are presented with the form that has To, CC, BCC, etc. I would like to enter multiple e-mail addresses in the TO text box. I have tried separating them with semi-colons, commas, and even spaces. Whenever I enter two addresses, I do not get any mail. How can I address an interactive report to multiple e-mail addresses. Thank you so much.

    Hi,
    We misread the documentation and the Actions > Download > Email option does not support multiple email addresses, I have tried it on my workspace and it is throwing ORA-29279: SMTP permanent error: 553 5.1.3 which is because of unsupported multiple emails.
    In this doc says that it is allowed to use multiple emails under
    Actions > Subscription (and this is entirely different from above)

  • How to convert script output to excel and send through mail in the report

    I need a solution for Converting script into EXCEL  and sending Excel as a attachment to the mail. In my current Program I am getting OTF data from script and converting into PDF using Function module ' CONVERT_OTF'
    And sending PDF as a mail attachment using Function module 'SO_NEW_DOCUMENT_SEND_API1' it is working fine but
    My current requirement is I need to send Excel as a mail attachment instead of PDF.
    Hope it is clear for you, please give me possible solutions with sample code..

    hi
    good
    CONSTANTS: CON_CRET TYPE X VALUE '0D',  "OK for non Unicode
                 CON_TAB TYPE X VALUE '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
       con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
             INTO IT_ATTACH SEPARATED BY CON_TAB.
      CONCATENATE CON_CRET IT_ATTACH  INTO IT_ATTACH.
      APPEND  IT_ATTACH.
      LOOP AT IT_EKPO INTO WA_CHAREKPO.
        CONCATENATE WA_CHAREKPO-EBELN WA_CHAREKPO-EBELP
                    WA_CHAREKPO-AEDAT WA_CHAREKPO-MATNR
               INTO IT_ATTACH SEPARATED BY CON_TAB.  " Check here
        CONCATENATE CON_CRET IT_ATTACH  INTO IT_ATTACH.  " Check here
        APPEND  IT_ATTACH.
      ENDLOOP.
    thanks
    mrutyun^

  • LDAP - Could not send e-mail

    Hi guru
    We used SAP MDM 5.5 SP 6 (64.92)
    In workflow we use e-mail notification, when SAP MDM Server work without LDAP e-mail is sending.
    When we load SAP MDM Server with LDAP, every time when we send e-mail we get error "Could not send e-mail "
    Sender and Receiver Users and their e-mail adress is exist in LDAP and right.
    Moreover, we test sending e-mail from Server(where installed SAP MDM) through telnet for the same users and same e-mail adress(which precent in LDAP) - all work OK.
    Question:
    How we should configure SAP MDM Server for e-mail notification work correctly when it work through LDAP?
    Regards
    Kanstantsin Chernichenka

    Hi Vinay M.S
    Thank you for your answer, but
    Really, in our case mail server attribute was named as "mail" and it exist in mds.ini (but that is not standart name for all ADs)
    My another question: Why e-mail notification doesn't work from workflow in LDAP for all users?
    Additiona information:
    We have ~30000 users in AD but in MDM we used only ~500 from it.
    For test we created 3 simple workflows with e-mail notification block:
    1.Launcher set as user which name starting from symbol "B"
    2.Launcher set as user which name starting from symbol "P"
    3.Launcher set as "Launcher"
    We set as receiver the same user for all workflows.
    In 1 case e-mail notification is OK
    In 2 case e-mail notification isn't work and we got error "Could not send e-mail" in workflow report. but username and sender receiver e-mail is right
    In 3 case  e-mail notification from user which we started workflow  is OK (and for user which name starting from symbol "P")
    Any ideas?
    Regards
    Kanstantsin
    Edited by: Kanstantsin Chernichenka on Oct 2, 2009 1:35 AM

  • Mailing schedule standard report

    Hi,
    There are some standard report like FBL3N....where i want to schedule it in background and the desired output goes to user as a mail...
    There is a option to send the mail of standard report but i can't find out how to schedule it daily??
    Plz help

    Hi,
    Refer to following code for sending mail to multiple recipient.
    data : itab_mail type standard table of solisti1,
             itab_doc_data type sodocchgi1,
             itab_pack  type table of sopcklsti1,
             it_receivers type table of somlreci1.
       Call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          exporting
            document_data              = itab_doc_data
            put_in_outbox              = 'X'
            commit_work                = 'X'
          tables
            packing_list               = itab_pack
            contents_txt               = itab_mail
            receivers                  = it_receivers
          exceptions
            too_many_receivers         = 1
            document_not_sent          = 2
            document_type_not_exist    = 3
            operation_no_authorization = 4
            parameter_error            = 5
            x_error                    = 6
            enqueue_error              = 7
            others                     = 8.
        if sy-subrc = 0.
          write : 'Mail sent successfully'.
        endif.

  • How to automatically send the mail without popping for send

    Hi,
    I am providing proper values in system parameters of report6. viz.
    Desformat=pdf
    Destype=mail
    mode=bitmap
    desname=Valid email id
    I am using MS MAPI (Microsoft Outlook)
    When I run the report, I get the composed mail with the pdf attachment. When I press the SEND button of the composed mail, I shall be able to send the mail.
    Is there a way to SEND the mail automatically through reports?
    Regds
    Prakash H L

    hi ,
    Try running your report in batch mode, provide batch=yes on the command line for your report. This will suppress any user interaction and will mail the report without the need for the user to click on the send button of the mail composer.
    Regards
    Oracle Reports Team.

  • How to send a mail to Lotus Notes R5 from Report Builder 3.0.5.8.0 ?

    Dear sir,
    I try to send a mail via Report Builder, and I got the following error message:
    REP-4201:Error occured while initialzing the mail subsystem.
    REP-4202:There is the problem with
    the mail System.
    We use the Lotus Notes R5 mail, not Microsoft Outlook or exchange. Could the Report Builder support it?
    Thanks.
    Lisa

    Hi!
    1. Make sure no one else has opened the same file.
    2. Dont put image on your report.
    later
    Mircea Paciu (guest) wrote:
    : In Report builder 3.0.5.8.0 I can't open some of my *.rdf
    files.
    : When trying to open no error message is generated and the "open
    : dialog" reappears.
    : Some other files can be normally open.
    : Does anyone know how to solve this?
    null

  • How to send a mail with attaching a report

    hi gurus,
        my requirment is i have to send a mail with attaching the report of a program to the client.. is it possible? help me with sample code.
    Thanks in advance.
    Regards,
    Indira D

    Hi Indira,
    plz check out this code below,
    *& Report  ZATTACH                                               *
    REPORT  ZATTACH                   .
    TABLES: ekko.
    PARAMETERS: p_email   TYPE somlreci1-receiver
                                      DEFAULT '[email protected]'.
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
          wa_ekpo TYPE t_ekpo.
    TYPES: BEGIN OF t_charekpo,
      ebeln(10) TYPE c,
      ebelp(5)  TYPE c,
      aedat(8)  TYPE c,
      matnr(18) TYPE c,
    END OF t_charekpo.
    DATA: wa_charekpo TYPE t_charekpo.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    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,
            gd_error    TYPE sy-subrc,
            gd_reciever TYPE sy-subrc.
    *START_OF_SELECTION
    START-OF-SELECTION.
      Retrieve sample data from table ekpo
      PERFORM data_retrieval.
      Populate table with detaisl to be entered into .xls file
      PERFORM build_xls_data_table.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Populate message body text
      perform populate_email_message_body.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_message
                                          it_attach
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'XLS'
                                          'filename'
                                 changing gd_error
                                          gd_reciever.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM initiate_mail_execute_program.
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp aedat matnr
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekpo.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_XLS_DATA_TABLE
          Build data table for .xls document
    FORM build_xls_data_table.
      CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
                 con_tab TYPE x VALUE '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
       con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
             INTO it_attach SEPARATED BY con_tab.
      CONCATENATE con_cret it_attach  INTO it_attach.
      APPEND  it_attach.
      LOOP AT it_ekpo INTO wa_charekpo.
        CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
                    wa_charekpo-aedat wa_charekpo-matnr
               INTO it_attach SEPARATED BY con_tab.
        CONCATENATE con_cret it_attach  INTO it_attach.
        APPEND  it_attach.
      ENDLOOP.
    ENDFORM.                    " BUILD_XLS_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables pit_message
                                              pit_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.
      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[] = pit_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.
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
           Populate message body text
    form populate_email_message_body.
      REFRESH it_message.
      it_message = 'Please find attached a list test ekpo records'.
      APPEND it_message.
    endform.
    " POPULATE_EMAIL_MESSAGE_BODY
    <b>
    Reward points if this helps,</b>
    Kiran

  • Send a mail from report 6i with his function "mail...."

    I have tried to send a mail from report using "File" ---> "Mail.." Function that is avaible on report, but it send a file "*.eps" that is not readble with the normal reader.....
    It is possible to send a PDF file ???
    Thank 's .....
    il vampiro

    Hello Mike,
    In Reports Builder 6i, Just change the Initial Value of the DESFORMAT System Parameter in the Object Navigator (under Data Model) to PDF, or any other format you want to mail the report in.
    Thanks,
    The Oracle Reports Team.

  • Report only completion with Send E-mail button

    We would like to set up a new Captivate course with the
    purpose of familiarizing employees with a new system. Although we
    may include some questions for review and reinforcement, we only
    want to report that the learners have COMPLETED the course (by
    using the "Send E-mail" button) -- we do NOT want to report the
    score to the course administrator.
    On the Preferences>Quiz>Reporting window, I've made
    these selections:
    - Enable reporting for this project
    - E-mail
    - Complete/Incomplete
    - Slide views only
    - Score (although I'd prefer to leave this blank, but that's
    not an option)
    - Report Score (this also I'd prefer to leave blank)
    I'd actually prefer to leave those last two options blank,
    because I don't want to report any "score" information; however,
    I'm forced to select:
    = either Score or Percent
    = and either Report score or Interactions and score
    (I am using Captivate 3)
    Thank you for any insights or tips!
    Jan

    Rick,
    Thanks for your thoughts. I'm wondering -- if I remove
    reporting and place the plain email option at the end of the
    course, do we run the risk of some learners skipping to the end of
    the course and sending the email, even though they may not have
    worked through the whole course?
    I've discovered that a course developer can edit the score
    page (by de-selecting all of the options) so that it actually shows
    nothing to the learner. This would mean that the learner would not
    need to worry about a score. And I could place a text box on that
    page telling the learner to click the Send E-mail button. Yet still
    there's the issue of the course adminstrator receiving the score in
    the email, when I just wanted her to receive the "completed"
    report.
    So, are you thinking that there's not a way to remove the
    score results from the email that goes to the course administrator?
    Actually, that's what I'm suspecting at this point, but perhaps
    someone has discovered a method. And if not, I could work around
    it, or perhaps the course administrator would be OK with the scores
    -- she could just ignore them if she didn't need them.
    I'm still just exploring various options. If you have anymore
    thoughts, thanks.
    --Jan

  • Report data send through mail in sap

    Hi frds
    I need help . when i execute report then data send to mail automaticaly  by sap .
    thanks & regards .
    Anup

    Hi,
    firstly, you need to read [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement].
    Cheers

  • Cant send an e-mail in ALV report for background executaion

    Hello friends,
    I am displaying ALV report using container.
    Now when i run this report in background, an e-mail should be go with an EXCEL attachment of report.
    I am  able to send e-mail and attachment in foreground .
    I am also able to run alv report in background.
    now, only problem is that i am am not able to send e-mail in background.
    any sujjetions ?
    Points will rewarded if little bit useful.
    Regards,
    nimesh
    if  cl_gui_alv_grid=>offline( ) is initial.
    Create custom container
      CREATE OBJECT g_r_cust_container
        EXPORTING
          container_name = gv_ctrl_custom.
    Create TOP-Document
      CREATE OBJECT g_r_dd_document
        EXPORTING
          style = 'ALV_GRID'.
    Create Splitter for custom_container
      CREATE OBJECT g_r_splitter
        EXPORTING
          parent  = g_r_cust_container
          rows    = 2
          columns = 1.
    Split the grid in two parts- top and grid
      CALL METHOD g_r_splitter->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = g_r_parent_top.
      CALL METHOD g_r_splitter->get_container
        EXPORTING
          row       = 2
          column    = 1
        RECEIVING
          container = g_r_parent_grid.
    Set height for g_parent_html
      CALL METHOD g_r_splitter->set_row_height
        EXPORTING
          id     = 1
          height = 1.
    Create grid object
      CREATE OBJECT g_r_alvgrid
        EXPORTING
          i_parent = g_r_parent_grid. "g_r_cust_container.
    else .
    Create grid object
    CREATE OBJECT g_r_alvgrid
        EXPORTING
          i_parent = or_doc. "g_r_cust_container.
    endif .
    Create object handler object (of type local class)
      CREATE OBJECT g_r_handler.
      SET HANDLER g_r_handler->top_of_page FOR g_r_alvgrid.
      SET HANDLER g_r_handler->print_top_of_page FOR g_r_alvgrid.
      w_disvariant-report  = sy-repid.
      w_disvariant-variant = p_vari.
      CALL METHOD g_r_alvgrid->set_table_for_first_display
        EXPORTING
          i_structure_name = 'ysds_sox_price_change'
          is_layout        = w_layout
          is_variant       = w_disvariant
          i_save           = yc_chara
        CHANGING
          it_outtab        = t_st_result
          it_fieldcatalog  = t_fieldcat[]
          it_sort          = t_sortinfo[].
      CALL METHOD g_r_dd_document->initialize_document
        EXPORTING
          background_color = cl_dd_area=>col_textarea.

    no i am using container for ALV.
    In above code i have mantioned If.......ELSE.....Condition.
    which give me allow to run ALV in background mode but my problem is that  i am not able to send e-mail with attachment in background mode.
    DATA : or_doc  type ref to cl_gui_docking_container .
    My report is working fine in foreground but not able to send email in background.
    so anybody can solve it?

  • Sending E-Mail to Microsoft Exchange From Reports-2.5

    Hi,
    I am trying to send the mail from Reports-2.5.
    I am getting the Following Error:
    REP-4201:Error occured while initialzing the
    mail subsystem.There is the problem with
    the mail System.
    I am using Microsoft outlook98 in my system.
    Thanks in advance.
    Krishna.
    null

    The solution is:
    you have to add a into regedit file in hkey_local_machine\microsoft
    the two following strings:
    exchange and exchangeserver with value equal to registered. Reset
    the PC and try.
    Good luck
    Stefania
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Anantha Krishna ([email protected]):
    Hi,
    I am trying to send the mail from Reports-2.5.
    I am getting the Following Error:
    REP-4201:Error occured while initialzing the
    mail subsystem.There is the problem with
    the mail System.
    I am using Microsoft outlook98 in my system.
    Thanks in advance.
    Krishna.<HR></BLOCKQUOTE>
    null

Maybe you are looking for

  • A temporary solution for issue of excel sheet for SO_NEW_DOCUMENT_ATT_SEND_

    Hi, we all sometime or the other have faced the problem with SO_NEW_DOCUMENT_ATT_SEND_API1, it passes all the data into a single excel sheet. the following is the code i have written using the same standard FM to resolve the issue. Problem's Facing  

  • Reconnecting missing files?

    I have a new computer with Windows7 and PSE9.  Because of the difficulty I had on my old PC with trying to reconnect missing files, I decided to start afresh on my new PC.  So, I put all my images from Windows Explorer onto an External Hard Disk and

  • Cant export using quicktime in mp4

    hi, i tried to export using "share" using quicktime to get an mp4 file , then the process start, and within a couple of seconds its just stop ! and the temporary file disapear.  I tried to change some setting to see if it change something but no. it

  • I have no software iWORK installed in a new one.

    Dear Team, I've just bought a new MacBook Air from the Digital Gateway Branch, a demo stuff with discount price since 2 days ago. I found that there are no iWORK Software installed, as Apple website claimed. So how should i do to get that? Coz i boug

  • Long time to sync ipod

    Hi, tearing my hair out with this ipod touch. just tonight whenever I connect my ipod to my pc running XP it starts to synchronise and takes about 3-4 mins. eventually it completes the sync but theres no way it should be taking that long, worked fine