Error when reading a pdf attachment file in sap inbox

Hi all,
I have created a RFC which sends mail from an external user to my sap inbox with attachment.
the problem is with the PDF attachment where when i received the mail in my sap inbox in sbwp, it says that there is an error that it wasnt correctly decode.
I used the class cl_document_bcs...
and used the method add_attachment...
would plz help me out

this is my code
FUNCTION ZMAIL_READ.
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(SUBJECT) TYPE  SO_OBJ_DES
*"     VALUE(TEXT) TYPE  STRING
*"     VALUE(SENDER) TYPE  ADR6-SMTP_ADDR
*"     VALUE(RECEIVER) TYPE  ADR6-SMTP_ADDR
*"     VALUE(ATTACHMENTS) TYPE  Z_T_XATTACH OPTIONAL
*"  EXPORTING
*"     VALUE(MESSAGE) TYPE  STRING
DATA: lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
      lo_bcs_send_request TYPE REF TO cl_bcs,
      l_send type ADR6-SMTP_ADDR ,
      l_rec type  ADR6-SMTP_ADDR .
data: it_text type table of soli,
      wa_text type soli.
DATA: lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
DATA: lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
DATA: lv_recipient_uid TYPE uname,
      lv_recipient_mail TYPE adr6-smtp_addr.
data: lo_message type ref to cx_send_req_bcs value is initial,
      text_val type string.
data: it_userlist type table of BAPIUSNAME,
      wa_userlist type BAPIUSNAME.
data: it_selection_range type table of BAPIUSSRGE,
      wa_selection_range type BAPIUSSRGE.
data: wa_attachment TYPE ZXATTACH,
      attachment_sub type SO_OBJ_DES.
DATA: xstr type xstring,
      str TYPE string,
      str1 type string,
      it_str2 type table of soli,
      wa_STR2 TYPE SOLI.
DATA: LOC_CONV TYPE REF TO CL_ABAP_CONV_IN_CE,
      wa_solix type solix,
      it_solix type table of solix,
      wa_soli type soli,
      it_soli type table of soli.
data result TYPE boolean.
data: i_ext(10) type c,
      i_type type soodk-objtp.
wa_text-line = text.
append wa_text to it_text.
CLASS cl_bcs DEFINITION LOAD.
try.
lo_send_request = cl_bcs=>create_persistent( ).
catch cx_send_req_bcs.
endtry.
* Message body and subject
data: lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
try.
lo_document = cl_document_bcs=>create_document(
     i_type = 'RAW'
     i_text =  it_text
     i_subject = subject ).
catch cx_send_req_bcs.
catch cx_document_bcs.
catch cx_address_bcs.
endtry.
loop at attachments into wa_attachment.
attachment_sub = wa_attachment-file_name.
it_str2 = wa_attachment-attach.
loop at it_str2 into wa_str2.
  str1 = wa_str2-line.
try.
CALL FUNCTION 'SSFC_BASE64_DECODE'
  EXPORTING
    B64DATA                        = str1
*   B64LENG                        =
*   B_CHECK                        =
  IMPORTING
    BINDATA                        = xstr
* EXCEPTIONS
*   SSF_KRN_ERROR                  = 1
*   SSF_KRN_NOOP                   = 2
*   SSF_KRN_NOMEMORY               = 3
*   SSF_KRN_OPINV                  = 4
*   SSF_KRN_INPUT_DATA_ERROR       = 5
*   SSF_KRN_INVALID_PAR            = 6
*   SSF_KRN_INVALID_PARLEN         = 7
*   OTHERS                         = 8
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
catch cx_sy_dyn_call_illegal_type.
endtry.
CALL METHOD CL_ABAP_CONV_IN_CE=>CREATE
      EXPORTING
        INPUT       = xstr
        ENCODING    = 'UTF-8'
*        REPLACEMENT = '?'
*        IGNORE_CERR = ABAP_TRUE
      RECEIVING
        CONV        = loc_CONV.
TRY.
    CALL METHOD LOC_CONV->READ
      IMPORTING
        DATA = STR.
CATCH CX_SY_CONVERSION_CODEPAGE.
CATCH CX_SY_CODEPAGE_CONVERTER_INIT.
CATCH CX_PARAMETER_INVALID_TYPE.
CATCH CX_PARAMETER_INVALID_RANGE.
ENDTRY.
wa_solix-line = xstr.
append wa_solix to it_solix.
wa_soli-line = str.
append wa_soli to it_soli.
endloop.
try.
CALL FUNCTION 'SA_KW_RFC_FILENAME_EXT_GET'
  EXPORTING
   AREA            = 'IWBSOLAR'
    MIMETYPE        = wa_attachment-type
IMPORTING
   EXTENSION       = i_ext
catch cx_sy_dyn_call_illegal_type.
endtry.
i_type = i_ext.
if i_ext <> 'pdf'.
try.
  lo_document->add_attachment(
  EXPORTING
    i_attachment_type = i_type
    i_attachment_subject = attachment_sub
    i_att_content_hex = it_solix ).
       CATCH cx_document_bcs.
endtry.
clear wa_solix.
refresh it_solix.
else.
TRY.
  CALL METHOD LO_DOCUMENT->ADD_ATTACHMENT
    EXPORTING
      I_ATTACHMENT_TYPE     = i_type
      I_ATTACHMENT_SUBJECT  = attachment_sub
*      I_ATTACHMENT_SIZE     =
*      I_ATTACHMENT_LANGUAGE = SPACE
      I_ATT_CONTENT_TEXT    = it_soli
*      I_ATT_CONTENT_HEX     =
*      I_ATTACHMENT_HEADER   =
   CATCH CX_DOCUMENT_BCS .
  ENDTRY.
ENDIF.
endloop.
try.
lo_send_request->set_document( lo_document ).
CATCH cx_send_req_bcs.
endtry.
wa_selection_range-PARAMETER = 'address'.
wa_selection_range-field = 'e_mail'.
wa_selection_range-sign = 'I'.
wa_selection_range-option = 'EQ'.
wa_selection_range-low = receiver.
append wa_selection_range to it_selection_range.
try.
CALL FUNCTION 'BAPI_USER_GETLIST'
* EXPORTING
*   MAX_ROWS              = 0
*   WITH_USERNAME         = ' '
* IMPORTING
*   ROWS                  =
TABLES
    SELECTION_RANGE       = it_selection_range
*   SELECTION_EXP         =
    USERLIST              = it_userlist
*   RETURN                =
catch cx_sy_dyn_call_illegal_type.
endtry.
read table it_userlist into wa_userlist index 1.
try.
  lo_sender = cl_cam_address_bcs=>create_internet_address( sender ).
  lo_send_request->set_sender(
     EXPORTING
     i_sender = lo_sender ).
catch cx_send_req_bcs.
catch cx_document_bcs.
catch cx_address_bcs.
  return.
endtry.
try.
    lo_recipient = cl_sapuser_bcs=>create( wa_userlist-USERNAME ).
    lo_send_request->add_recipient(
       EXPORTING
         i_recipient = lo_recipient ).
*         i_express = 'X' ).
  catch cx_send_req_bcs.
  catch cx_document_bcs.
  catch cx_address_bcs.
endtry.
try.
** Send email
     LO_SEND_REQUEST->SET_SEND_IMMEDIATELY( 'X' ).
     lo_send_request->send( EXPORTING
     i_with_error_screen = ' '
     RECEIVING
     result = result ).
     COMMIT WORK.
CATCH CX_DOCUMENT_BCS.
CATCH CX_SEND_REQ_BCS INTO lo_message.
CATCH CX_ADDRESS_BCS.
text_val = lo_message->IF_MESSAGE~GET_TEXT( ).
endtry.
if result = 'X'.
  message = 'E-Mail sent'.
else.
  message = 'E-Mail not sent'.
endif.
ENDFUNCTION.

Similar Messages

  • 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....

  • Error when Packaging and PDF'ing File

    I am curently involved in creating a comprehensive brand book (60 pages) for our company in InDesign CS4 and seem to have a problem when I PDF or go to package the InDesign file. The message I get is:
    "Error encountered while reading JPEG image. Image may be damaged or incompatible. Resave the image with different settings and try again."
    Funny thing is when I close InDesign and re-open the file, then go to PDF it works fine. But then after I have worked on it and go to re-PDF it starts Ok but gets to about page 18 and the error pops up. I get the same error when I go to package the file even in the package summary - could not figure out what was wrong. I tried deleting all images off that page then re-PDF and still does not work.
    What's worse is that InDesign does not provide detailed information regarding the image or error, I had to look where the bar stopped while I was in the process of PDF to figure out what page the image is on.
    Can anyone shed some light on this?
    Thanks

    Here is an earlier thread discussing this problem:
    http://www.adobeforums.com/webx?128@@.59b7927d
    There's some unrelated stuff in the middle, but relevant information at both ends.
    Peter

  • Error when reading back a binary file

    Hello,
    I am writing out a binary file consisting of U32 arrays, packed strings, and clusters. I get error 116 when reading back. As long as I am synchronized on the correct data position why should LV care what I write to the file? In the example I write a simple 16 element array and a time stamp cluster. When reading back the array I get the error. What is the correct way to do mixed structures? Thanks.
    Attachments:
    file write.PNG ‏44 KB

    David,
    You can solve the problem in various ways. The easiest might be to modify the writer VI by wiring a True constant into the "header (F)" input of your first Write File node. That forces LabVIEW to include a four-byte header that specifies the length of the array you are writing.
    When you wire up the reader code the way you did, the length of the array you wire to the "byte stream type " input is irrelevant; by wiring nothing into the "count" input, you are implicitly telling LabVIEW to look for a header to determine the length of the array you are asking it to read. Because you didn't write any header, LabVIEW is interpreting the first four bytes of the array itself as a length. That length doesn't match the actual amount of data present in the datafile, so LabVIEW generates your error.
    An alternative solution would be to leave the writer unchanged and modify the reader VI: wire an I32 constant into "byte stream type" and wire a 16 into "count". The choice depends on what you prefer and whether or not these binary files need to be compatible with some other program or not.
    Another aside: you can dispense with your case that checks whether the datafile already exists. Just change the function input of the Open/Create/Replace to "create or replace" and wire a False constant into its "advisory dialog" input.
    Hope that's clear,
    John

  • 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 when saving an Outlook attachment eg. Word Doc after opening it.

    we made the group policy change which was giving an error when saving from opened attached files.
    But for 1 particular RDS user the error still seems to be occurring. i've tried the following,
    1. recreating outlook.
    2. recreating user profile.
     3. deleted the group policy history from the registry.
    4. tried removing outlook add-ins.
    your help would be really appreciated.
    kind regards

    Hi,
    What is the error? Does outlook crash? Would you please also detail the group policy change?
    We can try cleaning out the Temporary Outlook Files folder to check the result.
    We can refer to the following link for the detailed steps to locate and find the temp folder:
    http://www.howto-outlook.com/faq/securetemp.htm
    Then we need to use OutlookTempCleaner to clean the folder:
    http://www.howto-outlook.com/products/outlooktempcleaner.htm
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Regards,
    Melon Chen
    TechNet Community Support

  • Acrobat Reader DC  one source of pdf attached files

    I have a MacBook Pro and found that since updating to Acrobat Reader DC there is one source of pdf attached files that do not open (I just get a black screen).
    I do not have this problem with my iPad nor with an iMac also running the same reader. 
    I cannot find any 'switches' that will resolve this problem.   I get an error message saying that Acrobat Reader DC could not open "File reference" because it is either not a supported file type or because the file has been damaged.  This cannot be the case as this file opens on other computers so it has to be localised to my MacBook Pro.  Other pdf files open normally and I am at a lost in deciding as to what is going wrong and how to rectify.

    If the same attachment can be viewed successfully on other devices, then it must get corrupted during the download on that one machine.
    People should really stop sending e-documents as attachments, it is much safer using a file sharing service such as Acrobat.com - upload and share the document, then send the download link via email.

  • Problems converting PDF to MS Word document.  I successfuly converted 4 files and now subsequent files generate a "conversion failure" error when attempting to convert the file.  I have a large manuscript and I separated each chapter to assist with the co

    Problems converting PDF to MS Word document.  I successfully converted 4 files and now subsequent files generate a "conversion failure" error when attempting to convert the file.  I have a large manuscript and I separated each chapter to assist with the conversion; like I said, first 4 parts no problem, then conversion failure.  I attempted to convert the entire document and same result.  I specifically purchased the export to Word feature.  Please assist.  I initially had to export the Word Perfect document into PDF and attempting to go from PDF to MS Word.

    Hi sdr2014,
    I'm sorry to hear your conversion process has stalled. It sounds as though the problem isn't specific to one file, as you've been unable to convert anything since the first four chapters converted successfully.
    So, let's try this:
    If you're converting via the ExportPDF website, please log out, clear the browser cache, and then log back in. If you're using Reader, please choose Help > Check for Updates to make sure that you have the most current version installed.
    Please let us know how it goes.
    Best,
    Sara

  • When i try to attach files in hotmail, i get a message that silverlight plugin has crashed and error report indicates error about plugin-container.exe ; ihave the latest silverlight plugin. what to do?

    * I work on windows XP
    I have latest fire fox and silver light plugin
    * "silver light plugin has crashed" is what i get when i try to attach files in hotmail
    * error report indicates about plugin-container.exe.
    * where to find plugin-container.exe. to install and try

    Hi,
    Please also try to '''Disable''' the Silverlight add-on in '''Tools '''('''Alt '''+ '''T''') > '''Add-on''' > '''Plugins''' before opening Hotmail. You may still be able to attach files.

  • Save as does not Create PDF Compatible File even when the creare pdf compatible files is on, Illustrator CC 2014

    save as does not Create PDF Compatible File even when the creare pdf compatible files is on, Illustrator CC 2014

    When I open is adobe acrobat I get this message.
    "This is an Adobe® Illustrator® File that was
    saved without PDF Content.
    To Place or open this  le in other
    applications, it should be re-saved from
    Adobe Illustrator with the "Create PDF
    Compatible File" option turned on. This
    option is in the Illustrator Native Format
    Options dialog box, which appears when
    saving an Adobe Illustrator  le using the
    Save As command."

  • Can not launch lightroom says error when reading its preview cache

    I can not launch Lightroom is puts up a error message that says it encountered an error when reading its preview cache and goes in to a loop that keeps closing the program
    I have restarted my comp 4 times same this each time
    I can't find any trouble shooting and when I try and download lightroom again it just puts me back at the creative cloud desktop which I can't click in anything

    You need to delete the preview cache. LR will automatically create new previews.
    Read here and here are the locations. Don't touch the *.lrcat file.

  • Lightroom encountered an error when reading it's preview cache

    I been getting this error for over 2-3 months and thought it would go away with the new version releases, i tried all the standard fixes,deleting the catalog,compacting etc. even moving it to new folder, reinstalled the software twice.  The whole nine yards. IMHO, there's a problem with the software, it may be uique with differetent type of machine setup or a corrupt file in the in the catalog and the compacting doesn't fix it.
    The error always happens while in the develope and crashed, has to leave the software (sometimes it just hangs the software and you have to kill the task manually).  You have at least 10-15 seconds before going back in, otherwise it will still crash, a thread is still occuring from the orginal crash and still completing it's task. That's the error, annoying as heck.
    My only hoping is a new version of LR comes out soon (4.0) and it goes away, otherwise, I'm going to find something else-- driving me crazy, I spend about 10-15% of my time each week getting out and back in to make go away, then can go for a day(s) sometimes and no problems.  I tried recreating the problem on specific photos where I think it might be corrupt, that doesn't give any clue, there is no pattern to this at all, it happens randomly on new photos and old photos, yet i can go back to those photos again and no problems.
    Any NEW ideas would be appreciated (no compact, no new catalogs, new installs, turn off various options cache preview etc. move to new folder and more.....done that etc.).

    The error is exactly what's it in  the title of the post, Lightroom encountered an error when reading from its preview cache and needs to quit.  That's it.
    I don't know what else to tell you, i wish I had more.  This is all over the internet, I followed pretty much all the solutions, delete the catalog or delete the preview folders (tried both).  Tinker with the cachee preferences.   Most people kill the preview folders and the catlog gets recreated and there problem is resovled, doesn't work for me.
    No cloning, totally two different catalogs (not networked etc.)  a good question though.
    When I am refering to catalog and cache, I strictly talking about LR only, nothing outside of that or in the operating system, just LR files only, here they are:
    I  have a   LR catalog folder called--->   C:\Users\Mark\Documents\LightRoom Catalog\LR_Catalog
    you have another folder called: LR_Catalog Previews.lrdata   (with many subfolders underneath at)
    and I have LR catalog filein C:\Users\Mark\Documents\LightRoom Catalog\LR_Catalog
    LR_Catalog.LRCAT
    That's it, a file and a folder with many sub-folders.  I'll get a screen print with error next, but it's basically what I said earlier in the beginning, you can be in develope or even the library, and error occurs in a message box, you hit ok and the application exits. On average it can happen 6-7 times with an hour and sometimes not at all, working with same the photos.  Sometimes it can happen within mintues, sometimes not at all for over 2 hours.  There is no specific pattern to it. 

  • "Lightroom encountered and error when reading from its preview cache and needs to quit"

    I keep receiving this error every time I open LR, "Lightroom encountered and error when reading from its preview cache and needs to quit" and the app won't open. It said LR would try and fix this error next time I opened it but the error remains. I tried uninstalled and installing the app and the error remains.
    Any Ideas here? Is there another app that may be telling it where to look for the cache and it no longer there? I was using a ramdisk for a bit but ditched it. Not sure if that has something to do with it but it seems suspect.
    Your thoughts?
    --Kenny Brandon Wilson

    Talked to Adobe support this morning, this is their response in case anyone else is looking for help. I'm running a Windows 7 box, LR 5.6.
      Gokul: Click on start and type %appdata%, then open roaming folder.
      Edward: ok
      Gokul: Open Adobe folder.
      Gokul: Open Lightroom folder.
      Gokul: Open Lightroom folder> Preferences.
      Edward: ok
      Gokul: Rename Lightroom 5 Preferences.agprefs file as Lightroom 5 Preferences.agprefsOLD.
      Edward: OK
      Gokul: Please check if you can launch Lightroom without any error.
      Edward: it shows me a welcome screen and is asking me to select my country
      Edward: aka, register the software
      Gokul: You can skip and launch it.
      Edward: LR catalog not found
      Gokul: Please select the catalog.
      Edward: my original catalog?
      Gokul: Yes.
      Edward: testing integrity of catalog
      Edward: loaded just fine
      Gokul: Okay.
      Gokul: Please check if you can re-launch it again.
      Edward: yes, it worked!
      Gokul: Excellent!
      Gokul: Since your preferences were corrupted you were facing issue so we renamed the preferences file to reset it.
      Edward: aha....ok
    All of my import/export presets were intact along with develop user presets. I'm happy as a clam for my $10/month!

  • Error Launching LR 5: "Lightroom encountered an error when reading from its preview cache and..."

    Error Launching LR 5: "Lightroom encountered an error when reading from its preview cache and needs to quit.  Lightroom will attempt to fix this problem the next time it launches."
    I've tried renaming my catalog.lrcat file.  I've copied over my most recent backup of the catalog.lrcat and that didn't work either.

    On Mac:
    PS - to open the previews "folder" (a "package" is just a "special" folder) on Mac, ctrl-click and choose "Show package contents.." - same way you open any other special folder, like .app or .lrplugin..
    Rob

  • Lightroom 5 is not opening it gives me an error message there is an error when reading from its preview cache and needs to quite

    lightroom 5 is not opening it gives me an error message there is an error when reading from its preview cache and needs to quite
    it also says it will attempt to to fix the next time it opens it doesn't do anything

    Check this thread. Your Previews Cache files are corrupted.
    Re: preview cache?

Maybe you are looking for

  • Officejet Pro L7590 will not print in black

    I have an All in One Officejet Pro L7590.  When I first got the printer 3 months ago, everything was printing perfectly.  Now, out of nowhere, it will not print in black.  It only prints in color.  I have done all the aligning, printhead cleaning, ch

  • Acrobat X Pro Compare Documents To Sensitive

    Hi, I am testing the "Compare Documents" functionality for my company in Acrobat Pro X. I must say I am pleased with the results for the most part but it seems like the compares are picking up to much information. For instance, If I insert a table ro

  • XML PO is getting released from SRM only when Repeat Output is performed

    Dear Experts, Extended Classic Scenario(SRM-XI-SUS) inwhich SRM and SUS have on same SRM Server 7.0 but with differentt clients. XML communication is being happened between SRM and SUS. PO is created and ordered from SRM but it is releasing to SUS on

  • XRT Wire payments

    Dear SDN Friends, I have recd a query which is explained below. “XRT wire payments. Actually the issue is ,a vendor has been posted a double invoice (it happened because ref no. was different) and respectively payment was made thru XRT wire  payment

  • Red Dot on photos in browser

    The red dot showing number of times a photo has been placed in a book, which appears in the corner of the photos in the browser is no longer showing. I can't find out why or how to get it back. Help will be appreciated. Thanks. Steven