Spool List more than 99 pages to PDF File to Mail

Hi All,
I want to convert a big spool list (342 Pages) to PDF file to send it by e-mail.
I use the following code to convert my spool to PDF file:
Convert to PDF file*
  CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
    EXPORTING
      src_spoolid              = w_spool_id
      no_dialog                = 'X'
      dst_device               = c_device
    IMPORTING
      pdf_bytecount            = gd_bytecount
    TABLES
      pdf                      = it_pdf_output
    EXCEPTIONS
      err_no_abap_spooljob     = 1
      err_no_spooljob          = 2
      err_no_permission        = 3
      err_conv_not_possible    = 4
      err_bad_destdevice       = 5
      user_cancelled           = 6
      err_spoolerror           = 7
      err_temseerror           = 8
      err_btcjob_open_failed   = 9
      err_btcjob_submit_failed = 10
      err_btcjob_close_failed  = 11
      OTHERS                   = 12.
  CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings*
  LOOP AT it_pdf_output.
    TRANSLATE   it_pdf_output           USING ' ~'.
    CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
  ENDLOOP.
  TRANSLATE gd_buffer USING '~ '.
  DO.
    it_mess_att = gd_buffer.
    APPEND it_mess_att.
    SHIFT  gd_buffer LEFT BY 255 PLACES.
    IF gd_buffer IS INITIAL.
      EXIT.
    ENDIF.
  ENDDO.
The problem with the FM 'CONVERT_ABAPSPOOLJOB_2_PDF' is when my spool have more than 99 pages. In this case, the FM generate a backscreen job (sm37) to convert my spool and generate a binary PDF spool.
After this step, the 'FM SO_DOCUMENT_SEND_API1' send an e-mail with the binary PDF File recovered in the spool list but i can't open the file with Adobe Reader because the format is wrong.
Someone knows how could i convert my big spool list to PDF file to send it by e-mail adress ?
Thanks a lot for your precious help that i need so much !

Generate big spool list
REPORT  ZGEN_SPOOL.
tYPE-POOLS: slis.
TYPES: BEGIN OF str_mara,
matnr TYPE mara-matnr,
ersda TYPE mara-ersda,
ernam TYPE mara-ernam,
laeda TYPE mara-laeda,
aenam TYPE mara-aenam,
vpsta TYPE mara-vpsta,
END OF str_mara.
DATA: i_mat TYPE TABLE OF str_mara,
wa_mat LIKE LINE OF i_mat.
DATA:params LIKE pri_params.
DATA: days(1) TYPE n VALUE 2,
valid TYPE c.
DATA: obj TYPE REF TO cl_salv_table.
SELECT matnr
ersda
ernam
laeda
aenam
vpsta
UP TO 4999 ROWS
FROM mara INTO CORRESPONDING FIELDS OF TABLE i_mat.
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = obj
CHANGING
t_table = i_mat.
CATCH cx_salv_msg .
ENDTRY.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
* destination = 'QAS'
list_name = 'ZTEST_VERTEX'
list_text = 'TEST'
no_dialog = 'X'
immediately = ' '
expiration = days
IMPORTING
* OUT_ARCHIVE_PARAMETERS =
out_parameters = params
valid = valid
* VALID_FOR_SPOOL_CREATION =
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4
IF sy-subrc ne 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
TRY .
NEW-PAGE PRINT ON PARAMETERS params NO DIALOG.
CATCH cx_sy_nested_print_on .
ENDTRY.
CALL METHOD obj->display.
NEW-PAGE PRINT OFF.

Similar Messages

  • I like to edit single letter in the pdf file having more then 1000 page, Example "T" in place of "V" in all the 1000 pages in pdf file. Please let me know

    I like to edit single letter in the pdf file having more then 1000 page, Example "T" in place of "V" in all the 1000 pages in pdf file. Please let me know !

    In a PDF you can´t change single letter.
    You can only try to convert the PDF document into a Word document.
    Now you can search and replace a letter.

  • Is it possible to display spool having more than 50 pages?

    Hi All,
    Is it possible to display spool having more than 50 pages?
    Standard SAP transactions like SP01/SP02/SM37allows till 50 pages if i am not wrong!
    Thanks,
    Vinod.

    in the setting of any spool I selected 10000 pages as the last page... I dont have spool to check and see if it really displays all 10000 pages.
    sp01> getin into some spool > hit settings buttons on the top.

  • Single page PDF file in mail always appears in message body, instead of as an attachment, contrary to a multiple page PDF. Why?

    When sending a single page PDF file in mail, it always appears as an open file in the message body. Multiple page PDF files appear as attachments. Why the difference and how to change the behavior of single page PDF files so that they appear as attachments instead of open files?

    Hello billsbs,
    Welcome to the Apple Support Communities!
    I understand that when you add a PDF to mail you see its entire contents, but when you add two or more pages Mail shows them as a document icon. To change this behavior for that specific email, please follow the instructions in the attached article. 
    Mac OS X Mail: About PDF attachments
    Have a great day,
    Joe

  • Printing web page to pdf file using Acrobat Standard 9

    When I print a web page to a pdf file, the text in the file is mostly garbled.  I have no problems in creating pdf files from MS office or other software.  I have Windows 7 Home.
    Any help will be appreciated.
    Thanks

    I do have Internet Explorer 9 and I was able to print web pages correctly following  your suggestions.
    Thanks for your help.
    Date: Sat, 12 Nov 2011 06:53:59 -0700
    From: [email protected]
    To: [email protected]
    Subject: Printing web page to pdf file using Acrobat Standard 9
        Re: Printing web page to pdf file using Acrobat Standard 9
        created by Bill@VT in Acrobat Windows - View the full discussion
    There were problems with IE9 on it's initial release and that may be what you are seeing if that is the browser (you did not indicate the browser and that may be a key). If you have a different browser you might try that one with the same pages to see if it browser related.
    By saying garbled it sounds like the fonts did not make it or you have selected "Use Local Fonts" in Acrobat. Try checking the latter first. Then check if the fonts are embedded in the PDF by checking the document properties (ctrl-D). If they are not, go back to the browser and select the press or print job options before printing and see if they get embedded and if your problem is resolved.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4021509#4021509
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4021509#4021509. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Acrobat Windows by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Is there more than one "Previous recipients" file?

    Ancient addresses long deleted from my address book continue to populate emails.
    I have done the Window --> Previous recipients thing. (I really have!) The ancient addresses are not there to delete!
    I'm wondering if there is more than one "Previous recipients" file?
    Any help appreciated -
    Thanks!

    OK. So these phantom email addresses belonged to you and not other people. Correct? Yes
    Were they aliases to accounts you still have or were they old accounts you have since deleted? Explain what the phantom addresses were. These addresses belong to a POP account I have through work.  I've used a couple of different addresses: e.g. roberta@ or redowney@ but the domain name has not changed. I'm going to see if the addresses are on my employer's server. Stay tuned.
    Have you checked Messages and FaceTime to see if those addresses are listed there? Just checked - not there.
    If you have an iPhone or iPad, when you start a new message, do these phantom addresses appear in the list? If so, do they have a circle i icon to the right of the address? If so, click the icon and delete it from there. Nope - do not appear.
    These addresses are really old - like two or three years since I last used.

  • Spool generated more than 1

    Hi Expert,
    My functional assigned my program (subroutine entry) and my smartforms to output type in MB1B.
    I tried to posted MB1B, and the smartforms display correctly. But when i check in SP02 spool generated more than 1 for the same smartforms.
    Seems like the smartforms was called for several times (same with how many spool created) --> i checked in the code the smartforms was called one time only in subroutine entry.
    Maybe this information make you guys more idea:
    Before i forgot to clear my internal table in the print program (subroutine entry) that called the smartforms and the internal table was append.
    This what happened:
    1 smartforms = 1 page (itab 1 record)
    When i posted MB1B --> 2 spools --> 1 is 1 page (correct), 2 is 2 pages.
    1 smartforms = 2 pages (itab 2 records)
    When i posted MB1B -> 4 spools --> 1 is 2 pages (correct), 2 is 4 pages, 3 is 6 pages, 4 is 8 pages.
    What i try to show is, why the itab also append? Even i forgot to clear the itab should be 1 soubroutine entry called 1 time only every time posted MB1B right? so the itab should not be append.
    Now i clear the itab before call the smartforms.
    This what happened:
    1 smartforms = 1 page (itab 1 record)
    When i posted MB1B --> 2 spools --> 1 is 1 page (correct), 2 is 1 page.
    1 smartforms = 2 pages (itab 2 records)
    When i posted MB1B -> 4 spools --> 1 is 2 pages (correct), 2 is 2 pages, 3 is 2 pages, 4 is 2 pages.
    The pages correctly already, but why the spool still generated more than 1 spool?
    Any idea for the possibility why this happen?
    Best Regards,
    Victor.

    Hi Prashant,
    If let say inside smartforms got multiple loop? is it can cause multiple spool?
    I thought only if multiple call on the smartforms (not multiple loop inside the smartforms itself) will create multiple spool?
    Btw Prashant,
    If you see what happened when i forgot to clear my internal table.
    2 records --> become 4 records --> become 6 records --> become 8 records..
    What make me confuse is, this smartforms or the entry program that append that itab was called only by output type?
    Is it possible the ouput type itself that triggered the smartforms more than 1 time?
    Best Regards,
    Victor.

  • How to load and unload more than one external swf files in different frames?

    I do not have much experience on Adobe Flash or Action Script 3, but I know the basics.
    I am Arabic language teacher, and I design an application to teach Arabic, I just would like to learn how to load and unload more than one external swf files in different frames.
    Thanks

    Look into using the Loader class to load the swf files.  If you want to have it happen in different frames then you can put the code into the different frames.

  • I recently signed up for a one month trial of adobe pro.  I logged in.  I cannot convert a single page of PDF file to word or Excel with this trial.  I just get the request to sign up for a year.  What good is the trial if I can't try it?

    I recently signed up for a one month trial of adobe pro.  I logged in.  I cannot convert a single page of PDF file to word or Excel with this trial.  I just get the request to sign up for a year.  What good is the trial if I can't try it?

    Hey vcomfort6,
    Please ensure that you are using Adobe Acrobat and not Reader to convert PDF file to word or excel.
    Could you tell me whether it is a scanned document? Does this happen with all PDFs or any specific one?
    Do you get any error message? What exactly happens when you try doing the same?
    Hope to hear from you.
    Regards,
    Anubha

  • Cannot forward one page PDF files from mail app

    My earlier topic had incorrect problem report so I've created a new topic.
    The problem is i cannot forward one page PDF file from mail apps. I use imap set up for my work email.
    Multi page PDFs, photos, docs, numbers, all forward OK for both windows and Mac formats.

    Update: I hade had a reply from the Good Reader app developer saying this is a known issue even for them. However, they don't know if Apple will fix this or not.
    Basically mail app treats all one page PDF as if it's an image and will forward it the same as it would an image. Any non-apple based mail programs will have issues viewing this file..

  • [solved] How to remove specific pages from PDF file?

    I'm looking for a way to remove few pages from PDF file.
    Last edited by delor (2008-07-04 10:28:22)

    To remove first page I did this:
    pdftk original.pdf cat 2-end output result.pdf
    Any other propositions ?

  • External editor: Can you list more than one?

    Is it possible to list more than one external editor in Aperture's preferences? I know you can install plugins but would like to have more than one app listed.

    I'm also missing the possibility to add more than one external editors which I use for specific edit jobs.
    I posted a feature request concerning this via the "Aperture Feedback".

  • I scan a page to PDF file, but I  couldn't to highlight it.

    I scan a page to PDF file, but I  couldn't to highlight it. I use Adobe Reader, is any way I can use this funtion?

    You need run OCR first using Acrobat, then you should be able to highlight text.

  • PDF files in Mail

    For a while now I have been having trouble with pdf files in Mail. Sometimes I cannot even open them as they appear as a little black dot. The trouble came to a head recently when one of the pdf files I work with for some reason opened up without one of the pages it should have had. This file opens fine on the other iMac we have that is running Tiger and when that iMac saves the file then I can open it just fine as well. But when I save it the page is missing on both mine and the other. Please help... my job is at stake! And I am not exaggerating

    What kind of computer and email program is sending it to you? If these are multi-page PDFs, they could show up in the body of the message, rather than as a separate attachment. If they do, you should be able to simply drag the file from the body onto your Desktop, and then you can open it with Preview or Acrobat Reader.
    Are you able to do this, and what happens when you drag the PDF into an open Safari window?
    Mulder

  • Attaching multipage .pdf file in Mail

    How do I attach a multipage .pdf file in Mail?  I am running OSX 10.8.2 on a MacBook Pro.  When I try to attach only the frst page attaches.

    Are you sure?
    When you add the multi-page attachment to your email only the first page shows. If you click on that first page to select it and then right click and choose Quick Look Attachemnt you should be able to see that all pages are there.
    Matt

Maybe you are looking for

  • Actions - How to replace GUI_DOWNLOAD and CL_GUI_FRONTEND_SERVICES= FILE_SA

    Hi, In sap gui was trigered action whih is using smartform and then output was being downloaded and saved as using: CALL FUNCTION 'GUI_DOWNLOAD' - to CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG After the ubgrade this action is not working

  • How to get better resolution on Blu-ray (1080/60i)

    I'm experimenting with my new AG-AC160A camcorder and have been shooting youth hockey games in AVCHD mode, 1080/60i, 1/120 shutter, manual gain and white balance set appropriately, and florescent scene file setting due to lighting in rink. I have PP

  • Update scheduling data in material master

    Hi, How to update scheduling data from Process order to master recipe in mass. As I can schedule recipe in C202 and update the sceduled data in material master by CA96 & CA97 transactions. But i wants to schedule master recipe in mass. Is there any w

  • TS1559 My wifi logo is completely greyed out!!!

    I had someone at Apple do a hard reset and it came back on...for like a few hours and then it was back to no good. Since then, I have tried numerous hard resets as well as reset my network settings and no good. HELP! I have never had this issue with

  • How do you get rid of album art?

    Is it permanent once downloaded? Or is there some way to hide or get rid of it that I'm missing? Please reply. Thanks.