Getting error message while opening PDF file.

Hello Experts....
I'm getting error message while opening the attached PDF file in mail.
I'm Sending the payslip to mail which is converted into .PDF format.
Where exactly the problem i m not getting.
Please help....

CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
      EXPORTING
        src_spoolid                    = rqident
        no_dialog                      = ' '
       DST_DEVICE                     = out_parms-pdest
      PDF_DESTINATION                =
       get_size_from_format           = out_parms-pdest
      IMPORTING
        pdf_bytecount                  = bytecount
       pdf_spoolid                    = pdfspoolid
      LIST_PAGECOUNT                 =
       btc_jobname                    = jobname
       btc_jobcount                   = jobcount
      TABLES
        pdf                            = out_tab
      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.
  IF sy-subrc NE 0.
  ENDIF.
*CALL FUNCTION 'BAPI_GET_PAYSLIP_PDF'
EXPORTING
   employeenumber       = PERNR-PERNR
   sequencenumber       = '00001'
   payslipvariant       = 'PAYSLIP-PM'
IMPORTING
  RETURN               =
  PAYSLIP              = PAYSLIP
  PDF_FSIZE            =
******************CONVERTING PAYSLIP(XSTRING) TO BINARY FORMAT******
call function 'SCMS_XSTRING_TO_BINARY'
   exporting
     buffer                = payslip
  APPEND_TO_TABLE       = ' '
IMPORTING
  OUTPUT_LENGTH         =
   tables
     binary_tab            = OUT_TAB.
    check not ( out_tab[]  is initial ).
    refresh i_record.
    clear : i_record.
    call function 'QCE1_CONVERT'
      tables
        t_source_tab         = out_tab
        t_target_tab         = i_record
      exceptions
        convert_not_possible = 1
        others               = 2.
    if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
   do.
     i_record = it_attachment_long.
     append i_record.
     shift it_attachment_long left by 255 places.
     if it_attachment_long is initial.
       exit.
     endif.
   enddo.
    select single ltx into subject from t247
               where mnr eq pn-begda+4(2)
                 and spras eq 'EN'.
    condense subject.
    concatenate 'Payslip for the month of' subject pn-begda+0(4)
                              into subject separated by space.
    describe table lt_objbin lines l_att_lines.
    read table lt_objbin index l_att_lines.
    lv_document_data-doc_size = tab_lines * 255 .
    lv_document_data-obj_name = 'Payslip'.
    lv_document_data-obj_descr = subject.
e-mail body
    clear lt_objpack-transf_bin.
    lt_objpack-head_start = 1.
    lt_objpack-head_num = 0.
    lt_objpack-body_start = 1.
    lt_objpack-body_num = tab_lines.
    lt_objpack-doc_type = 'RAW'.
LT_OBJPACK-doc_size = STRLEN( LT_OBJTXT ).
    append lt_objpack.
For e-mail attachment
    lt_objhead = 'payslip.pdf'.
    append lt_objhead.
    lt_objbin[] = out_tab[]."i_record[].
    "describe table i_record lines l_att_lines.
    describe table out_tab lines l_att_lines.
CLEAR LT_OBJPACK.
    lt_objpack-transf_bin = 'X'.
    lt_objpack-head_start = 1.
    lt_objpack-head_num = 0.
    lt_objpack-body_start = 1.
    lt_objpack-body_num = l_att_lines.
    lt_objpack-doc_type = 'PDF'.
    lt_objpack-obj_name = 'attachment'.
    lt_objpack-obj_descr = 'payslip'.
    lt_objpack-doc_size = ( l_att_lines - 1 ) * 255 + strlen( lt_objbin ).
    append lt_objpack.
make recipient list
   " check user_mail_id is not initial.
    lt_reclist-receiver =  user_mail_id.
    lt_reclist-rec_type = 'U'.
    append lt_reclist.
    call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      exporting
        document_data              = lv_document_data
        put_in_outbox              = 'X'
        commit_work                = 'X'
      tables
        packing_list               = lt_objpack
        object_header              = lt_objhead
        contents_bin               = lt_objbin
      contents_txt               = lt_objtxt
        receivers                  = lt_reclist
      exceptions
        too_many_receivers         = 1
        document_not_sent          = 2
        document_type_not_exist    = 3
        operation_no_authorization = 4
        parameter_error            = 5
        x_error                    = 6
        enqueue_error              = 7
        others                     = 8.
    if sy-subrc = 0.
      write:/ 'Mail sent to', 30 user_mail_id.
      write : sy-uline.
    else.
      write:/ 'Error encountered'.
    endif.
    clear : lt_objpack, lt_objhead, lt_objbin, lt_reclist.
    refresh : lt_objpack, lt_objhead, lt_objbin, lt_reclist.
   clear : filepath+3(17), pdffile, encryptpdf, batch_file.
    clear : out_tab, i_record, filetable.
    clear : user_mail_id, password.
  else.
    write : 'payslip not generated'.
  endif.
end-of-selection.
Please Check....

Similar Messages

  • Getting Error message while open a SWF file from desktop and any other location

    dear all.,
    I am using Flash CS4, when I publish SWF movie and open it directly from directories I get an error message. (The image of error message attached,
    Plz, help me to short out this problem. ASAP.
    Thanks in advance.

    hi.
    When I double click on the any SWF file (from any location of my system), this error message pop up, which say that “ Windows cannot find “<< file path>>” ……………… but file is playing.
    I don’t know why this error message is coming.
    plz, help me to solve this problem .
    Thanks.

  • I have always had trouble (including error messages)when opening pdf files from a website within Firefox

    More often than not when I open a pdf file from within Firefox the file fails to open (often you get an error message. "there was an error processing page. A file I/O error has ocurred"). Sometimes the file downloads but is only white pages. I usually then right click the file and save it to my desktop but this is cumbersom!

    Ok two things based on the crash report and the steps you took right before the crash:
    # Try to disable scrolling acceleration and restart Firefox. Does it continue to crash?
    # Try Safe Mode and do the same task as above with email and the pdf [[Troubleshoot Firefox issues using Safe Mode]]
    # Also pdf.js may be helpful to read pdfs in the meantime. You can change the default reader in the Preferences/Options > Application menu of Firefox.
    # Try to clear out the downloads folder and update flash to version 14 (that should do it)
    IF it crashes again please also provide the new crash signatures and we can take a look :-) Sorry for the crashing :-(

  • Getting message while opening PDF file exported from InDesign

    Hi,
    We have created an interactive PDF in InDesign. In this PDF we have created 15-20 pages which are link together and next previous button is provided.
    We are using InDesign CS3 and PDF reader 9. PDF is exported for version 8 onwards. Exported PDF is working properly on our machine but our client is receving the following message on their machine if they try to open this PDF (they have PDF reader 8):
    "Please Note: You cannot save a completed copy of this form on your computer. If you would like a copy for your records, Please fill it in and print it"
    We have not used any kind of form in my PDF only internal page hyperlinks are given.
    Attached screen shot is given for your reference.
    Is there as way for remove this message so it doen not appear? I would really appriciate if anybody can help me out.
    Thanks a lot in advance.
    Regards,
    Deepika

    Deepika,
    The alert dialog your screen shot depicts will only display if there is some kind of form annotation present in a PDF that is not "Reader Enabled".
    Look closer at your 'final' PDF.
    A PDF, not "Reader Enabled", that contains any form annotations will, when opened by Adobe Reader,
    result in the alert dialog that you mention. A "hard wired" default.
    Note that the forms document message bar can be "off" by a selection in Adobe Reader / Acrobat Preferences.
    Select the 'Forms' category. Select "Always hide forms document message bar".
    Be well...

  • I am getting the following error message while opening the fire fox browser "sript file:///programe % 20 files/siber%AT% 20roboform/rirefox/components/ref helper.JS:510 in English

    i am getting the following error message while opening the fire fox browser "sript file:///programe % 20 files/siber%AT% 20roboform/Firefox/components/ref helper.JS:510 in English

    ls -l /var/run/lighttpd/
    And how are you spawning the php instances? I don't see that in the daemons array anywhere.
    EDIT: It looks like the info in that page is no longer using pre-spawned instances, but lighttpd adaptive-spawn. The documentation has been made inconsistent it looks like.
    You will note that with pre-spawned information, the config looks different[1].
    You need to do one or the other, not both (eg. choose adaptive-spawn, or pre-spawn..not both).
    [1]: http://wiki.archlinux.org/index.php?tit … oldid=8051 "change"

  • Bearts Audio Control Pannel will not open. Get error message cannot find startup file

    Bearts Audio Control Pannel will not open. Get error message cannot find startup file!
    Downloaded and instaled up-date for IDT audio from driver up-date. After installation could no longer oppen Beats Audio Control Pannel.  Looked for download to re-install BEATS Audio but cannot find one.
    Any suggestions.
    Sound works with IDT driver installed.
    Pavilion P7-1500Z

    Hi,
    Try using Recovery Manager to reinstall the IDT HD Audio Driver ( this will also reinstall the Beats Audio interface ) - the procedure for using recovery manager to reinstall Software and Drivers is detailed in the document on the link below.
    Recovery Manager - Windows 8.
    Recovery Manager - Windows 7
    After the reinstallation has completed, restart the PC.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • I get an error message while converting the file. you do not have the privilege to make changes. I get this message when I try to import a music CD

    I get an error message while converting the file. you do not have the privilege to make changes. I get this message when I try to import a music CD

    Hey amba1015,
    I found an article that talks about similar error messages in relation to importing an audio CD. Check out the recommended troubleshooting steps in here to see if they help:
    Trouble adding music to iTunes library or importing audio CD
    http://support.apple.com/kb/TS1387
    Welcome to Apple Support Communities!
    Have a good one,
    Delgadoh

  • An error occurred while opening the file, you can not open this file because it does not page???

    Dear all,
    i am test the report to show "No Data Found"  world, but, when i preview to PDF, i got  the message :An error occurred while opening the file, you can not open this file because it does not page.
    i try to load the other xml file that have data, and report work,no error.
    i don't know where is the problem, so i need some help....
    Thanks in advance for your response.
    my rtf report:
    <?call:header?>
    <?if:count(PLAN_CODE)>0?>
    <?for-each@section:G_PLAN_CODE?>
    <?template:Header?>
      <?for-each:G_PURPOSE?>
      <?end for-each?>
    <?end template?>
      <?for-each:G_PLAN_SUBSQL2?>
      <?end for-each?>
    <?end for-each?>
    <?end if?>
    <?if:count(PLAN_CODE)=0?>
    ====================No Data Found ===================
    <?end if?>
    about xml:
    if no data query back:
    <?xml version="1.0"?>
    <!-- Generated by Oracle Reports version 6.0.8.27.0 -->
    <NARLGLR005>
      <LIST_G_PLAN_CODE></LIST_G_PLAN_CODE>
      <CF_START_DATE>102.3</CF_START_DATE>
      <CF_END_DATE>102.3</CF_END_DATE>
      <CF_TITLE_NAME>Company</CF_TITLE_NAME>
      <CF_OU_NAME>IT Department</CF_OU_NAME>
      <CF_SOURCE_CODE>N/A</CF_SOURCE_CODE>
      <CF_PRINT_DATE>102.11.18  15:48:10</CF_PRINT_DATE>
    </NARLGLR005>
    if have data:
    <?xml version="1.0"?>
    <!-- Generated by Oracle Reports version 6.0.8.27.0 -->
    <NARLGLR005>
      <LIST_G_PLAN_CODE>
        <G_PLAN_CODE>
          <PLAN_CODE>03101C3003</PLAN_CODE>
          <PLAN_NAME>03101C3003_test</PLAN_NAME>
          <PLAN_EM>John</PLAN_EM>
          <PLAN_START_DATE>101.09.01</PLAN_START_DATE>
          <PLAN_END_DATE>102.08.31</PLAN_END_DATE>
          <PLAN_HOSTS>abc_super</PLAN_HOSTS>
          <LIST_G_PURPOSE>
            <G_PURPOSE>
              <PURPOSE_CODE>11600000</PURPOSE_CODE>
              <PURPOSE_NAME>Pre-Pay</PURPOSE_NAME>
              <LIST_G_PURPOSE_CODE>
                <G_PURPOSE_CODE>
                  <BUDGET_AMOUNT>0</BUDGET_AMOUNT>
                  <REAL_BUDGET_AMOUNT>0</REAL_BUDGET_AMOUNT>
                  <TEMP_RECEIPT_AMOUNT>0</TEMP_RECEIPT_AMOUNT>
                  <REAL_PAY_AMOUNT>0</REAL_PAY_AMOUNT>
                  <TEMP_PAY_AMOUNT>-83006</TEMP_PAY_AMOUNT>
                  <TEMP_PAY_FINAL_AMOUNT>83006</TEMP_PAY_FINAL_AMOUNT>
                  <TOTAL_AMOUNT>83006</TOTAL_AMOUNT>
                </G_PURPOSE_CODE>          
              </LIST_G_PURPOSE_CODE>
              <CS_BUDGET_AMOUNT>0</CS_BUDGET_AMOUNT>
              <CS_REAL_BUDGET_AMOUNT>0</CS_REAL_BUDGET_AMOUNT>
              <CS_TEMP_RECEIPT_AMOUNT>0</CS_TEMP_RECEIPT_AMOUNT>
              <CS_REAL_PAY_AMOUNT>0</CS_REAL_PAY_AMOUNT>
              <CS_TEMP_PAY_AMOUNT>0</CS_TEMP_PAY_AMOUNT>
              <CS_TEMP_PAY_FINAL_AMOUNT>0</CS_TEMP_PAY_FINAL_AMOUNT>
              <CS_TOTAL_AMOUNT>0</CS_TOTAL_AMOUNT>
            </G_PURPOSE>      
          </LIST_G_PURPOSE>
          <LIST_G_PLAN_SUBSQL2>
            <G_PLAN_SUBSQL2>
              <GL_DATE>31-07-12</GL_DATE>
              <NARL_DOC_NUMBER>0310107311004</NARL_DOC_NUMBER>
              <AP_UNAPP></AP_UNAPP>
              <PLAN_NAME1>03101C3003_101-102</PLAN_NAME1>
              <PLAN_CODE1>03101C3003</PLAN_CODE1>
              <PLAN_EM1>Elly</PLAN_EM1>
              <PLAN_START_DATE1>2012/09/01 00:00:00</PLAN_START_DATE1>
              <PLAN_END_DATE1>2013/08/31 00:00:00</PLAN_END_DATE1>
              <PLAN_HOSTS1>KIC-Supp</PLAN_HOSTS1>
              <REAL_RECEIPT_AMOUNT>0</REAL_RECEIPT_AMOUNT>
              <DESCRIPTION>101 year</DESCRIPTION>
              <CF_GL_DATE>101.7.31</CF_GL_DATE>
            </G_PLAN_SUBSQL2>
          </LIST_G_PLAN_SUBSQL2>   
          <CF_START_DATE1>99.1</CF_START_DATE1>
          <CF_END_DATE1>102.11</CF_END_DATE1>
          <CF_TITLE_NAME1>TCS Company</CF_TITLE_NAME1>
          <CF_OU_NAME1>IT Department</CF_OU_NAME1>
          <CF_SOURCE_CODE1>plan</CF_SOURCE_CODE1>
          <CF_PRINT_DATE1>102.11.19  17:12:19</CF_PRINT_DATE1>
          <CS_T_BUDGET_AMOUNT>517524</CS_T_BUDGET_AMOUNT>
          <CS_T_REAL_BUDGET_AMOUNT>517524</CS_T_REAL_BUDGET_AMOUNT>
          <CS_T_TEMP_RECEIPT_AMOUNT>289294</CS_T_TEMP_RECEIPT_AMOUNT>
          <CS_T_REAL_PAY_AMOUNT>289294</CS_T_REAL_PAY_AMOUNT>
          <CS_T_TEMP_PAY_AMOUNT>0</CS_T_TEMP_PAY_AMOUNT>
          <CS_T_TEMP_PAY_FINAL_AMOUNT>0</CS_T_TEMP_PAY_FINAL_AMOUNT>
          <CS_T_TOTAL_AMOUNT>228230</CS_T_TOTAL_AMOUNT>
          <CS_REAL_RECEIPT_AMOUNT>289294</CS_REAL_RECEIPT_AMOUNT>
        </G_PLAN_CODE>
      </LIST_G_PLAN_CODE>
      <CF_START_DATE>99.1</CF_START_DATE>
      <CF_END_DATE>102.11</CF_END_DATE>
      <CF_TITLE_NAME>Company</CF_TITLE_NAME>
      <CF_OU_NAME>IT Department</CF_OU_NAME>
      <CF_SOURCE_CODE>N/A</CF_SOURCE_CODE>
      <CF_PRINT_DATE>102.11.18  15:48:10</CF_PRINT_DATE>
    </NARLGLR005>

    Hi,
    You mentioned you tried some steps but I'm not sure what they are, you may try my suggestion to resolve this issue, follow these steps:
    Click Start, right-click Computer, click
    Properties, and then click Advanced system settings.
    On the Advanced tab, click Environment Variables.
    Locate and select the __COMPAT_LAYER variable, and then click Edit.
    Set the value of the __COMPAT_LAYER variable to EnableThemes. Or, delete the __COMPAT_LAYER variable.
    If the issue persists, we can troubleshoot this problem in Clean Boot to determine whether background programs are interfering with PowerPoint:
    http://support.microsoft.com/kb/929135
    Regards,
    Melon Chen
    TechNet Community Support

  • "An error occurred while opening the file dialog. Please save your presentation, exit, and restart PowerPoint."

    In PowerPoint 2013 on Windows 7 - 64 bit, when
    File / Save as is selected, an error message comes up stating, "An error occurred while opening the file dialog. Please save your presentation, exit, and restart PowerPoint." This is an intermittent issue and also
    affects Excel 2013. I have tried repairing it, done windows update and also uninstalled and reinstalled but no luck. I have researched this issue but it relates to Office 2007 and 2010 and the resolution does not support 2013.
    Has anyone come across this issue? If so how did you resolve it?
    Many thanks….

    Hi,
    You mentioned you tried some steps but I'm not sure what they are, you may try my suggestion to resolve this issue, follow these steps:
    Click Start, right-click Computer, click
    Properties, and then click Advanced system settings.
    On the Advanced tab, click Environment Variables.
    Locate and select the __COMPAT_LAYER variable, and then click Edit.
    Set the value of the __COMPAT_LAYER variable to EnableThemes. Or, delete the __COMPAT_LAYER variable.
    If the issue persists, we can troubleshoot this problem in Clean Boot to determine whether background programs are interfering with PowerPoint:
    http://support.microsoft.com/kb/929135
    Regards,
    Melon Chen
    TechNet Community Support

  • Error message "cannot open resource file" ID CS6

    CS6 InDesign, getting error message "cannot find resource file" Tried deleting prefs but didn't work.

    I'm sorry. I'm running OS 10.7.5 and had previous error messages about several plugins not loading due to color panel missing. Deleted prefs, added color panel back with Manage Extensions then got the "cannot open resource file" error. I know the error message above is different and I thought I had fixed it but somehow it didn't change when I updated my post. I also have a couple of old versions of CS on my computer and I don't know if I should uninstall those or if it doesn't matter. I don't know how to do that, either. I'm not very computer literate so every problem is difficult for me. Thank you.

  • Getting error message while updating Job attributes using PP03 for IT1641

    Hey Guys,
    We are getting error message while updating Job attributes using transaction PP03 for IT1641 (WC Attributes for JOB): 'Client has status not modifiable'.
    Update to the infotype 1641 should not require open SAP system. Would anyone suggest any SAP note/solution?
    Thanks...
    Edited by: Karan Gheewala on Apr 3, 2008 9:06 PM

    Solved using Note 123383 - WC: Customizing worker's compensation tables
    Thanks,..

  • I am getting error message while attempting to upgrade the software to iOS 6.1.3

    Hi,
    Need help on this, i am getting error message while attempting to upgrade the software to iOS 6.1.3

    The Current iOS for the iPhone 4s is iOS 7
    How to update your iPhone, iPad, or iPod touch

  • I just tried to update Firefox to version 9.0.1. It got to 13% extracting, then I got an error message, Cannot Open Output File. Can you please help me?

    I just tried to update Firefox to version 9.0.1. It got to 13% extracting, then I got the error message, Cannot Open Output File.

    The file could be downloaded incorrectly. Could you redownload it again from [http://getfirefox.com http://getfirefox.com]?

  • "The exception unknown software exception (0xc06d007e) occured in the application at location 0x7c812aeb" - error displayed when opening PDF files. What i do?

    "The exception unknown software exception (0xc06d007e) occured in the application at location 0x7c812aeb" - error displayed when opening PDF files. What i do?

    What is your Reader XI version?
    Have you tried to disable Protected Mode [Edit | Preferences | Security (Enhanced)] ?

  • While opening pdf files the menu bar, navigation bar  cracks unobviously and also close and minimise buttons  goes hidden..Facing the problem for last one month. Please help.

    while opening pdf files the menu bar, navigation bar  cracks unobviously and also close and minimise buttons  goes hidden..Facing the problem for last one month. Please help.

    The latest Kaspersky software version is 15.0.1.415 or 15.0.1.415ab.

Maybe you are looking for

  • Help! Can't install or uninstall iTunes.

    I cannot open my iTunes and every time I try to install or uninstall the program I get this: Could not write value description to key \software\mozillaplugins\@apple.com/itunes,version=. Verify that you have sufficient acces to that ket, or contact y

  • The sequence does not match with the original clip

    What I have learned about how to effectively match the sequence with original clip is by dragging the imported clip into the new item button, or right click the clip and click on "New Sequence from Clip" button. I did it exactly, however, like you ca

  • What do I need to upload and how big a website is too big

    I just spent a few days of my life, that I will never get back, trying to upload my site (built in I web08) to godaddy using Cyberduck. I can't begin to tell you how painful it was, and how long it took. Finally one of the people at godaddy suggested

  • Problem burning a Slideshow with iPhoto 8

    I keep getting the message, "osstatus error -9459" What am I doing wrong? I'm trying to burn a DVD that will work on a PC, too. Any help would be greatly appreciated!

  • Fact Table in DW

    Hello Guys, I am working in Datawarehouse project. As you might all be knowing about the FACT table. Is there any tips for me for permornace boost for the same?? Is it possible to make the fact table patitioned or Cluster table? or any other way for