Error while opening the Pdf Attachment  at the time sending mail ..

Hi Frn's ,
   i am sending a mail with pdf attachment ... but the pdf is not opening ...it is giving error "There was and error opening this document . This file can not be open because it has no page ."
Please resolve the problem ...below is the code pasted ..
REPORT  ZPRI_TEST_LDB.
DATA: it_pdf LIKE tline OCCURS 0 WITH HEADER LINE .
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.
DATA:  w_recsize TYPE i.
DATA: gd_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.
data:     gd_error    TYPE sy-subrc,
      gd_reciever TYPE sy-subrc.
PARAMETER: p_email1 LIKE somlreci1-receiver
                                    DEFAULT 'abc,
          p_sender LIKE somlreci1-receiver
                                    DEFAULT 'abc'.
perform write_output .
perform create_pdf .
PERFORM process_email .
FORM WRITE_OUTPUT .
  write:'Listed below are the employees in your area who are due a Performance Appraisal'.
  write:'during the month of May 2009 .A performance appraisal form can be found on-line'.
  write: 'in the MUD template section .The Performance Appraisal is to be completed and' .
  write:'discussed with the employee by the immediate supervisor .Signed forms should be '.
  write: 'returned to the Human Resource Department by May 31,2009 .'.
  skip 2 .
  write: 'employee name' .
  write: 'Job Date' .
  write: 'Date of last appraisal' .
ENDFORM.                    " WRITE_OUTPUT
FORM CREATE_PDF .
  DATA:  spoolno LIKE tsp01-rqident.
  DATA : p_repid LIKE sy-repid .
  DATA: v_len  TYPE i , v_len1  TYPE i .
  DATA: v_temp(8) TYPE c .
  DATA: p_uname LIKE sy-uname .
  DATA: it_tsp01 TYPE STANDARD TABLE OF tsp01 WITH HEADER LINE .
DATA: it_pdf LIKE tline OCCURS 0 WITH HEADER LINE .
  TABLES: tsp01.
  data: var  type c .
*-- STRUCTURES
  DATA:
    lc_rq2name LIKE tsp01-rq2name.
  DATA:
    mstr_print_parms LIKE pri_params,
    mc_valid(1)      TYPE c,
    mi_bytecount     TYPE i,
    mi_length        TYPE i,
    mi_rqident       LIKE tsp01-rqident.
*-- INTERNAL TABLES
  DATA:
    mtab_pdf    LIKE tline OCCURS 0 WITH HEADER LINE,
    mc_filename LIKE rlgrap-filename.
*-- SELECTION SCREEN
  DATA:
    p_linsz LIKE sy-linsz VALUE 132, " Line size
    p_paart LIKE sy-paart VALUE 'X_65_132'.  " Paper Format
*-- Setup the Print Parmaters
  CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
      authority              = space
      copies                 = '1'
      cover_page             = space
      data_set               = space
      department             = space
      destination            = space
      expiration             = '1'
      immediately            = space
      new_list_id            = 'X'
      no_dialog              = 'X'
      user                   = sy-uname
    IMPORTING
      out_parameters         = mstr_print_parms
      valid                  = mc_valid
    EXCEPTIONS
      archive_info_not_found = 1
      invalid_print_params   = 2
      invalid_archive_params = 3
      OTHERS                 = 4.
*-- Explicitly set line width, and output format so that
*-- the PDF conversion comes out OK
  mstr_print_parms-linsz = p_linsz.
  mstr_print_parms-paart = p_paart.
importing variable value set at first time to restrict the infinite loop .
  IMPORT var FROM MEMORY ID 'abc' .
  var = var + 1 .
  p_uname = sy-uname .
  p_repid = sy-repid .
*checking variable to restricted scecond time exction of this block of code
  IF var = 1 .
   v_memid = 1 .
    EXPORT var TO MEMORY ID 'abc' .
start ----p3d(02/13/2009)
EXPORT it_pernr it_pernr_quali v_memid it_pernr_status
           p_file  p_file1 rb_pres rb_app rb2 TO MEMORY ID 'bcd' .
   EXPORT it_pernr it_pernr_quali v_memid it_pernr_status it_notqualified
                    p_file  p_file1 rb_pres rb_app rb1 rb2 rb3 rb4 TO MEMORY ID 'bcd' .
    EXPORT it_pernr it_pernr_quali v_memid it_pernr_status it_notqualified
                p_file  p_file1 rb_pres rb_app rb3 rb4 TO MEMORY ID 'bcd' .
end ----p3d(02/13/2009)
submitting the spool request
    SUBMIT (p_repid) TO SAP-SPOOL
                     SPOOL PARAMETERS mstr_print_parms
                     WITHOUT SPOOL DYNPRO
                     AND RETURN.
  ENDIF.
  FREE MEMORY ID 'abc'.
  FREE MEMORY ID 'bcd'.
*Calculating the lenth of report name
  v_len = STRLEN( p_repid ) .
*consutrucing the database variable  rq2name to search the spool request
  IF v_len >= 9 .
    CONCATENATE p_repid+0(9)
                p_uname+0(3) INTO lc_rq2name .
  ELSE.
    v_len1 = 9 - v_len .
    DO v_len1 TIMES .
      CONCATENATE v_temp '_' INTO v_temp .
    ENDDO.
    CONCATENATE p_repid v_temp
                p_uname INTO lc_rq2name .
  ENDIF.
*selecting the spool request using the above consructed varibale
  SELECT * FROM tsp01 INTO TABLE it_tsp01
          WHERE rq2name = lc_rq2name .
*sorting the interbla table
  SORT  it_tsp01 BY rqcretime DESCENDING .
*reading the first spool request
  READ TABLE it_tsp01 INDEX 1.
*converting the spool request into pdf
  CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
    EXPORTING
      src_spoolid              = it_tsp01-rqident
     dst_device               = 'LP01'
    TABLES
      pdf                      = it_pdf
    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.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
  LOOP AT it_pdf.
    TRANSLATE it_pdf USING ' ~'.
    CONCATENATE gd_buffer it_pdf 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.                    " CREATE_PDF
FORM SEND_eMAIL using p_email .
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.                    " SEND_MAIL
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_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.
Thanks and Regards ..
Priyank

hi this is the part of code ...
PERFORM process_email .
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
  LOOP AT it_pdf.
    TRANSLATE it_pdf USING ' ~'.
    CONCATENATE gd_buffer it_pdf 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.                    " CREATE_PDF
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 using p_email .
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.                    " SEND_MAIL
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.

Similar Messages

  • Script to open an pdf attachment in the adobe form is not working.

    Hello Experts,
    I have a requirement where i should open pdf attachment from the attachment tab of adobe form.
    For this i have written below  java script in the click event of a button ->
    I have an attachment pdf with name attach.pdf in the attachment tab of adobe form.
    var oObj = event.target;
    oObj.openDataObject();
    ->When i click on the button it is giving the error -> TypeError: Invalid Argument type.
                                                                                    Parameter cName.
    Can any one help me how can i use openDataObject method to open an attachment from the attachment tab of adobe form.
    Regards,
    Menaka.H.B
    Moderator message: wrong forum, please post again in Adobe Interactive Forms.
    Edited by: Thomas Zloch on Oct 18, 2010 12:52 PM

    Hi,
    Please refer to the thread below where this issue has been discussed:
    Creative cloud wants to make changes
    Regards,
    Sheena

  • Error while opening a Pdf in Acrobat 9.3.4

    Hi
    Am getting the below error message while opening any pdf on Citrix (built on Windows 2003 Server) with Acrobat 9.3.4.
    Has anyone else also seen the same? and how to resolve the same?

    Update:
    Opened the Pdf and found out that the certified signature has become invalid.

  • Error while opening a pdf file sent as an attachment in mail

    Dear All,
            We have converted a alv grid into pdf and sent a mail with the attached pdf file. When the attachment is opened in the received mail we get an error " File does not begin with %pdf-". I am pasting the code.
    Select single
      from
        TSP01
      where
        RQIDENT = wa_listident.
      if sy-subrc <> 0.
         exit.
      endif.
      client = tsp01-rqclient.
      name   = tsp01-rqo1name.
    *BREAK-POINT.
      CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
             EXPORTING
                  AUTHORITY     = 'SP01'
                  CLIENT        = client
                  NAME          = name
                  PART          = 1
             IMPORTING
              CHARCO        =
              CREATER       =
              CREDATE       =
              DELDATE       =
              MAX_CREDATE   =
              MAX_DELDATE   =
              NON_UNIQ      =
              NOOF_PARTS    =
              RECTYP        =
              SIZE          =
              STOTYP        =
                  TYPE          = type
                  OBJTYPE       = objtype
             EXCEPTIONS
                  FB_ERROR      = 1
                  FB_RSTS_OTHER = 2
                  NO_OBJECT     = 3
                  NO_PERMISSION = 4.
      if objtype(3) = 'OTF'.
        is_otf = 'X'.
      else.
        is_otf = space.
      endif.
    *BREAK-POINT.
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
             EXPORTING
                  rqident              = wa_listident
                  desired_type         = desired_type
             IMPORTING
                  real_type            = real_type
             TABLES
                  buffer               = l_objcont
             EXCEPTIONS
                  no_such_job          = 14
                  type_no_match        = 94
                  job_contains_no_data = 54
                  no_permission        = 21
                  can_not_access       = 21
                  read_error           = 54.
        IF sy-subrc EQ 0.
          attach_type = real_type.
        ENDIF.
    if is_otf = 'X'.
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
            EXPORTING
              SRC_SPOOLID                    = wa_listident
              NO_DIALOG                      = c_no
          DST_DEVICE                     =
          PDF_DESTINATION                =
            IMPORTING
              PDF_BYTECOUNT                  =  gd_bytecount
              PDF_SPOOLID                    = pdfspoolid
          OTF_PAGECOUNT                  =
              BTC_JOBNAME                    = jobname
              BTC_JOBCOUNT                   = jobcount
            TABLES
              PDF                            = it_pdf_output
            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
      CHECK sy-subrc = 0.
      ENDIF.
    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.
    Please guide me to resolve this issue.
    Thanks & Regards,
    Anand

    Hi,
    is the next part of the code correct.
    What i mean is packing of the attachment, finding out the size of pdf file and doc type as PDF.
    You can also try below link..
    Link: [http://wiki.sdn.sap.com/wiki/display/Snippets/SENDALVGRIDASPDFATTACHMENTTOSAPINBOXUSINGCLASSES]
    Hope this helps.
    Regards,
    -Sandeep

  • How do I open a PDF attachment using the Open In function from iPad mail

    I Am trying to open a PDF document from my mail. In previous versions of the iOS (presently I am on 7.1.1) the open in feature of the email  re organised that you had an rhe adobe reader installed and allowed you to select this to open the document. Thiis no longer working for me.

    The functionality certainly has not gone away with iOS 7. What do you see when you attempt this (and how do you go about it)?
    Only thing I can recommend off hand is to try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps BEFORE doing the reset.

  • Error while opening a pdf file.

    Hi All,
    I have Adobe Reader 10.1.3 installed on my system.
    I am getting the following error : "Adobe Reader could not open 'abc.pdf' because it is either not a supported file type or because the file has been damaged(for example, it was sent as an email attachment and wasn't correctly decoded)". This error is coming at random, i.e. if I open a file at one time, it will open without any problem, but at another time the same file gives this problem. Could anyone please tell me as to why this is happening and how to resolve this?

    This message occurs if a PDF file is damaged, either during downloading from a website, or during transport as an email attachment.
    Are you getting this error for a file that is stored on your local HD?  For this to occur at random, as you write, I can only imagine that the disk sector where it is stored is damaged.
    Can you run a disk diagnostics, e.g. CHKDSK on Windows?

  • Rundll32 error when opening a PDF attachment from Outlook 2010

    The computer is a 32 bit Win7.  Outlook is 2010 for business.  Everything was working fine until 4 days ago.  Now have to save the pdf to the desktop and open it from there. 
    Any ideas?
    Thanks

    The rundll32 error seems to have disappeared.  Until this morning I had both this error and the rundll32.  All other types of docs open fine.  This one will open if saved to the desktop first, but not from Outlook.

  • Error while convert to pdf or html the report previewer

    while saving the previewer to pdf or html it gives the error
    REP-1249-'column cg$user has no PL/SQL formula', how to save can anyone tell me

    Thanks, You are correct, Adobe nothing to do with this issue. But I got the solution.

  • Error while opening .PDF files in document library sharepoint 2013

    Hi
    I am getting an error while opening a .pdf file,
    Please help me find the solution.
    Thanks
    Paru

    Launch IE -> Click on Gear (settings) -> Manage Add-ons -> Show: All Add-ons ->
    There are 2 Adobe Add-ons:
    Adobe PDF Reader  &  Adobe Acrobat Sharepoint Open Document
    Double-click both and be sure to click the button "ALLOW ON ALL SITES"
    (An * will appear in the field)
     http://crowdsupport.telstra.com.au/t5/T-Suite-Applications/There-was-an-error-opening-this-document-The-filename-directory/td-p/197425
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/ae2eea40-9fa6-46be-bca1-ac5eb5597d5e/sharepoint-2010-adobe-reader-error-opening-pdf-files?forum=sharepointgeneralprevious
    http://community.office365.com/en-us/f/154/t/46204.aspx?PageIndex=2
    disable the Mcafee Firewall Plug In.  This is after of course I ran superantispyware to remove some malware.  uninstalled and reinstalled the Adobe Reade
    https://forums.adobe.com/message/1776202?tstart=0

  • Facing problem with logo in the PDF attachment when sending mail...

    hi friends,
    i'm facing problem with logo in the PDF attachment to the mail.
    my requirement:
    1. enter spool number and mail id in the selection screen.
    process:
    1. now the program will fetch the spool data and converts it to PDF.
    2. but when i'm trying to send mail with this PDF as attachment.
    when i open the PDF file from the mail, logo is not coming properly (looks disturbed).
    can anyone help me how to resolve this issue...
    thanks in advance, murashali.

    hi dinakar, thanks for your mail...
    logo looks good in spool/script/smartform.
    even it look good when i download this spool to pdf and to the presentation server as pdf file.
    i'm using CONVERT_OTFSPOOLJOB_2_PDF.
    when i used CONVERT_ABAPSPOOLJOB_2_PDF, is gives a msg - 'spool number not found'.
    here i'm using folloing code to pass pdf to the function module: SO_NEW_DOCUMENT_ATT_SEND_API1.
    code:
    Transfer the 132-long strings to 255-long strings
      lt_mtab_pdf[] = pdf[].
      LOOP AT lt_mtab_pdf INTO lwa_mtab_pdf.
        TRANSLATE lwa_mtab_pdf USING ' ~'.
        CONCATENATE lv_gd_buffer lwa_mtab_pdf INTO lv_gd_buffer.
        CLEAR lwa_mtab_pdf.
      ENDLOOP.
      TRANSLATE lv_gd_buffer USING '~ '.
      DO.
        lwa_mess_att = lv_gd_buffer.
        APPEND lwa_mess_att TO lt_mess_att.
        CLEAR lwa_mess_att.
        SHIFT lv_gd_buffer LEFT BY 255 PLACES.
        IF lv_gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    NOTE: problem i believe is with ''.  i'm getting this tilt symbol () in my pdf internal table.  here in the above code the line   TRANSLATE lv_gd_buffer USING '~ ' is changing the existing tilt to space.  so my logo is getting disturbed.
    even i tried with REPLACE this tilt with other char, but it doent work.
    can you give any idea...

  • How to create a link in a PDF pointing to PDF attachment in the same document.

    I have Acrobat Pro 9.3.1 and I want to create a link inside a PDF document which points to the PDF attachment in the same document. Though I'm able to do this with the help of the documentation at http://help.adobe.com/en_US/Acrobat/8.0/Standard/help.html?content=WS58a04a822e3e50102bd61 5109794195ff-7cad.html but the issue is that whenever I click on the link my original document closes and the attached PDF opens.
    Is there a way to open the PDF (attachment) in a new window when user clicks on the link in the parent PDF?

    Hi.,
    Search -  Passing a hyperlink in a Work item  in <<link removed>>
    Accoding to Forum Rules it will not allow to post link., please search it as above.,
    hope this helps u.,
    Thanks & Regards
    Kiran
    Moderator Message: If you know the Rules, why break it?
    Edited by: kishan P on May 26, 2011 11:11 AM

  • Naming of the PDF attachment when mailing from Bursting engine

    Hi,
    We have a xml publisher report for which we have implemented Bursting Engine to archive the and burst the PDF output.
    We have a requirement now to send the PDF output as attachment to external email ids(to suppliers).I am trying to test using e the below control file to send the PDFs as attachments but the name of the PDF attachment in the mail is numeric '3','6','9' etc...
    I would like to know how do we name the PDF output attachment of the bursting engine.
    -------------------------Burst Control File------------------------------------------
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" type="bursting">
    <xapi:globalData location="stream">
    </xapi:globalData >
    <xapi:request select="/XXX_XMLPUB_ARINV/LIST_G_INVOICES/G_INVOICES">
    <xapi:delivery>
    <xapi:email server="127.0.0.1"
    port="25"
    from="[email protected]"
    reply-to="[email protected]"
    >
    <xapi:message id="123"
    to="${PURCHASE_ORDER_NUM}"
    bcc=""[email protected]""
    attachment="true"
    subject="${TRX_NUMBER}"
    >
    <html><body>test</body></html>
    </xapi:message>
    </xapi:email>
    </xapi:delivery>
    <xapi:document output-type="pdf" delivery="123">
    <xapi:template type="rtf" location="${XMLPUB_RTF_TEMPLATE}" filter=".//G_INVOICES[PRINTING_COUNT='0']">
    </xapi:template>
    </xapi:document>
    </xapi:request>
    </xapi:requestset>
    Thanks,
    Krishnan
    Edited by: Krishnan-Apps on Dec 23, 2009 2:30 AM

    Hi,
    I seriously doubt your control file is a working one. Can you upload your working/correctly formatted file?
    Or check this working sample below. Hope this helps.
    <?xml version="1.0" encoding="UTF-8"?>
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi">
    <xapi:request select="/">
         <xapi:delivery>
           <xapi:email server="xxmail.mail.com" port="25" from="[email protected]" reply-to ="[email protected]">
             <xapi:message id="${TRX_NUMBER}" to="[email protected]" cc="" bcc=""
              attachment="true" content-type="text/html" subject="${TRX_TYPE_NAME} Number ${TRX_NUMBER}">
           </xapi:message>
           </xapi:email>
         </xapi:delivery>
         <xapi:document output="Invoice_Number_${TRX_NUMBER}" output-type="pdf" delivery="${TRX_NUMBER}">
           <xapi:template type="rtf" location="xdo://AR.XXRAXINV_SEL.en.US/?getSource=true" filter="">
           </xapi:template>
         </xapi:document>
    </xapi:request>
    </xapi:requestset>regards,
    Rownald

  • Error when opening the PDF attachment

    Hi,
    We are able to successfully send the PDF attachment to external email id  from SAP SCRIPT:
    but when we are opening the PDF attachment we are getting the following error:
    "Adobe Reader could not open because it is not either a supported file type or the file has been damaged ..etc.."
    Is any logic need to write for the above or any parameters are missing .
    Can any one help...
    Thanks in advance.

    Hi Ramana,
                Just try below given example code.....In which I have just different function Module to convert from OFT to PDF....
       AT END OF VSTEL.
          IF R_EMAIL = 'X'.
    *--Opening Layout set for Printing
            PERFORM CLOSE_FORM.
           SELECT SINGLE SMTP_ADDR INTO V_EMAIL
           FROM ADR6
           WHERE ADDRNUMBER = T_ADRC-ADDRNUMBER.
            CLEAR T_LIPS.
            READ TABLE T_LIPS WITH KEY VBELN = T_LIKP-VBELN.
            CLEAR T_VBAK.
            READ TABLE T_VBAK WITH KEY VBELN = T_LIPS-VGBEL.
            CLEAR V_ADRNR.
            SELECT SINGLE ADRNR
            INTO V_ADRNR
            FROM T001
            WHERE  BUKRS = T_VBAK-BUKRS_VF.
            REFRESH T_CC_EMAIL.
            CLEAR T_CC_EMAIL.
            SELECT  SMTP_ADDR INTO TABLE T_CC_EMAIL
            FROM ADR6
            WHERE ADDRNUMBER = V_ADRNR.
         SELECT SINGLE smtp_addr
         INTO cc_email
         FROM adr6
         WHERE addrnumber = v_adrnr.
            IF T_TO_EMAIL[] IS INITIAL.
              CLEAR T_CC_EMAIL.
              REFRESH T_CC_EMAIL.
            ENDIF.
            PERFORM BUILD_PDF_DATA_TABLE.
    Populate message body text
            PERFORM POPULATE_EMAIL_MESSAGE_BODY.
            CONCATENATE  T_LIKP-VSTEL '-' 'Warehouse Release' INTO V_SUBJECT SEPARATED BY SPACE.
    Send file by email as .xls speadsheet
            PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
                                         TABLES IT_MESSAGE
                                                PT_CONTENTS_BIN       "LINES    "it_attach
                                          USING V_EMAIL
                                                V_SUBJECT
                                                'PDF'
                                                'Delivery'
                                                'Deliveries'
                                       CHANGING GD_ERROR
                                                GD_RECIEVER.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
            PERFORM INITIATE_MAIL_EXECUTE_PROGRAM.
          ENDIF.
        ENDAT.
    ***---/End by sagun
      ENDLOOP. "loop at t_likp.
    ***---/added by sagun 25.05.2007
      IF R_EMAIL = 'X'.
        WRITE /01 SY-ULINE(180).
        WRITE :/55 'End of Report'.
      ENDIF.
    ***---/end by sagun
    ENDFORM.                    " PRINT_DELIVERY
    *&      Form  close_form
          text
    -->  p1        text
    <--  p2        text
    FORM CLOSE_FORM .
      IF R_PRINT = 'X'.                   " added by sagun 24.05.2007
        CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
         EXCEPTIONS
           UNOPENED                       = 1
           BAD_PAGEFORMAT_FOR_PRINT       = 2
           SEND_ERROR                     = 3
           SPOOL_ERROR                    = 4
           CODEPAGE                       = 5
           OTHERS                         = 6
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.                             " added by sagun 24.05.2007
      IF R_EMAIL = 'X'.
    *otf_table  like itcoo occurs 0 with header line
        CALL FUNCTION 'CLOSE_FORM'
         IMPORTING
           RESULT   = .
             TABLES
               OTFDATA  = HOTFDATA
             EXCEPTIONS
               UNOPENED = 3.
      ENDIF.
    ENDFORM.                    " close_form
    *&      Form  BUILD_PDF_DATA_TABLE
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_PDF_DATA_TABLE .
      DATA :  LC_FORMAT(3) TYPE C VALUE 'PDF'.
    DATA: lt_tline TYPE tp_tline_standard_table,
      DATA :  L_BIN_FILESIZE TYPE I,
              PC_CONTENTS_BIN_LINES TYPE I.
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = LC_FORMAT
        IMPORTING
          BIN_FILESIZE          = L_BIN_FILESIZE
        TABLES
          OTF                   = HOTFDATA
          LINES                 = LINES
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          OTHERS                = 4.
      IF SY-SUBRC = 0.
        CALL FUNCTION 'QCE1_CONVERT'
          TABLES
            T_SOURCE_TAB         = LINES
            T_TARGET_TAB         = PT_CONTENTS_BIN
          EXCEPTIONS
            CONVERT_NOT_POSSIBLE = 1
            OTHERS               = 2.
        IF SY-SUBRC = 0.
          DESCRIBE TABLE PT_CONTENTS_BIN LINES PC_CONTENTS_BIN_LINES.
        ELSE.
    ... -->
        ENDIF.
      ELSE.
    An OTF conversion error occured
    -->
      ENDIF.
    ENDFORM.                    " BUILD_PDF_DATA_TABLE
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
          text
    -->  p1        text
    <--  p2        text
    FORM POPULATE_EMAIL_MESSAGE_BODY .
      REFRESH IT_MESSAGE.
      IT_MESSAGE = 'Please find enclosed here with our Warehouse Release Document(s)'.
      APPEND IT_MESSAGE.
      CLEAR IT_MESSAGE.
      APPEND IT_MESSAGE.
      APPEND IT_MESSAGE.
      APPEND IT_MESSAGE.
      APPEND IT_MESSAGE.
      IT_MESSAGE = 'For United Phosphorous Inc.'.
      APPEND IT_MESSAGE.
      CLEAR IT_MESSAGE.
    APPEND it_message.
    APPEND it_message.
    APPEND it_message.
      IT_MESSAGE = 'TEST EMAIL from 520 clinet please ignore it'.
      APPEND IT_MESSAGE.
    ENDFORM.                    " POPULATE_EMAIL_MESSAGE_BODY
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          text
         -->PIT_MESSAGE  text
         -->PIT_ATTACH  text
         -->P_EMAIL  text
         -->P_MTITLE  text
         -->P_FORMAT   text
         -->P_FILENAME   text
         -->P_ATTDESCRIPTION   text
         -->P_SENDER_ADDRESS   text
         -->P_SENDER_ADDRES_TYPE   text
         <--P_ERROR  text
         <--P_RECIEVER  text
    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.
    p_filename  = 'INVOICE'.
      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 PIT_ATTACH INDEX W_CNT.
      W_DOC_DATA-DOC_SIZE =
         ( W_CNT - 1 ) * 255 + STRLEN( PIT_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.
      LOOP AT T_TO_EMAIL WHERE EMAIL <> SPACE.
        CLEAR T_RECEIVERS.
        T_RECEIVERS-RECEIVER = T_TO_EMAIL-EMAIL.
        T_RECEIVERS-REC_TYPE = 'U'.
        T_RECEIVERS-COM_TYPE = 'INT'.
        T_RECEIVERS-NOTIF_DEL = 'X'.
        T_RECEIVERS-NOTIF_NDEL = 'X'.
        APPEND T_RECEIVERS.
        CLEAR T_RECEIVERS.
      ENDLOOP.
    copy email address
      CLEAR T_RECEIVERS.
      IF NOT T_RECEIVERS[] IS INITIAL.
        LOOP AT T_CC_EMAIL.
          T_RECEIVERS-RECEIVER = T_CC_EMAIL-EMAIL.
          T_RECEIVERS-REC_TYPE = 'U'.
          T_RECEIVERS-COM_TYPE = 'INT'.
    t_receivers-notif_del = 'X'.
    t_receivers-notif_ndel = 'X'.
          T_RECEIVERS-COPY       = 'X'.
          APPEND T_RECEIVERS.
          CLEAR T_RECEIVERS.
        ENDLOOP.
      ENDIF.
      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.
      IF SY-SUBRC = 0.
        FORMAT COLOR COL_NORMAL ON.
        LOOP AT T_LOG.
          WRITE :/03 T_LOG-VBELN,
                  19 SY-VLINE,
                  20 T_LOG-KUNNR,
                  34 SY-VLINE,
                  35 T_LOG-NAME1,
                  76 SY-VLINE,
                  77 T_LOG-EMAIL,
                  110 SY-VLINE,
                  111 'Email Sent Successfuly',
                  180 SY-VLINE.
        ENDLOOP . "t_log
        FORMAT COLOR COL_NORMAL OFF.
        CLEAR T_LOG.
        REFRESH T_LOG.
      ENDIF.
      IF SY-SUBRC NE 0.
        CASE LD_ERROR.
          WHEN   1.
            V_ERROR =  'too_many_receivers' .
          WHEN   2.
            V_ERROR =  'Email address not found in Customer Master' .
          WHEN   3.
            V_ERROR =  'document_type_not_exist'.
          WHEN   4.
            V_ERROR =  'operation_no_authorization'.
          WHEN   5.
            V_ERROR =  'Email address not found in Customer Master'.
          WHEN   6.
            V_ERROR =   'x_error'.
          WHEN   7.
            V_ERROR =   'enqueue_error'.
          WHEN   8.
            V_ERROR =   'Error in sending email' .
        ENDCASE.
        FORMAT COLOR COL_NEGATIVE ON.
        LOOP AT T_LOG.
          WRITE :/03 T_LOG-VBELN,
             19 SY-VLINE,
             20 T_LOG-KUNNR,
             34 SY-VLINE,
             35 T_LOG-NAME1,
             76 SY-VLINE,
             77 T_LOG-EMAIL,
             110 SY-VLINE,
             111 V_ERROR,
             180 SY-VLINE.
        ENDLOOP . "t_log
        FORMAT COLOR COL_NEGATIVE OFF.
        CLEAR T_LOG.
        REFRESH T_LOG.
      ENDIF.
    ENDFORM.                    " SEND_FILE_AS_EMAIL_ATTACHMENT
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          text
    -->  p1        text
    <--  p2        text
    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
    Reward Point If it usefull....
    Cheers,
    Sagun Desai....

  • Getting 'Out of memory' error while opening the file. I have tried several versions of Adobe 7.0,9.0,X1. It is creating issue to convert PDF into TIFF. Please provide the solution ASAP

    Hello All,
    I am getting 'Out of memory' error while opening the file. I have tried several versions of Adobe 7.0,9.0,X1.
    Also, it is creating issue to convert PDF into TIFF. Please provide the solution ASAP.

    I am using Adobe reader XI. When i open PDF it gives "OUT of memory" error after scrolling PDF gives another alert "Insufficient data for an image". after clicking both alerts it loads full data of PDF. It is not happening with all PDFs. couple of PDFs are facing this issue. Because of this error my software is not able to print these PDFS into TIFF. My OS in window7*64. I tried it on win2012R2 and XP. Same issue is generating there.
    It has become critical issue for my production.

  • Unable to open large PDF file from the Attachment list.

    Hi Gurus,
    Users had attached 10 PDF file in the work order attachment list and his supervisor is trying to open the PDF file from the work order attachment list and he is able to open 9 PDF files without any issue, but 1 PDF file is giving the error message as "Database error for <GET DATA FROM KPRO>" and then select ok, we are getting the below message.
    Window cannot find u201CC/Documents and Settings/b2m/SaoworkDir/5015851 Vendor data sheets B&P 2010 SDown XXX .PDFu2019. Make sure you typed the name correctly, and then try again. To search for a file, click the start button, and then click serch.
    Looks like this particular file is not transferring to the SAP work directory.
    Could you please check and suggest us as to how to fix it.
    Thanks & Regards,
    Srivas

    Hi,
    Thanks for your reply.
    We verified  your OSS notes it's not relevant to us Because our issue is while opening the PDF aatchement it is not transferring to my SAP Work Directory because of that reason we are getting the KPRO error. When I'm opening the other PDF files it's transferring to my SAP Work Directory and it's automatically open without any issue.
    Please check and suggest.
    Thanks,
    Srivas

Maybe you are looking for