PDF attachment not getting sent via email. This occurs intermittently.

Hi All,
There is a concurrent program which sends report on Purchase Orders. The report is sent as a PDF attachment via email.
The report is getting attached sometimes and not getting attached sometimes giving an empty email. Checked the log files and output files of the program and couldnt find any issue. There is no specific time/PO/vendor pattern wherein the program fails.
Please let me know what needs to be done to get this resolved.
Regards,
Radhika.

Hi,
I am facing this issue with Oracle 11i - US Purchasing SuperUser responsiblity.
There is a concurrent program which generates a report and then sends the report to printer. The report is not getting stored in a temp file in any directory. It is directly emailed as a PDF attachment.
Sometimes the attachment is getting sent while sometimes it is not getting attached.
Please let me know if any other information is required.
Regards,
Radhika.

Similar Messages

  • Attachments not getting sent with emails on the cloud

    I am sending emails with my ME.COM account on the cloud, when I attach PDF files they show being attached but when I send it they do not end up at the other end. I have tested this 3 times and they are not being sent, the email goes though but nothing is attached at the receiving end, No error messages when sending. I have only seen this happen when I am logged in to the cloud, not on my emails from my mac or iphone. But will test them as well.

    Depending on the attachment type then you should be able to touch the attachment and view it in the Mail app itself - this won't work for every type of attachment, but things like PDFs, pictures, Word/Excel documents should open :
    Open an attached file: Tap the attachment to download it to iPad and then open it. If iPad doesn’t support the format of an attached file, you can see the name of the file but you can’t open it.
    Open an attached file with a different app: Touch and hold the attachment, then choose an app. If you don’t have any apps that can open the attachment, you can view it, provided it’s a file type that iPad supports.

  • Creating a PDF attachment and send it via Email

    Hi,
    I have following problem.
    I want to send a Purchase Order via Mail to email inbox.
    I already read in the forum that I should use the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
    Could anyone please provide me with some information about that. So how can I insert my PO into this function module (PO-Document is based on smartform and not stored in the database as a pdf-file so far)  -  so do I need to use another FM first to create a PDF file or how is it working?
    Thanks for your help,
    Christoph

    this code will help you
    *& Report  YSMARTFORM_EMAIL
    REPORT  YSMARTFORM_EMAIL.
    TABLES: VBAK.
    Constants                                                            *
    CONSTANTS:
      C_X        TYPE C VALUE 'X',         " Value X
      C_0        TYPE C VALUE '0',                              " Value 0
      C_1        TYPE C VALUE '1'.                              " Value 1
    Work Variables declaration                                           *
    DATA:
       W_UCOMM  LIKE SY-UCOMM,             " Function code
       W_TABLN  TYPE I,                    " Lines
       W_LINE   TYPE SO_TEXT255,           " Line of text
       W_EADDR(60) TYPE C.                 " FieldLength for Email
    DATA: VBAP_TAB LIKE VBAP OCCURS 0 WITH HEADER LINE.
    DATA: W_FUNMOD TYPE RS38L_FNAM.
    Structure to hold the Attributes of new Document
    DATA: FS_DOCDATA TYPE SODOCCHGI1.
    Internal table for storing OTF data form Smart-Form
    DATA: BEGIN OF FS_OTF_DATA.
            INCLUDE STRUCTURE ITCOO.
    DATA: END OF FS_OTF_DATA,
          T_OTF_DATA LIKE STANDARD TABLE OF FS_OTF_DATA.
    Internal table for storing PDF data form Smart-Form
    DATA: BEGIN OF FS_PDF_DATA.
            INCLUDE STRUCTURE TLINE.
    DATA: END OF FS_PDF_DATA,
          T_PDF_DATA LIKE STANDARD TABLE OF FS_PDF_DATA.
    Internal table to hold the attachment data text of the email
    DATA: BEGIN OF FS_ATTACH_DATA.
            INCLUDE STRUCTURE SOLISTI1.
    DATA: END OF FS_ATTACH_DATA,
          T_ATTACH_DATA LIKE STANDARD TABLE OF FS_ATTACH_DATA.
    Internal table to hold Message body of the email
    DATA: BEGIN OF FS_MESSBODY.
            INCLUDE STRUCTURE SOLISTI1.
    DATA: END OF FS_MESSBODY,
          T_MESSBODY LIKE STANDARD TABLE OF FS_MESSBODY.
    Internal table for packing list for main document
    DATA: BEGIN OF FS_OBJPACK.
            INCLUDE STRUCTURE SOPCKLSTI1.
    DATA: END OF FS_OBJPACK,
          T_OBJPACK LIKE STANDARD TABLE OF FS_OBJPACK.
    Internal table for header text of the attachment
    DATA: BEGIN OF FS_OBJHEAD.
            INCLUDE STRUCTURE SOLISTI1.
    DATA: END OF FS_OBJHEAD,
          T_OBJHEAD LIKE STANDARD TABLE OF FS_OBJHEAD.
    Internal table receiver information
    DATA: BEGIN OF FS_RECEIVER.
            INCLUDE STRUCTURE SOMLRECI1.
    DATA: END OF FS_RECEIVER,
          T_RECEIVER LIKE STANDARD TABLE OF FS_RECEIVER.
    *Internal table to store data upto 255 lines
    DATA: BEGIN OF FS_OBJCONT.
            INCLUDE STRUCTURE SOLI.
    DATA: END OF FS_OBJCONT,
          T_OBJCONT LIKE STANDARD TABLE OF FS_OBJCONT.
    *DATA : P_VBELN LIKE VBAK-VBELN.
    DATA: P_EADDR(60) TYPE C
         VALUE '[email protected]'.
    PARAMETERS : P_VBELN LIKE VBAK-VBELN.
    *PARAMETERS:
    P_EADDR(60) TYPE C.     " Email address
    SELECT SINGLE *
      FROM VBAK
    WHERE VBELN EQ P_VBELN.
    SELECT *
      FROM VBAP
      INTO TABLE VBAP_TAB
    WHERE VBELN EQ P_VBELN.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = 'YSMARTFORM_EMAIL'
       VARIANT                  = ' '
       DIRECT_CALL              = ' '
    IMPORTING
       FM_NAME                  = W_FUNMOD
    EXCEPTIONS
       NO_FORM                  = 1
       NO_FUNCTION_MODULE       = 2
       OTHERS                   = 3      .
    IF SY-SUBRC <> 0.
    Do nothing
    ENDIF.
    DATA: FS_CONT_PARM TYPE SSFCTRLOP,
          T_JOB_INFO    TYPE SSFCRESCL.
    CLEAR FS_CONT_PARM.
    FS_CONT_PARM-GETOTF    = 'X'.
    FS_CONT_PARM-NO_DIALOG = 'X'.
    FS_CONT_PARM-PREVIEW   = ''.
    CALL FUNCTION W_FUNMOD
      EXPORTING
       ARCHIVE_INDEX              =
       ARCHIVE_INDEX_TAB          =
       ARCHIVE_PARAMETERS         =
         CONTROL_PARAMETERS         = FS_CONT_PARM
       MAIL_APPL_OBJ              =
       MAIL_RECIPIENT             =
       MAIL_SENDER                =
       OUTPUT_OPTIONS             =
       USER_SETTINGS              = 'X'
        VBAK                       = VBAK
      IMPORTING
       DOCUMENT_OUTPUT_INFO       =
        JOB_OUTPUT_INFO            = T_JOB_INFO
       JOB_OUTPUT_OPTIONS         =
      TABLES
        VBAP                       = VBAP_TAB
    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.
    PERFORM CONVERT_OTF_TO_PDF.
    *&      Form  convert_otf_to_pdf
          text
    -->  p1        text
    <--  p2        text
    FORM CONVERT_OTF_TO_PDF .
      DATA: LV_BYTES TYPE P.
      IF FS_CONT_PARM-GETOTF EQ 'X'.
        REFRESH T_OTF_DATA.
        CLEAR FS_OTF_DATA.
        LOOP AT T_JOB_INFO-OTFDATA INTO FS_OTF_DATA.
          APPEND FS_OTF_DATA TO T_OTF_DATA.
          CLEAR FS_OTF_DATA.
        ENDLOOP.                           " LOOP AT t_outtab-otfdata
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            FORMAT                = 'PDF'
            MAX_LINEWIDTH         = 255
          IMPORTING
            BIN_FILESIZE          = LV_BYTES
          TABLES
            OTF                   = T_OTF_DATA
            LINES                 = T_PDF_DATA
          EXCEPTIONS
            ERR_MAX_LINEWIDTH     = 1
            ERR_FORMAT            = 2
            ERR_CONV_NOT_POSSIBLE = 3
            OTHERS                = 4.
        IF SY-SUBRC EQ 0 AND LV_BYTES IS NOT INITIAL.
          PERFORM TABLE_SHIFT.
    To send the output by email
          PERFORM SET_UP_EMAIL.
          PERFORM SEND_MAIL.
        ENDIF.                             " IF sy-subrc EQ space.
      ENDIF.                               " IF gs_control_pars-getotf
    ENDFORM.                               " convert_otf_to_pdf
    Form  set_up_email                                                   *
    This subroutine is used to set mail attributes                       *
    There are no interface parameters to be passed to this subroutine.   *
    FORM SET_UP_EMAIL .
    To setup attributes of the document
      PERFORM SET_EMAIL_HEADER.
    To set body of email
      PERFORM SET_EMAILBODY.
    To convert output table data with tab delimiter
      PERFORM PREPARE_OUTPUT_DATA_FOR_ATTACH.
    To set the Receipents
      PERFORM SET_RECEIPENTS.
    ENDFORM.                               " Set_up_email
    Form  set_email_header                                               *
    This subroutine is used to Setup the attributes of the Document      *
    There are no interface parameters to be passed to this subroutine.   *
    FORM SET_EMAIL_HEADER.
      CONSTANTS :
        LC_P TYPE C   VALUE 'P',             " Production system name
        LC_F TYPE C   VALUE 'F',             " Sensitivity
        LC_OBJNAME(6) TYPE C                 " Object name
                      VALUE 'SAPRPT'.
      CLEAR FS_DOCDATA.
    Populate the subject/generic message attributes
      FS_DOCDATA-DOC_SIZE   = 1.
      FS_DOCDATA-OBJ_LANGU  = SY-LANGU.
      FS_DOCDATA-OBJ_NAME   = LC_OBJNAME.
      FS_DOCDATA-SENSITIVTY = LC_F.
      IF SY-SYSID+0(1) NE LC_P.
        CONCATENATE 'Test mail'(003)
                    'Sales Order Details'(002)
               INTO FS_DOCDATA-OBJ_DESCR
          SEPARATED BY SPACE.
      ELSE.
        MOVE TEXT-002 TO FS_DOCDATA-OBJ_DESCR.
      ENDIF.                               " IF sy-sysid+0(1)...
    ENDFORM.                               " Set_email_header
    Form  set_emailbody                                                  *
    This subroutine is used to set body of an email                      *
    There are no interface parameters to be passed to this subroutine.   *
    FORM SET_EMAILBODY.
      CONSTANTS:
        LC_DOC_TYPE(3) TYPE C VALUE 'RAW'. " Document type
      REFRESH : T_OBJPACK,
                T_MESSBODY.
      CLEAR : FS_OBJPACK,
              FS_MESSBODY.
      MOVE:
        'Hi,'(004) TO FS_MESSBODY-LINE.
      APPEND FS_MESSBODY TO T_MESSBODY.
      CLEAR FS_MESSBODY.
      MOVE:
      'The attachment contains sales order details.'(005)
       'www.google.com'
        TO FS_MESSBODY-LINE.
      APPEND FS_MESSBODY TO T_MESSBODY.
      CLEAR W_TABLN.
      DESCRIBE TABLE T_MESSBODY LINES W_TABLN.
      CLEAR FS_MESSBODY.
      READ TABLE T_MESSBODY INTO FS_MESSBODY INDEX W_TABLN.
      FS_DOCDATA-DOC_SIZE = ( W_TABLN - 1 ) * 255 + STRLEN( W_LINE ).
      MOVE:
        SPACE    TO FS_OBJPACK-TRANSF_BIN,
        C_1      TO FS_OBJPACK-HEAD_START,
        C_0      TO FS_OBJPACK-HEAD_NUM,
        C_1      TO FS_OBJPACK-BODY_START,
        W_TABLN  TO FS_OBJPACK-BODY_NUM,
        LC_DOC_TYPE TO FS_OBJPACK-DOC_TYPE.
      APPEND FS_OBJPACK TO T_OBJPACK.
    ENDFORM.                               " Set_emailbody
    Form  prepare_output_data_for_attach                                 *
    To convert the output table data with comma delimiter                *
    There are no interface parameters to be passed to this subroutine.   *
    FORM PREPARE_OUTPUT_DATA_FOR_ATTACH.
      CONSTANTS:
        LC_DOC_TYPE(3) TYPE C VALUE 'PDF', " Document type
        LC_OBJNAME(6)  TYPE C VALUE 'SAPRPT'. " Object name
      REFRESH T_OBJHEAD.
      REFRESH T_ATTACH_DATA[].
      CLEAR   FS_ATTACH_DATA.
      T_ATTACH_DATA[] = T_OBJCONT[].
      DESCRIBE TABLE T_ATTACH_DATA LINES W_TABLN.
      FS_DOCDATA-DOC_SIZE   = ( W_TABLN - 1 ) * 255 + STRLEN( W_LINE ).
      FS_OBJPACK-BODY_NUM   = W_TABLN.
      FS_OBJPACK-DOC_SIZE   = W_TABLN * 255.
      FS_OBJPACK-TRANSF_BIN = C_X.
      FS_OBJPACK-HEAD_START = C_1.
      FS_OBJPACK-HEAD_NUM   = C_1.
      FS_OBJPACK-BODY_START = C_1.
      FS_OBJPACK-DOC_TYPE   = LC_DOC_TYPE.
      FS_OBJPACK-OBJ_NAME   = 'Attachment'.
      FS_OBJPACK-OBJ_DESCR  = 'Sales Order Details.PDF'(007).
      APPEND FS_OBJPACK TO T_OBJPACK.
    ENDFORM.                               " Prepare_output_data_for_attach
    Form  set_receipents                                                 *
    This subroutine is used to set the Receipents                        *
    There are no interface parameters to be passed to this subroutine.   *
    FORM SET_RECEIPENTS .
      CONSTANTS
       LC_REC_TYPE TYPE C VALUE 'U'.      " Receipent type
      REFRESH T_RECEIVER.
      IF P_EADDR IS NOT INITIAL.
        MOVE:
          P_EADDR TO FS_RECEIVER-RECEIVER,
          LC_REC_TYPE TO FS_RECEIVER-REC_TYPE.
        APPEND FS_RECEIVER TO T_RECEIVER.
      ENDIF.                               " IF P_EMAIL IS NOT.....
    ENDFORM.                               " Set_receipents
    Form  send_mail                                                      *
    This subroutine is used to send output by email                      *
    There are no interface parameters to be passed to this subroutine.   *
    FORM SEND_MAIL.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA                   = FS_DOCDATA
          PUT_IN_OUTBOX                   = C_X
        SENDER_ADDRESS                   = SY-UNAME
        SENDER_ADDRESS_TYPE              = 'B'
          COMMIT_WORK                     = C_X
        TABLES
          PACKING_LIST                    = T_OBJPACK
          OBJECT_HEADER                   = T_OBJHEAD
          CONTENTS_BIN                    = T_ATTACH_DATA
          CONTENTS_TXT                    = T_MESSBODY
          RECEIVERS                       = T_RECEIVER
       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 NE 0.
        MESSAGE I007(CLAIM).
      ELSE.
        MESSAGE S592(EI).
      ENDIF.                               " IF sy-subrc NE 0.
    ENDFORM.                               " Send_mail
    *&      Form  table_shift
    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.
    *There are no interface parameters to be passed to this subroutine
    FORM TABLE_SHIFT .
      CONSTANTS:
        CNV_HEXCONST_ZERO TYPE X VALUE '00'.
      DATA:
        LV_BIG_LINES(268) TYPE C
                          OCCURS 0 WITH HEADER LINE.
      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_PDF_DATA INTO FS_PDF_DATA.
        IF LFL_FLAG EQ ' '.
          CLEAR LV_BIG_LINES WITH CNV_HEXCONST_ZERO.
          ASSIGN LV_BIG_LINES(134) TO <F>.
          <F> = FS_PDF_DATA.
          LFL_FLAG = 'X'.
        ELSE.
          LV_BIG_LINES+134 = FS_PDF_DATA.
          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.
            FS_OBJCONT(LV_LEFT_I)           = LV_LEFT_T(LV_LEFT_I).
            FS_OBJCONT+LV_LEFT_I(LV_CURR_I) = LV_BIG_LINES(LV_CURR_I).
          ELSE.
            FS_OBJCONT = LV_LEFT_T(LV_LEFT_I).
          ENDIF.                           " IF lv_curr_i NE 0
        ELSE.
          FS_OBJCONT = LV_BIG_LINES(LV_CURR_I).
        ENDIF.                             " IF lv_left_i NE 0
        APPEND FS_OBJCONT TO T_OBJCONT.
        TV_LEFT_I = 268 - LV_CURR_I.
        IF TV_LEFT_I > 255.
          FS_OBJCONT = LV_BIG_LINES+LV_CURR_I(255).
          APPEND FS_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 FS_OBJCONT WITH CNV_HEXCONST_ZERO.
      ASSIGN FS_OBJCONT(LV_LEFT_I) TO <F>.
      <F> = LV_LEFT_T(LV_LEFT_I).
      APPEND FS_OBJCONT TO T_OBJCONT.
    ENDFORM.                               " Table_shift

  • Sapscript converted to PDF throug spool and sent via email

    Hello gurus, i have the following code for the requeriment and when trying to open file through transaction SOST, the system says that the file is corrupted.
    What am I doing wrong please?
    Help is very appreciated!!!!
        CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid              = w_spool
            no_dialog                = c_marca
            dst_device               = zcts_itcpo-tddest
          IMPORTING
            pdf_bytecount            = w_numbytes
          TABLES
            pdf                      = i_pdf
          EXCEPTIONS
            err_no_otf_spooljob      = 1
            err_no_spooljob          = 2
            err_no_permission        = 3
            err_conv_not_possible    = 4
            err_bad_dstdevice        = 5
            user_cancelled           = 6
            err_spoolerror           = 7
            err_temseerror           = 8
            err_btcjob_open_failed   = 9
            err_btcjob_submit_failed = 10
            err_btcjob_close_failed  = 11
            OTHERS                   = 12.
            If sy-subrc eq 0.
                   PERFORM f_convert_pdf TABLES i_pdf
                                                                     i_objbin.
                   PERFORM f_send_mail.
            endif.
    FORM f_convert_pdf  TABLES   i_source_tab STRUCTURE tline
                                 i_target_tab STRUCTURE zcts_objbin.
      DATA: l_hfeld(1600) TYPE c,
            l_offset TYPE p,
            l_tabix TYPE sy-tabix,
            l_linecount_source TYPE i,
            l_length_source TYPE i,
            l_length_target TYPE i.
      CLEAR: l_hfeld,
             l_offset,
             l_tabix,
             l_linecount_source,
             l_length_source,
             l_length_target,
             zcts_pdf,
             zcts_objbin.
      DESCRIBE FIELD i_source_tab LENGTH l_length_source IN BYTE MODE.
      DESCRIBE FIELD i_target_tab LENGTH l_length_target IN BYTE MODE.
      DESCRIBE TABLE i_source_tab LINES l_linecount_source.
      CLEAR:
        i_target_tab,
        zcts_pdf.
      LOOP AT i_source_tab INTO zcts_pdf.
        l_tabix = sy-tabix.
        MOVE zcts_pdf TO l_hfeld+l_offset.
        IF l_tabix EQ l_linecount_source.
          l_length_source = STRLEN( zcts_pdf ).
        ENDIF.
        l_offset = l_offset + l_length_source.
        WHILE l_offset GE l_length_target.
          zcts_objbin = l_hfeld(l_length_target).
          APPEND zcts_objbin TO i_target_tab.
          CLEAR zcts_objbin.
          SHIFT l_hfeld BY l_length_target PLACES.
          l_offset = l_offset - l_length_target.
        ENDWHILE.
        IF l_tabix EQ l_linecount_source.
          IF l_offset GT 0.
            zcts_objbin = l_hfeld(l_offset).
            APPEND zcts_objbin TO i_target_tab.
            CLEAR zcts_objbin.
          ENDIF.
        ENDIF.
        CLEAR:
          i_source_tab,
          zcts_pdf.
      ENDLOOP.
    ENDFORM.                    " f_convert_pdf
    FORM f_send_mail .
      DATA: l_lines_txt TYPE i,
            l_lines_bod TYPE i.
      CLEAR: i_reclist,
             i_objpack,
             l_lines_txt,
             l_lines_bod.
      CLEAR i_objhead.
    Create here the mail body
      DATA: li_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE.
      CLEAR li_mess_bod.
      li_mess_bod = text-012.
      APPEND li_mess_bod.
      IF sy-subrc EQ 0.
        CLEAR zcts_objtxt.
      ENDIF.
      CLEAR i_materials.
      READ TABLE i_materials INDEX 1.
      IF sy-subrc EQ 0.
        CONCATENATE text-013 i_materials-maktx INTO li_mess_bod SEPARATED BY space.
      ENDIF.
      APPEND li_mess_bod.
      IF sy-subrc EQ 0.
        CLEAR li_mess_bod.
      ENDIF.
      IF p_deliv IS INITIAL.
        CONCATENATE text-014 p_sales INTO li_mess_bod SEPARATED BY space.
      ELSE.
        CONCATENATE text-014 p_deliv INTO li_mess_bod SEPARATED BY space.
      ENDIF.
      APPEND li_mess_bod.
      IF sy-subrc EQ 0.
        CLEAR li_mess_bod.
      ENDIF.
      DESCRIBE TABLE li_mess_bod LINES l_lines_bod.
      CLEAR li_mess_bod.
      READ TABLE li_mess_bod INDEX l_lines_bod.
      IF sy-subrc NE 0.
        CLEAR li_mess_bod.
      ENDIF.
      zcts_doc_chng-obj_name = 'CERTIFICATE'.
    Subject
      IF p_deliv IS INITIAL.
        CLEAR i_delivery.
        READ TABLE i_delivery INDEX 1.
        IF sy-subrc EQ 0.
          CONCATENATE text-011 i_delivery-vbeln sy-datum INTO zcts_doc_chng-obj_descr SEPARATED BY space.
        ENDIF.
      ELSE.
        CONCATENATE text-011 p_deliv sy-datum INTO zcts_doc_chng-obj_descr SEPARATED BY space.
      ENDIF.
    Fill the document data and get size of attachment
      zcts_doc_chng-sensitivty = c_sens.
      zcts_doc_chng-doc_size = ( l_lines_bod - 1 ) * 255 + STRLEN( li_mess_bod ).
    Body mail
      CLEAR zcts_objpack-transf_bin.
      zcts_objpack-head_start = 1.
      zcts_objpack-head_num = 0.
      zcts_objpack-body_start = 1.
      zcts_objpack-body_num = l_lines_bod.
      zcts_objpack-doc_type = c_doc_type.
      APPEND zcts_objpack TO i_objpack.
    PDF attachment
      zcts_objpack-transf_bin = c_marca.
      zcts_objpack-head_start = 1.
      zcts_objpack-head_num = 0.
      zcts_objpack-body_start = 1.
      DESCRIBE TABLE i_objbin LINES l_lines_txt.
      zcts_objpack-doc_size = l_lines_txt * 255.
    zcts_objpack-doc_size = w_numbytes.
      zcts_objpack-doc_type = c_doc_type2.
      zcts_objpack-obj_name = c_obj_name.
      CONCATENATE text-010 sy-datum INTO zcts_objpack-obj_descr SEPARATED BY space.
      APPEND zcts_objpack TO i_objpack.
    Mail destinary
      zcts_reclist-receiver = text-018.
      zcts_reclist-rec_type = c_rec.
      zcts_reclist-com_type = c_com_type.
      APPEND zcts_reclist TO i_reclist.
    Call function below to sending PDF object to internet email address
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = zcts_doc_chng
          put_in_outbox              = c_marca
          commit_work                = c_marca
        TABLES
          packing_list               = i_objpack
          object_header              = i_objhead
          contents_bin               = i_objbin
          contents_txt               = li_mess_bod
          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 sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " f_send_mail

    hi
    good
    go through this code hope this will help you to solve your problem
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8cd6adbb-0301-0010-39ba-938c601d5db9
    reward point if hlepful.
    thanks
    mrutyun^

  • Multi server administration MSXOeprator not getting notified via email

    I created mutli server jobs and they are working fine except that I don't get any notification via email.
    The target and master are configured with DB Mail and it is working fine. But for the multi server jobs.. it isn't.
    I tried the operator that exists in both target and master and also the msxoperator.
    What am I doing wrong?
    Thanks
    Paula

    I guess this is it:
    Enable DatabaseMail on the SQL Server Agent -> properties -> Alert System  (check the checkbox), and then restart SQL Server Agent.
    Paula

  • Keeping PDF form format when sending via email

    Hello, I have created a form using Adobe LiveCycle.  It contains a submit button to send the filled out form to a recipient via email.  After numerous draft attempts the form gets converted into an .XML format when it is attached to a new email message.  I want the form to stay as a PDF but LiveCycle indicates the form would need to be sent to an HTTP address.  I don't have such an address.
    Is there some way to force the form to keep its PDF format and be sent via email by the push of a button?
    (I know that you can click File--attach to Email to but I would like to avoid that method).  Thank you.

    Q: Is there some way to force the form to keep its PDF format and be sent via email by the push of a button?
    A #1: Yes, you can use the standard button, set the format to "PDF" and supply the mailto:[email protected] and it will use the client side email software to attach and send the PDF. Note: You will need to enable usage rights on the PDF to allow Adobe Reader users to submit whole PDF format. Normally Adobe Reader users are only allowed to submit the data formats, XML and XDP for LiveCycle forms, and HTML, XFDF and FDF for Acroforms.
    A #2: You can also bypass client-side email software such as OUTLOOK, if you set the submit button action to a URL of a server-side script, such as PHP or ASP.Net. The script could generate an SMTP message, and attach the submission without the use of client-side email software. By using a server-side script, the PDF submission process is almost fool proof.
    View online examples for emailing PDF form submissions with a server-side script:
    http://www.pdfemail.net/examples/

  • Pdf form can't send via email

    my pdf form is not being sent via email as adobe is not asking fr mail address to b sent to

    Details, please.

  • No Payment document attachement (PDF) sent via email

    Hi,
    We have been running the auto-email with PDF payment attachement via F110 for quite some times. Recently my user feedback that some of the vendors receive the email sent by SAP system, however, no attachement being sent to them.
    I have checked the F110 log, which the requested email is generated successfully. However, i couldn't check whether there is email attachement being to them via SOST.
    We are in ECC6. The reported cases are perhaps 5% of the batch payment document running affected with no pdf file attachement sent via email.
    I have been searching around any similar case and how we trace the problem. Can someone share on it?
    Thank you very much in advance.

    Hi
    Ask to these vendor what kind of software they have to avoid SPAM, or if they manage black lists, 'grey' list. There are other software tools managing these messages. Sometimes these tools remove the attachments.
    I hope this helps you
    Regards
    Eduardo
    Edited by: E_Hinojosa on Dec 16, 2011 10:22 AM

  • I have been able to open pdfs created in older versions of adobe, but not the newest version. Is anyone having issues opening PDFs sent via email created in version 9?

    I have been able to open pdfs created in older versions of adobe, but not the newest version. Is anyone having issues opening PDFs sent via email created in version 9? If so, what was your solution? I have PDF reader app as well.

    Can you open the files in Preview?

  • Why does a PDF file created in Pages, attached to e-mail, not get sent?

    Why does a PDF file created in Pages, attached to e-mail, not get sent?  I even blank copied myself and nothing seems to have been sent.  Could it bee the size of the PDF file?

    They send for me, my test document was 3.8 MB.

  • I cannot open PDF filkes sent via email. I used too. nHow do I fix.

    Cannot open PDF files sent via email. The open via Word in encripted jinerish. This has not happend until now.
    Ciro

    I had the same problem.  My version of RoboHelp is pretty old (x5) and the problem was with pdfs made up in version 9.  Some pdfs would open and some would not.  It depended on the version used to make the pdf.  Got error messages and corrupted file messages.
    I solved the problem by using the full version of Acrobat and using the pdf Optimizer to make compatible with version 5( just to make sure).
    Another option is to "print" to the pdf printer when the file is open.
    Both then can be imported into RoboHelp without a problem
    Hope this helps.  It ruined many days at work for me while I tried to figure out what on earth I was going to do.
    Holly

  • Images sent via email are not attachments

    I upgraded to Lion and now, jpeg images sent via email are not attachments but are rather images embedded in the message. I want my attachments back!! Those I send images to are saying they can not save the files as there are no attachments. How do I fix this? Everything was fine with Snow Leopard and running a photography business has me sending images a lot. Clients used to "save" the images or "select all" because they were attachment files. Now they can only see the imbedded image that is not a file.
    Also, I used to send jpeg images to my Windows 7 Phone to build my portfolio when I had Snow Leopard and now with Lion I do not have files sent to my phone but the image itself which I can't save to my phone.
    HELP!

    Does the Control+Click work with PC's? My clients use PC's and they cant download the embedded images. One client specifically is a webmaster for a sports club I photograph at every sporting event. At the end of each event I may have 40 + photos downsized and sent to him to post on his site so each email will have 7 - 10 images.
    With Snow Leopard, the images would be attached files but also imbedded images on my end. On his end, they're attached files he could just select all and save then put on the site. Now he and other PC clients are saying he can only save one image at a time. This is a lot of work and seems a bit backwards to me.
    When sending to my Windows 7 Phone, the image is not embedded but shows up as an attached file which my phone then gives me the option to "save to phone". Now it's an embedded image with no options to save to phone.
    I will have a look at the Attachments Tamer but it seems crazy to have to buy an app for something that seems simple to fix on Apple's end.

  • Emails composed using the "new message" in the Get Mail add-on do not get sent until default email account is opened.

    Had this add on before using Outlook Express - worked really well. Now using Office Outlook and find that emails do not get sent until I open up the email program. Read the FAQ here http://support.mozilla.com/en-US/kb/Changing%20the%20e-mail%20program%20used%20by%20Firefox and followed instructions but has not fixed the problem. Any suggestions? Thanks in advance

    Whatever the reasons are that you think the problem exists, you will not be able to resolve it on your own. Did you see this at the bottom of the support article that I suggested that you read?
    Additional Information
    If the issue persists, you can visit iCloud Support, iTunes Support, Apple Print Products, or contact AppleCare for further assistance.
    You should probably contact iTunes Support.

  • How do i get photos sent via email into the new photos app in yosemite 10.10.3

    Using mail on my mac, having upgraded to Yosemite 10.10.3 i now cant import photos sent via email into the new photos app. if i highlight the photo in mail and right click the mouse the option is still to export to iPhoto !!

    I was clicking on the photo, so thanks for telling me about the save icon - unfortunately this still tries to open up and save to iPhoto the same as clicking on the image but my photos have been moved from iPhoto to the new photos app as part of the update to 10.10.3 Yosemite. Although it also gives me the option to save other places i cant work out how to save into the photo app

  • TS3899 my iphone does not connect to my email provider and fetch my email.  I have set up a new account but get the message "server is unavailable"..I have been getting emall ok previously, this occurred when I changed my password on my email account

    My iphone does not connect to my email provider and fetch my email.  I have been getting emall ok previously, this occurred when I changed my password on my email account. I have "set up a new account" but get the message "server is unavailable". I have tried several things but to no avail. Does anyone have the solution?
    Thanks

    Did you ever fix this problem? The same thing happened when I just changed my kids passwords and now can't access their mail on their iPods or my iPad but I use the same email provider and mine is fine however I did not change my password.  If you fixed it how did you?

Maybe you are looking for

  • Cheque print thru F-48 Downpayment to Vendor

    Hello Experts, Business Scenario : I m have to make just 1 or 2 down-payment to Vendors, for this i need not run Auto Payment Program. However, i wish to provide those Vendors with a print cheque thru the system (like that of F-58). please help how d

  • Web Dynpro Tree expanding

    Hi there! I am using the tree element in web dynpro. Not the tree in the table. I need to expand a part of the tree during loading I do not find an example. Any help is warmly appreciated. Thanks in advance, Frank

  • Unable to create database in Cloudscape// UrGent

    Hiii All, I am trying to create one new database by using cloudscape. But Every time when I give database name and click OK, it produces following exception:- java.lang.ClassNotFoundException: COM.cloudscape.core.JDBCDriver      at java.net.URLClassL

  • Appache tomcat not starting up

    Whenever i am trying to start tomcat from command line I am getting the following error. C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin>catalina.bat run Using CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat 5.0 Using CAT

  • Trigger calling procedure, then commit problems

    I am new to this so please forgive my stupidity! I have a trigger: CREATE OR REPLACE TRIGGER live_account_trigger    AFTER INSERT    ON sforce_live_test    FOR EACH ROW BEGIN    mapsapp.live_account_upsert; END live_account_trigger; /which calls a pr