Sending an e-mail with pdf attachment and logo as a signature

Hi,
My task is to send an email with pdf attachement. And an image file need to be added as a signature. Is it possible, if so, can anyone please guide me?
Thanking you.
Kumar.

Hi
I'm having the same issue, except my application actually sends the email but the attachment is 0 octet and it doesn't even give me an error... Any chance you found a solution for this and could share it ?
Thanks

Similar Messages

  • How to send a mail with PDF attachment

    Hello
    Good Day!
    We have a requirement to send the mail with pdf attachment. Pdf file will be remain same for all mails and it will be placed at server. We are on R12.4 and below is the database information :
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    Thanks a ton for your anticipated help!
    Thanks
    Gaurav

    The word URGENT is considered as rude in this forum.. Nobody here is getting paid for the ansers they are giving..
    Just have a look at These threads.Those will help you.

  • Send Mail with PDF Attachment in ABAP

    Hi Experts,
    I have a requirement where I need to convert internal table data into PDF format and send it as an E-Mail with PDF attachment to Outlook mail using ABAP.
    How do I achieve this .
    Can anyone send me example code for doing this.
    Thanks
    Kumar

    hiii
    check following code for PDF attachment and mail
    ** Check for any ATTACHMENTS...
    IF d_desired_type = 'RAW'.           " Set to RAW?
    *    PERFORM convert_to_abaplist.       " YES - convert it
      ENDIF.                               " end...
      IF d_desired_type = 'ALI'.           " Set to ALI?
        PERFORM convert_to_alilist.        " YES - convert it
      ENDIF.                               " end...
    * Check for any ATTACHMENTS...
      IF NOT t_soli[] IS INITIAL.          " attachment?
        h_real_type = d_desired_type.      " ENABLE
        h_transf_type = 'X'.               " Transfer type BINARY...
    *   Write PDF/ALI formatted data to BINARY table...
        t_con_bin[] = t_soli[].
    *   Add Packing List (attachment) for PDF...
        DESCRIBE TABLE t_con_bin LINES h_tab_cntr.
        READ TABLE t_con_bin INDEX h_tab_cntr.
        h_doc_data-doc_size = h_doc_data-doc_size
                            + ( ( h_tab_cntr - 1 )
                            * 255 + STRLEN( t_con_bin ) ).
        h_doc_data-obj_descr  = mail_subject.
        h_body_start = 1.
        h_body_num = h_tab_cntr.
    *   Write RAW data if that's what it is (adds to TEXT)...
        IF h_real_type = 'RAW'.
          DESCRIBE TABLE t_con_text LINES h_body_start.
          h_body_start = h_body_start + 1.
          h_transf_type = space.           " Transfer type TEXT...
          LOOP AT t_con_bin.               " Zip thru TEXT stuff
            t_con_text = t_con_bin.        " set TEXT table header..
            APPEND t_con_text.             " add to what's there!
          ENDLOOP.
          CLEAR: t_con_bin.                " clear BINARY header..
          REFRESH: t_con_bin.              " reset BINARY table...
        ENDIF.
        CLEAR t_pak_list.
        IF h_transf_type = 'X'.            " Binary=PDF/ALI?
          t_pak_list-transf_bin = 'X'.
          t_pak_list-head_start = 1.
          t_pak_list-head_num   = 0.
          t_pak_list-body_start = 1.
          t_pak_list-body_num   = h_tab_cntr.
          t_pak_list-doc_type   = h_real_type.
          t_pak_list-obj_name   = 'ATTACHMENT'.
          t_pak_list-obj_descr  = 'Document'(001).
          t_pak_list-doc_size   = ( h_tab_cntr - 1 )
                                * 255 + STRLEN( t_con_bin ).
        ELSE.
          DESCRIBE TABLE t_con_text LINES h_tab_cntr.
          READ TABLE t_con_text INDEX h_tab_cntr.
          t_pak_list-transf_bin = ' '.     " Binary=RAW
          t_pak_list-head_start = 1.
          t_pak_list-head_num   = 0.
          t_pak_list-body_start = h_body_start.
          t_pak_list-body_num   = h_tab_cntr.
          t_pak_list-doc_type   = h_real_type.
          t_pak_list-obj_name   = 'ATTACHMENT'(002).
          t_pak_list-obj_descr  = 'Report'(003).
          t_pak_list-doc_size   = ( h_body_num - 1 )
                                * 255 + STRLEN( t_con_text ).
        ENDIF.
        APPEND t_pak_list.
      ENDIF.
    * Send the EMAIL out with SAP function...
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = h_doc_data
          put_in_outbox              = 'X'
    *      commit_work                = 'X'
        TABLES
          packing_list               = t_pak_list
          contents_bin               = t_con_bin
          contents_txt               = t_con_text
          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.
      IF syst-subrc NE 0.
    *    RAISE send_failed.
        CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
          EXPORTING
            msg_arbgb = '00'
            msg_nr    = '001'
            msg_ty    = 'E'
            msg_v1    = 'O/P Could not be issued '(001)
            msg_v2    = ' Due to No Mail ID'(002)
            msg_v3    = syst-msgv3
            msg_v4    = syst-msgv4
          EXCEPTIONS
            OTHERS    = 1.
    * Check General incompletion status of the header
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ELSE.
          WRITE : 'SENT'.
        ENDIF.
      ELSE.
    *    commit work.
      ENDIF.
    ENDFORM.                               " SEND_MAIL_FAX
    *&      Form  convert_otf_2_pdf
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM convert_otf_2_pdf .
      DATA: "t_line            LIKE tline OCCURS 0 WITH HEADER LINE,
            t_objcont         LIKE soli  OCCURS 0 WITH HEADER LINE,
            d_doc_size(12)    TYPE c,
            d_fle1(2)         TYPE p,
            d_fle2(2)         TYPE p,
            d_off1            TYPE p,
            d_hltlines        TYPE i,
            d_hfeld(500)      TYPE c,
            w_indx            LIKE sy-tabix.
      CLEAR: t_line, t_objcont, d_off1.
      REFRESH: t_line, t_objcont.
    * Check/set DEFAULT Desired-type attachment...
      IF d_desired_type IS INITIAL.        " Entered Desired type?
        d_desired_type = 'PDF'.            " NO  - default to PDF
      ENDIF.                               "
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = d_desired_type
        IMPORTING
          bin_filesize          = d_doc_size
        TABLES
          otf                   = t_itcoo
          lines                 = t_line
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          OTHERS                = 4.
      IF sy-subrc > 0.
        RAISE otf_convert_failed.
      ENDIF.
    ENDFORM.                               " convert_otf_2_pdf
    *&      Form  convert_otf_2_pdf_sx
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM convert_otf_2_pdf_sx .
      DATA:
        t_otf          LIKE solisti1 OCCURS 0 WITH HEADER LINE,"ENABLE
        t_pdf          LIKE tline    OCCURS 0 WITH HEADER LINE,"ENABLE
        doc_size(12)   TYPE n,
        len_out        TYPE i,
        x_real         LIKE  soodk-objtp,
        x_idx_b        LIKE sy-tabix,
        x_idx_e        LIKE sy-tabix.
      IF d_desired_type = 'PDF'.
        d_desired_type = 'OTF'.
      ENDIF.
      CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
        EXPORTING
          rqident              = d_spool_id
          desired_type         = d_desired_type
        IMPORTING
          real_type            = x_real
        TABLES
          buffer               = t_otf
          buffer_pdf           = t_pdf
        EXCEPTIONS
          no_such_job          = 1
          job_contains_no_data = 2
          selection_empty      = 3
          no_permission        = 4
          can_not_access       = 5
          read_error           = 6
          type_no_match        = 7
          OTHERS               = 8.
      IF sy-subrc <> 0.
        IF sy-subrc = 1.
          RAISE invalid_spool_id.
        ELSE.
          RAISE otf_convert_failed.
        ENDIF.
      ENDIF.
    * Check Desired-Type vs. Real-Type (if any)...
      IF d_desired_type IS INITIAL.
        IF x_real = 'OTF'.
          d_desired_type = 'PDF'.
        ELSE.
          d_desired_type = x_real.
        ENDIF.
      ELSE.
        IF ( d_desired_type = 'PDF' OR
             d_desired_type = 'OTF' ) AND
           ( x_real = 'OTF' OR
             x_real = 'PDF' ).
          d_desired_type = 'PDF'.
        ELSE.
          IF d_desired_type <> x_real.
            RAISE type_no_match.
          ENDIF.
        ENDIF.
        IF ( d_desired_type = 'ALI' OR
             d_desired_type = 'RAW' ) AND
             x_real = 'OTF'.
          RAISE type_no_match.
        ENDIF.
      ENDIF.
    * Check if ABAP-LIST and not SapScript...
      IF d_desired_type = 'ALI' OR
         d_desired_type = 'RAW'.
        t_soli[] = t_otf[].
        EXIT.
      ENDIF.
    * Load OTF data gotten from spool...
      LOOP AT t_otf.
        t_itcoo = t_otf.
        APPEND t_itcoo.
    *   if Vendor P/O (SapScript = Z_MEDRUCK) then
    *      trap INDEX for "Terms & Conditions" on BACK...
        IF t_itcoo-tdprintcom =  'IN' AND
           t_itcoo-tdprintpar =  '01EZ_MEDRUCK       BACK'.
          x_idx_b = sy-tabix.
        ENDIF.
        IF t_itcoo-tdprintcom =  'IN' AND
           t_itcoo-tdprintpar =  '01EZ_MEDRUCK       NEXT'.
          x_idx_e = ( sy-tabix - 1 ).
        ENDIF.
      ENDLOOP.
    * Drop from table if INDEX'S are set (see above)...
      IF ( x_idx_b > 0 AND
         ( x_idx_e > x_idx_b ) ) .
        DELETE t_itcoo FROM x_idx_b
                     TO x_idx_e.
      ENDIF.
      PERFORM convert_otf_2_pdf.
    ENDFORM.                               " convert_otf_2_pdf_sx
    *&      Form  CONVERSION_OF_SIZE                                       *
    * *"Converting the file to get a 255 char single line internal table   *
    * The PDF file that is generated out of the above function module     *
    * cannot be transported as it needs to be of 255 chars. Hence         *
    * converting the file to get a 255 char single line,internal table.   *
    FORM conversion_of_size .
    "Declaring Local Constants............................................
      CONSTANTS:
         cnv_hexconst_zero TYPE x VALUE '00'.
    * Internal table to hold 255 Char's Single Line.                      *
      DATA:
        lv_big_lines(268) TYPE c
                          OCCURS 0 WITH HEADER LINE.
    *"Local Work Variables.................................................
      DATA:
        lfl_flag          TYPE c,
        lv_left_t(268)    TYPE c,
        lv_left_i         TYPE i,
        tv_left_i         TYPE i,
        lv_curr_i         TYPE i.
      FIELD-SYMBOLS: <f>.
    * Get the lines into a table of 268 char as the first step to put it in
    * the pdf file of 255 chars
      CLEAR lfl_flag.
      LOOP AT t_line.
        IF lfl_flag EQ ' '.
          CLEAR lv_big_lines.
          ASSIGN lv_big_lines(134) TO <f>.
          <f> = t_line.
          lfl_flag = 'X'.
        ELSE.
          lv_big_lines+134 = t_line.
          APPEND lv_big_lines.
          CLEAR: lfl_flag.
        ENDIF.                             " If lfl_flag = ''..
      ENDLOOP.                             " Loop at t_pdf
      IF lfl_flag EQ 'X'.
        APPEND lv_big_lines.
      ENDIF.                               " If lflf_flag eq 'X'..
    * Next fill it into a 255 char table
      CLEAR: lv_left_t, lv_left_i, tv_left_i.
      lv_curr_i = 255.
      LOOP AT lv_big_lines.
        IF lv_left_i NE 0.
          IF lv_curr_i NE 0.
            wa_objcont(lv_left_i)           = lv_left_t(lv_left_i).
            wa_objcont+lv_left_i(lv_curr_i) = lv_big_lines(lv_curr_i).
          ELSE.
            wa_objcont = lv_left_t(lv_left_i).
          ENDIF.                           " IF lv_curr_i NE 0
        ELSE.
          wa_objcont = lv_big_lines(lv_curr_i).
        ENDIF.                             " IF lv_left_i NE 0
        APPEND wa_objcont TO t_objcont.
        tv_left_i = 268 - lv_curr_i.
        IF tv_left_i > 255.
          wa_objcont = lv_big_lines+lv_curr_i(255).
          APPEND wa_objcont TO t_objcont.
          lv_left_i = tv_left_i - 255.
          tv_left_i = 255 + lv_curr_i.
          lv_curr_i = 255 - lv_left_i.
          lv_left_t = lv_big_lines+tv_left_i.
        ELSE.
          lv_left_t = lv_big_lines+lv_curr_i.
          lv_left_i = 268 - lv_curr_i.
          lv_curr_i = 255 - lv_left_i.
        ENDIF.                             " IF tv_left_i > 255
      ENDLOOP.                             " LOOP AT lv_big_lines.
      CLEAR wa_objcont .
      ASSIGN wa_objcont(lv_left_i) TO <f>.
      <f> = lv_left_t(lv_left_i).
      APPEND wa_objcont TO t_objcont.
        h_transf_type = 'X'.                 " Transfer type BINARY...
      IF NOT t_objcont[] IS INITIAL.
        t_soli[]     = t_objcont[].        " SapScript doc to Objects...
      ENDIF.
    regards
    twinkal

  • Workflow Step 'In Process'- Send mail with PDF attachment

    Hi,
    have to send mail with PDF attachment.
    I have written a function module with following steps,
    1. Convert SPOOL number to PDF using Function Module 'CONVERT_OTFSPOOLJOB_2_PDF'.
    2. Send mail with PDF attachment using Function Module 'SO_DOCUMENT_SEND_API1'.
    The Function Module is giving required output when tested and called in the report(Background Job).
    When I call this Function Module from Method-> Workflow Task the Workflow steps status is 'In Process' and not ending.
    Could you please help me on this??

    Hi shafath,
    When you try to send mail,  You need to call the function FP_JOB_OPEN before calling the function module to generate the pdf. ( /1B****)  . Is it missing in your code?

  • Send an e-mail with an attachment

    Hi all,
    The requirement is to send an e-mail with an attachment containing sales cycle information. The mail-ids will be got from the distribution list mentioned on the selection screen.
    I have to add a select-option with no intervals so that it can accept the distribution list. I also have to check the distribution list for its validity.
    How do I go about it?
    Please help.
    Thanks and regards,
    Anishur

    REPORT  zspooltopdf.
    PARAMETER: p_email1 LIKE somlreci1-receiver
                                        DEFAULT '[email protected]',
               p_sender LIKE somlreci1-receiver
                                        DEFAULT '[email protected]',
               p_delspl  AS CHECKBOX.
    *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.
    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 sy-batch EQ 'X'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
    Alternative way could be to submit another program and store spool
    id into memory, will be stored in sy-spono.
    *submit ZSPOOLTOPDF2
           to sap-spool
           spool parameters   %_print
           archive parameters %_print
           without spool dynpro
           and return.
    Get spool id from program called above
    IMPORT w_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.
      ELSE.
        SKIP.
        WRITE:/ 'Program must be executed in background in-order for spool',
                'request to be created.'.
      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.

  • External Send PO as email with PDF attachment not working

    hi,
    we are using ECC6, and in txn NACT, Processing routine we can use Sapscript External send > SAPFM06P > ENTRY_NEU > MEDRUCK > PDF and in MN04/5 i create Output record, and in SCOT my PO is ready for transmission from either ME21N/2 and ME9F - works well - email sent with pdf PO attached.
    <b>HOWEVER,</b> we have just created a SMARTFORM PO, and with similar settings, i cannot create External send OUTPUT!!! (Output failed in ME9F/ME23N) NACT settings External Send > /SMB40/FM06P > Z_MMPO_A > PDF
    In SCOT > SMTP > Internet X > Sapscript/SmartForm = PDF.
    Does special code need to be entered into Smartform to generate PDF email similar to Sapscript? Any code would be appreciated.
    regards Adam

    Hi,
    You need to build a code to create the Spool OTF output into PDF.
    This can be done in Print program, which converts the spool into PDF & sends a mail with PDF attachment.
    Please refer this sample program:
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    Best regards,
    Prashant

  • Am trying to send an e mail with an attachment from i works I can't find it to attach I saved it where is it?

    Am trying to send an e mail with an attachment from i works.  I can't find the document I wrote.  Where is it?

    emmazell33 wrote:
    Am trying to send an e mail with an attachment from i works.  I can't find the document I wrote.  Where is it?
    Wherever you saved it. Likely, Documents folder.

  • Problem in sending mail with PDF attachment

    Hi all,
    Kindly check this code..
    I neeed to send the smartform as a PDF attachment..
    PDF generated form of smartform is generated successfully..
    <b>but PDF  going as attachment is showing errors in opening</b> .
    Please help me to solve this issue as soon as possible
          DESCRIBE TABLE objtxt LINES tab_lines.
          READ TABLE objtxt INDEX tab_lines.
          doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
         doc_chng-doc_size = tab_lines * 255.
    Creation of the entry for the compressed document
          CLEAR objpack-transf_bin.
          objpack-head_start = 1.
          objpack-head_num = 0.
          objpack-body_start = 1.
          objpack-body_num = tab_lines.
          objpack-doc_type = 'RAW'.
          APPEND objpack.
    Creation of the document attachment
          DESCRIBE TABLE objbin LINES tab_lines.
    Creation of the entry for the compressed document
          CLEAR objpack-transf_bin.
          objpack-transf_bin = 'X'.
          objpack-head_start = 1.
          objpack-head_num = 0.
          objpack-body_start = 1.
          READ TABLE objbin INDEX tab_lines.
          objpack-doc_size =  tab_lines * 255 .
          objpack-body_num = tab_lines.
          objpack-doc_type = 'PDF'.
          objpack-obj_name = 'SMART'.
          objpack-obj_descr = 'test'.
          APPEND objpack.
    Completing the recipient list
    target recipent
          CLEAR reclist.
          reclist-receiver = '[email protected]'.
          reclist-express  = 'X'.
          reclist-rec_type = 'U'.
          APPEND reclist.
    Sending the document
          CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
            EXPORTING
              document_data              = doc_chng
              put_in_outbox              = 'X'
            TABLES
              packing_list               = objpack
              object_header              = objhead
              contents_bin               = objbin
              contents_txt               = objtxt
              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                     = 99.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    Regards,
    ajith

    Hello Ajith,
    Use this Code.
    Internal Table declarations
    DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    i_tline TYPE TABLE OF tline WITH HEADER LINE,
    i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
    i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    Objects to send mail.
    i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    Work Area declarations
    wa_objhead TYPE soli_tab,
    w_ctrlop TYPE ssfctrlop,
    w_compop TYPE ssfcompop,
    w_return TYPE ssfcrescl,
    wa_doc_chng typE sodocchgi1,
    w_data TYPE sodocchgi1,
    wa_buffer TYPE string,"To convert from 132 to 255
    Variables declarations
    v_form_name TYPE rs38l_fnam,
    v_len_in LIKE sood-objlen,
    v_len_out LIKE sood-objlen,
    v_len_outn TYPE i,
    v_lines_txt TYPE i,
    v_lines_bin TYPE i.
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZZZ_TEST1'
    importing
    fm_name = v_form_name
    exceptions
    no_form = 1
    no_function_module = 2
    others = 3.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    w_ctrlop-getotf = 'X'.
    w_ctrlop-no_dialog = 'X'.
    w_compop-tdnoprev = 'X'.
    CALL FUNCTION v_form_name
    EXPORTING
    control_parameters = w_ctrlop
    output_options = w_compop
    user_settings = 'X'
    IMPORTING
    job_output_info = w_return
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    i_otf[] = w_return-otfdata[].
    call function 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    IMPORTING
    bin_filesize = v_len_in
    TABLES
    otf = i_otf
    lines = i_tline
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    others = 4.
    Fehlerhandling
    if sy-subrc <> 0.
    endif.
    loop at i_tline.
    translate i_tline using '~'.
    concatenate wa_buffer i_tline into wa_buffer.
    endloop.
    translate wa_buffer using '~'.
    do.
    i_record = wa_buffer.
    append i_record.
    shift wa_buffer left by 255 places.
    if wa_buffer is initial.
    exit.
    endif.
    enddo.
    Attachment
    refresh:
    i_reclist,
    i_objtxt,
    i_objbin,
    i_objpack.
    clear wa_objhead.
    i_objbin[] = i_record[].
    Create Message Body
    Title and Description
    i_objtxt = 'test with pdf-Attachment!'.
    append i_objtxt.
    describe table i_objtxt lines v_lines_txt.
    read table i_objtxt index v_lines_txt.
    wa_doc_chng-obj_name = 'smartform'.
    wa_doc_chng-expiry_dat = sy-datum + 10.
    wa_doc_chng-obj_descr = 'smartform'.
    wa_doc_chng-sensitivty = 'F'.
    wa_doc_chng-doc_size = v_lines_txt * 255.
    Main Text
    wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + strlen( i_objtxt )
    clear i_objpack-transf_bin.
    i_objpack-head_start = 1.
    i_objpack-head_num = 0.
    i_objpack-body_start = 1.
    i_objpack-body_num = v_lines_txt.
    i_objpack-doc_type = 'RAW'.
    append i_objpack.
    Attachment
    (pdf-Attachment)
    i_objpack-transf_bin = 'X'.
    i_objpack-head_start = 1.
    i_objpack-head_num = 0.
    i_objpack-body_start = 1.
    Länge des Attachment ermitteln
    describe table i_objbin lines v_lines_bin.
    read table i_objbin index v_lines_bin.
    i_objpack-doc_size = v_lines_bin * 255 .
    i_objpack-body_num = v_lines_bin.
    i_objpack-doc_type = 'PDF'.
    i_objpack-obj_name = 'smart'.
    i_objpack-obj_descr = 'test'.
    append i_objpack.
    clear i_reclist.
    i_reclist-receiver = '[email protected]'.
    i_reclist-rec_type = 'U'.
    append i_reclist.
    call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = wa_doc_chng
    put_in_outbox = 'X'
    TABLES
    packing_list = i_objpack
    object_header = wa_objhead
    CONTENTS_BIN = i_objbin
    contents_txt = i_objtxt
    receivers = i_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 helped reward points
    Vasanth

  • Error while sending mail with pdf attachment

    Dear All,
    I am sending mail to outlook Internet address, with PDF attachment, if i have the some text in the mail along with the attachment,
    then the PDF attachment file is not opeining, throws file corrupted error.
    If i don't have the text for mail body, and send only attachment then the PDF attachments working fine.
    Please help.
    regards,
    Kumar.

    Hi Kumar,
    If you are using the th FM "SO_NEW_DOCUMENT_ATT_SEND_API1" to send the PDF data(As an attachment) to an internet address, try prepare an internal table with the text you want to mention in your mail. This table needs to be passed to the
    'contents_txt' of this function module.  You can check your mail in SOST transaction and in DOC Content section.
      Ex:  wa_objtxt           = 'Regards'.
             APPEND wa_objtxt TO t_objtxt.
    I am sure that you won't get any problem if you follow the procedure mentioned above.
    Thank You,
    Regards,
    Naresh.

  • Error while sending a mail with pdf attachment

    Hai
    I am sending mail with an attachment of PDF document. While sending I am getting
    javax.activation.UnsupportedDataTypeException: application/pdf
    This is my code
    public static void setByteArrayAsAttachment(Message msg, byte[] attach)
    throws MessagingException {
    MimeBodyPart p1 = new MimeBodyPart();
    ByteArrayDataSource byteStr = new ByteArrayDataSource(attach,"application/pdf");
    p1.setContent(byteStr,"application/pdf");
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(p1);
    msg.setContent(mp);
    Can one one help me on this...
    Thanks
    Jithesh PM

    Change
    p1.setContent(byteStr,"application/pdf");
    to
    p1.setDataHandler(new DataHandler(byteStr));

  • Error occured when sending mail with PDF attachment

    Dear Experts
    When i trigger email through SMTP server with PDF attachment using application server 10g , i got following error :
    REP-50159: Executed successfully but there were some errors when distribute the output
    i am using web.show_document utility
    str1:='http://erp.ruchi.com:7777/reports/rwservlet?destype=mail'||'&desname='||c1rec.hist_email||'&from=[email protected]'||'&subject=Your Payslip for Month '||to_char(c1rec.tran_month,'Mon-YYYY')||'&desformat=PDF&server=rep_erp_bi&report=/asdeploy/webutil/pay/reports/payslip.rdf&userid=qwqwqw/aasasas@DIAMOND'||'&COMPANY='||:parameter.para_comp_code||'&LOCATION='||:parameter.para_loc_code||'&MONTH='||to_char(:sdate,'MM/YYYY')||'&ECODE='||c1rec.tran_ecode;
    WEB.SHOW_DOCUMENT(str1,'_SELF');
    previously i had successfully using this utility but now i am facing above error
    Pl suggest
    regards
    shailesh

    Dear Experts
    I already configured application server configuration file with specifying SMTP mail server IP in pluginParam parameter
    <pluginParam name="mailServer">202.157.161.76</pluginParam>
    <property name="enableSSL" value="no"/>
    <property name="mailUserName" value="%[email protected]%"/>
    <property name="mailPassword" value="%soyacl#123%"/>
    what is the issue
    Pl clarify
    Please reply it's urgent

  • Problem for Mail with PDF attachment

    Hello all,
    I have a problem regarding sending mail with a PDF attachment from SAP. The attachment contains Payslip of employee that is being generated from a Submit program of the respective HRFORM. I have used the Submit program within a JOB and the spool request generated. From the spool request i am extracting the pages using FM RSPO_GET_PAGES_SPOOLJOB.
    Now to convert the spool job to PDF am using FM CONVERT_OTFSPOOLJOB_2_PDF.  And after the job is being finished, am deleting both the JOB and SPOOL.
    To change the output of the FM CONVERT_OTFSPOOLJOB_2_PDF, into attachment with line width of 255 am using FM SX_TABLE_LINE_WIDTH_CHANGE. Then after filling all the required parameters for FM SO_DOCUMENT_SEND_API1, am sending the mail with the attachment. I have kept the format as PDF.
    But the problem here is, the attachment is going as .DAT file and not as .PDF file!!!
    Please help to resolve this issue.
    with regards,
    Koushik.

    Hello,
    Instead of using SO* APIs to send mail you should use the BCS classes. Anyway there is a sample program BCS_EXAMPLE_8 which is very similar to your requirement
    Cheers,
    Suhas
    PS: The sample program BCS_EXAMPLE_6 has got more to do with PDF forms as is your case

  • Sapscript/Smartform via mail with PDF attachment: logo is missing

    Hi all
    I'm implementing my function to send Sapscript/smartform via mail.
    I need to do it because when a message needs to be sent, I have to insert the message as attachment but also to add a text in the body mail.
    So I've just created a simple sapscript having a logo (as graphic) and a little text.
    I use the fm CONVERT_OTF to convert the OTF to PDF format and the following code to increase the pdf string from 132 to 255 char:
    LOOP AT t_pdf.
          TRANSLATE t_pdf USING ' ~'.
          CONCATENATE l_buffer t_pdf INTO l_buffer.
        ENDLOOP.
        TRANSLATE l_buffer USING '~ '.
        DO.
          MOVE l_buffer TO l_attachment.
          APPEND l_attachment TO x_attachment.
          SHIFT l_buffer LEFT BY 255 PLACES.
          IF l_buffer IS INITIAL.
            EXIT.
          ENDIF.
        ENDDO.
    All seem to work fine, but as soon as I open the pdf file attached to the mail I can't see the logo
    So after calling fm CONVERT_OTF, I've created a pdf file by method GUI_DOWNLOAD, and then upload this file (by GUI_UPLOAD) into internal table for attachment and send the mail.
    Now really all work very fine, becaus I can see the logo
    Of course I don't want to dowload the file before sending a mail, but I need to send my print directly as pdf attachment
    The two ways seem to be equal, they use the same print and the same functions, only the way to upload the internal table for attachment is different:
    1) tha abap code above to expand the line from 132 to 255
    2) the method GUI_UPLOAD
    So something seems to be wrong in the first way because ithe logo is missing in the pdf attachment generated for the mail
    Max

    Hi
    I'm not working on unicode system, anyway I didn't see that parameter BIN_FILE, so I didn't use it
    I've read the note 1324547 and I've done just as it explaines: now works fine
    I don't know why it doesn't work with old manner (i.e data is treated as character-type), but it worls with the new one (If the data is treated as xstring-type)
    I can only suppose the data are corrupted while being elaborated for expand to 255 char....but I don't why
    Anyway your suggestion works for me
    Thank
    Max

  • Receive mail with PDF attachment into XI and send to ABAP proxy

    Hi,
    I have a scenario where I need to receive a mail into XI that has a PDF attachment. This attachment needs to be retained as ultimately I need to send the message into CRM via an ABAP proxy and read the attachment and load against a business partner.
    However, as I am only on SP13 I do not have the parameters such "Keep Attachments" available to use.
    So I have two questions:
    1. How do I receive the mail into XI with the PDF attachment ?
    2. How do I read the attachment in an ABAP proxy ?
    Any guidance in either question would be appreciated.
    Cheers
    Colin.

    hi,
    you say that there's no keep attachment
    indicator but does the XI store the attachment or not?
    maybe it stores all attachmens
    (I work with sp16 and I don't remember how it worked with sp13)
    but try maybe it accepts attachments by default
    then it would be quite easy
    if you use then use the attachement in abap proxy
    (like I said you won't have to use any java)
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • How to send mail with pdf attachment.

    hello,
    I want to know if I can send a pdf attachment via mail. My PDF file is somewhere in the server and its content doesn't need to be changed by the program. the program just needs to find the pdf in server, then it will just send pdf file as attachment to the mail. is it possible ? thanks in advance.

    Hi Friend,
    You can easily send the document by email as follows :
    REPORT ZSENDEXTERNAL.
    DATA: OBJPACK   LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
    DATA: OBJHEAD   LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
    DATA: OBJBIN    LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: OBJTXT    LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: RECLIST   LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
    DATA: DOC_CHNG  LIKE SODOCCHGI1.
    DATA: TAB_LINES LIKE SY-TABIX.
    Creation of the document to be sent
    File Name
    DOC_CHNG-OBJ_NAME = 'SENDFILE'.
    Mail Subject
    DOC_CHNG-OBJ_DESCR = 'Send External Mail'.
    Mail Contents
    OBJTXT = 'Minimum bid : $250000'.
    APPEND OBJTXT.
    OBJTXT = 'A representation of the pictures up for auction'.
    APPEND OBJTXT.
    OBJTXT = 'was included as attachment.'.
    APPEND OBJTXT.
    DESCRIBE TABLE OBJTXT LINES TAB_LINES.
    READ TABLE OBJTXT INDEX TAB_LINES.
    DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    Creation of the entry for the compressed document
    CLEAR OBJPACK-TRANSF_BIN.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM = 0.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM = TAB_LINES.
    OBJPACK-DOC_TYPE = 'RAW'.
    APPEND OBJPACK.
    Creation of the document attachment
    (Assume that the data in OBJBIN is in BMP format)
    *OBJBIN = ' \O/ '. APPEND OBJBIN.
    *OBJBIN = ' | '. APPEND OBJBIN.
    *OBJBIN = ' / \ '. APPEND OBJBIN.
    *DESCRIBE TABLE OBJBIN LINES TAB_LINES.
    *OBJHEAD = 'PICTURE.BMP'.
    *APPEND OBJHEAD.
    Creation of the entry for the compressed attachment
    *OBJPACK-TRANSF_BIN = 'X'.
    *OBJPACK-HEAD_START = 1.
    *OBJPACK-HEAD_NUM = 1.
    *OBJPACK-BODY_START = 1.
    *OBJPACK-BODY_NUM = TAB_LINES.
    *OBJPACK-DOC_TYPE = 'PDF'.
    *OBJPACK-OBJ_NAME = 'PICTURE'.
    *OBJPACK-OBJ_DESCR = 'Representation of object 138'.
    *OBJPACK-DOC_SIZE = TAB_LINES * 255.
    *APPEND OBJPACK.
    Completing the recipient list
    RECLIST-RECEIVER = <External Email id >.
    RECLIST-REC_TYPE = 'U'.
    APPEND RECLIST.
    *RECLIST-RECEIVER = 'SAPUSERNAME'.
    *RECLIST-REC_TYPE = 'P'.
    *APPEND RECLIST.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
       DOCUMENT_DATA = DOC_CHNG
       PUT_IN_OUTBOX = 'X'
    TABLES
       PACKING_LIST = OBJPACK
       OBJECT_HEADER = OBJHEAD
       CONTENTS_BIN = OBJBIN
       CONTENTS_TXT = OBJTXT
       RECEIVERS = RECLIST
    EXCEPTIONS
       TOO_MANY_RECEIVERS = 1
       DOCUMENT_NOT_SENT = 2
       OPERATION_NO_AUTHORIZATION = 4
    OTHERS = 99.
    CASE SY-SUBRC.
       WHEN 0.
       WRITE: / 'Result of the send process:'.
    LOOP AT RECLIST.
       WRITE: / RECLIST-RECEIVER(48), ':'.
       IF RECLIST-RETRN_CODE = 0.
          WRITE 'The document was sent'.
       ELSE.
          WRITE 'The document could not be sent'.
    ENDIF.
    ENDLOOP.
    WHEN 1.
       WRITE: / 'No authorization for sending to the specified number',
                'of recipients'.
    WHEN 2.
       WRITE: / 'Document could not be sent to any recipient'.
    WHEN 4.
       WRITE: / 'No send authorization'.
    WHEN OTHERS.
       WRITE: / 'Error occurred while sending'.
    ENDCASE.
    Regards
    Dhirendra Pandit

Maybe you are looking for

  • Downloads never finalized, stuck in downloads folder

    To fully diagnose this problem, I will start from the beginning I noticed something a bit 'off' about iTunes. i was browsing the iTunes Store, looking for a good mix of music to buy, adding to the Wish List, blah blah blah. I left the computer runnin

  • How can I install Office 2008 on my new MacBook Pro Retina?

    I have a license key and a cd to install from, but no slot in my MacBook to insert the CD into. I heard I can download Office 2008 from the Microsoft website, can anyone supply me with a link to the download? Not the30-day trial, the full version. Ca

  • Clicking noise! (not hard drive)

    My 13" aluminium Macbook has recently started making clicking sounds. They happen in two situations - if I move the screen forwards and backwards, it will click once when I reverse direction (from the closing/forward direction to the opening/backward

  • Controlling Matlab via TestStand COM Objects

    I am attempting to control MATLAB via teststand activex com objects.  I set up my module to use the matlab 7 automation server, and when I try to run the sequence, I get this error: "Create New Object" in automation call failed. No such interface sup

  • Oracle Developer Suite 10g (10.1.2.0.2)

    Hi, with Oracle Developer Suite 10g (10.1.2.0.2) can we developpe for E_BUSINESS 11.5.10.2 (Oracle APPLICATIONS) with 9.2.0 DB? Otherwise which (most last)version is compatible with E_BUSINESS 11.5.10.2 (Oracle APPLICATIONS). Should we installe it on