Problem with Multiple Page convert in PDF

Hi all,
I done one invoice printing and convert in pdf report.  but with smartform i get all thing and giving perfect out put.
But when i give second option for direct create a file of PDF this time only one page can convert in PDF. Means when i give multiple input like print invoice 0000910 to 0000925 so this time only invoice no. 0000925 is convert in pdf. But actually i need all invoice like 910 to 925 convert in one PDF with 25 pages.
And i done coding which is show below for this issue.
so please help me out and kindly guide me what is the mistake in my below code for make multiple page in one pdf.
FORM get_FORM1.
  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = w_form_name
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = w_fmodule
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
w_cparam-no_dialog = 'X'.
w_cparam-preview = space. " Suppressing the dialog box
                                                    " for print preview
w_cparam-getotf = 'X'.
* Printer name to be used is provided in the export parameter
* OUTPUT_OPTIONS
w_outoptions-tddest = 'LP01'.
  IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  ITABz[]                       = itab[].
  ITABz1[]                      = itab1[].
  IT_ADDRESSz[]                = it_address[].
  LOOP at itab1.
    delete ITABz where vbeln ne  itab1-vbeln.
    delete ITABz1 where vbeln ne  itab1-vbeln.
    delete it_addressz where KUNNR ne  itab1-KUNRG.
*      delete itab1 where vbeln ne  itab1-vbeln.
    TOTAL_QNT                  = ITAB1-TOTAL_QNT.
    TOTAL_AMT                  = itab1-TOTAL_AMT.
    I_FKIMG = itab1-I_FKIMG.
    BILL_DATE                  = itab1-BILL_DATE.
    IJ_1ICSTNO                 = itab1-IJ_1ICSTNO.
    VECHICAL_NO                = itab1-VECHICAL_NO.
    TAX                        = itab1-TAX.
    INV_TXT                    = ITAB1-INV_TXT.
    inv_name                   = ITAB1-INV_NAME.
    INVOICE                    = ITAB1-INVOICE.
    TAX1                       = itab1-TAX1.
    TAX_VAL                    = itab1-TAX_VAL.
    TAX_ADD_VAL                = itab1-TAX_ADD_VAL   .
    Text_inv                   = itab1-Text_inv.
    TEXT1                      = itab1-TEXT1.
    TEXT2                      = itab1-TEXT2.
    TEXT3                      = itab1-TEXT3.
    TEXT4                      = itab1-TEXT4.
    TEXT5                      = itab1-TEXT5.
    P_DOCNO                    = itab1-vbeln.
CALL FUNCTION w_fmodule
EXPORTING
          WERKS                      = WERKS
          TOTAL_QNT                  = TOTAL_QNT
          TOTAL_AMT                  = TOTAL_AMT
          I_FKIMG                    = I_FKIMG
          STATE                      = STATE
          LAND1                      = LAND1
          LANDX                      = LANDX
          P_DOCNO                    = P_DOCNO
          BILL_DATE                  = BILL_DATE
          IJ_1ICSTNO                 = IJ_1ICSTNO
          T_WERKS                    = T_WERKS
          VECHICAL_NO                = VECHICAL_NO
          TAX                        = TAX
          TAX1                       = TAX1
          TAX_VAL                    = TAX_VAL
          TAX_ADD_VAL                = TAX_ADD_VAL
          inv_txt                    = inv_txt
          inv_name                   = inv_name
          INVOICE                    = INVOICE
          Text_inv                   = Text_inv
          TEXT1                      = TEXT1
          TEXT2                      = TEXT2
          TEXT3                      = TEXT3
          TEXT4                      = TEXT4
          TEXT5                      = TEXT5
*   ARCHIVE_INDEX              =
*   ARCHIVE_INDEX_TAB          =
*   ARCHIVE_PARAMETERS         =
   CONTROL_PARAMETERS         = w_cparam
*   MAIL_APPL_OBJ              =
*   MAIL_RECIPIENT             =
*   MAIL_SENDER                =
    OUTPUT_OPTIONS             = w_outoptions
*   USER_SETTINGS              = 'X'
IMPORTING
* DOCUMENT_OUTPUT_INFO =
job_output_info = t_otf_from_fm
* JOB_OUTPUT_OPTIONS =
TABLES
        ITAB                       = itabz
        ITAB1                      = itabz1
        IT_ADDRESS                 = it_addressz
     EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 4
       OTHERS                     = 5
iF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ITABz[]                       = itab[].
    ITABz1[]                      = itab1[].
    IT_ADDRESSz[]                = it_address[].
  ENDLOOP.
t_otf[] = t_otf_from_fm-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
* ARCHIVE_INDEX = ' '
* COPYNUMBER = 0
* ASCII_BIDI_VIS2LOG = ' '
* PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = W_bin_filesize
* BIN_FILE =
TABLES
otf = T_OTF
lines = T_pdf_tab
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* To display File SAVE dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
CHANGING
filename = w_FILE_NAME
path = w_FILE_PATH
fullpath = w_FULL_PATH
* USER_ACTION =
* FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
* presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_bin_filesize
filename = w_FULL_PATH
FILETYPE = 'BIN'
tables
data_tab = T_pdf_tab
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
EndFORM .               "get_FORM1
thanks
Keyur
Edited by: keyur chauhan on Aug 30, 2010 11:56 AM
Edited by: keyur chauhan on Aug 30, 2010 11:57 AM
Edited by: keyur chauhan on Aug 30, 2010 12:37 PM

Thank you!
Unfortunately I didn't find any work around.
Thanks,
Federico

Similar Messages

  • Smart form problem with multiple pages & table problem

    Hi experts,
    I have a problem with my smart form with multiple pages
    Situation: I have a smart form that ALWAYS has at least 2 pages. In one page the quotation, in the second page (basically this is the 3rd page as the 2nd page is optional) the terms and conditions. Sometimes however, when there are many items in the quotation more than 1 page is needed for the quotation.
    The (optional) second page of a quotation has a different header than the first page of a quotation. So I made a second page with 2 secondary windows (where the header texts are in). The main window is after the secondary windows and has to finish the quotation.
    The problem is that my headers of the second page are never printed, it stays a blank space. The table however does continue and is printed.
    Another problem I have is that I have a table (with the quotations) with 6 columns. The first 2 columns are displayed correctly but once the 3rd column the columns are shown on a lign below.
    Regards,
    PJ

    I would suggest another approach to this problem.
    Use just one page. For the headers on the first page, use a secondary window and on the conditions tab, choose the additional event - Only on First Page.
    For the different header on the second page, create another secondary window on the same page (probably even overlapping the first header on your layout). But in this one, on the conditions tab, choose the additional event - Not on First Page.
    The table should flow as you would be using the Main window for this one.
    As for columns, if they are too wide and wont fit in the same line, it would move to the next line. So you would have to re-adjust the line width and test.
    Hope this resolves your problem.
    Regards,
    Ancy
    Edited by: abapfreak on Oct 4, 2010 11:52 AM

  • Problem of Multiple  pages in a pdf

    I design a pdf that have multiple pages, and I add a submit button in the first page. However, I can only get the first page form data when clicked the submit button. what the problem is ?
    ps: the submit button send form data as xml stream.

    I experienced this issue as well. The only way I have found to get around it has been to create a single page form, but set the subform content to "Flowed." The subform expands to as fields are added. There seem to be a number of issues related to multiple pages. A number of simple operations such as ordering tabs and changing the font on a second or third page causes the program to crash. I have also created a number of text fields that would not output anything even though they looked identical to ones that worked fine.

  • CSV export problem with multiple pages

    I have a simple report with pagination and export to excel enabled. If I paginate from page 1, without exporting to excel, to any other page, then export to Excel, I get "No data found." in the CSV output file.
    If I export from Page 1 first, then the export works great -- from page 1 or any other page I paginate to subsequently.
    Does anyone know what's going on here?
    Thanks y'all.

    1. Usually, I make a static computation and make it conditional - if item is NULL.
    2. You got to make sure this is not the only item you need to compute.
    3. I never use default values, so check there is nothing entered there - default values are not transparent and they may cause unexpected behaviour if something else entered there.
    4. The best would be, while you are waiting ;), to create an example for debugging.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Print to pdf often doesn't work with multiple pages?

    When I try to print to pdf, it often doesn't work right.
    I can select, for example, multiple Excel worksheets to print. It looks fine with 4 pages in Preview, but when I select save as .pdf, it only prints 2 of the 4 pages, and it prints those in 2 separate documents rather than a single .pdf document with multiple pages.
    Is there a way to do this? Is this an Apple error or Microsoft error? Since it looks fine in Preview, my guess it is an Apple error?
    Mark

    It sounds like this is the problem with the way Apple handles multiple orientations in a pdf document. You can use Acrobat to print the files - it handles multiple orientations correctly. There was a previous thread on this:
    http://discussions.apple.com/message.jspa?messageID=1983431#1983431

  • How do I create a single PDF file with multiple pages?

    Hi, I occasionally need merge several jpg images into a single pdf file with multiple pages (one Jpg per page). I have tried doing this on Preview, and by selecting all the pages I want to include in my document and trying to save to Pdf through the "Print" function, but every time it only saves the first page.
    Can anyone tell me if there is a way to save multple-page pdf files without having to purchase a specific program (i to this too infrequently to justify the cost)?
    Thanks very much,

    This works for me...
    Open first image in Preview View > Sidebar. Drag the other images into Sidebar, then select all.
    From File menu > print selected images. Choose PDF > Save as PDF
    -mj

  • Open a PDF file in illustrator with multiple pages CS6

    Hi all,
    Maybe someone could tell me if this feature is already available...
    I really need to use this feature... maybe someone has a Idea? i need to translate and edit a PDF file that was original designed by our factory... they had hired a company to make the documentation but the company did go bankrupt so we can't get the original files en need the edit the compressed PDF File...
    I Hope someone could help me...
    Greetz
    Leroy

    hi,
    16 PDF Files with 4 pages Each..
    don’t know what kind of text it is…
    about image quality… if there is a method to editing of the PDF ..  then I could Replace the Images …
    Van: Monika Gause [email protected]
    Verzonden: woensdag 22 augustus 2012 13:31
    Aan: AcidusW01
    Onderwerp: Open a PDF file in illustrator with multiple pages CS6
    Re: Open a PDF file in illustrator with multiple pages CS6
    created by Monika Gause <http://forums.adobe.com/people/Monika+Gause>  in Illustrator - View the full discussion <http://forums.adobe.com/message/4639138#4639138

  • Is there a way to sort a PDF file with multiple pages by a specific field within the PDF? All pages have the same invoice format and i would like to sort by a field within and then print the documents. (Vendor, PO

    Is there a way to sort a PDF file with multiple pages by a specific field within the PDF? All pages have the same invoice format and i would like to sort by a field within and then print the documents. (Vendor, PO#, Date, ect.)

    When you say field, do you mean specifically a form field, such as a text field? Or is the information regular text on the page?

  • Hi guys. i have some problem with a link from a pdf on-line,when i click on it,the page adds a "%" at the and of the link and says "page not found" because of it

    Hi guys. i have some problem with a link from a pdf on-line,when i click on it,the page adds a "%" at the and of the link and says "page not found" because of it.
    This happens only when a load my pdf file on my server, because if i click on the link when the file is on my iPad, the page opens without problem.
    Any help please?
    thanx

    the % sign is often used when there's a space in a name. HTML doesn't like spaces so it fills them with % or %20
    try, on the end of that link, see if there's a space built into the page or the link when the page was made
    On the web address you may be able to 'backspace' at the end and erase that space to get the address, but whomever made the page possibly put a mistake in the link

  • How do I scan multiple pages into one pdf document on a HP Envy 4501 Printer

    My HP Envy 4501 Printer won't let me scan multiple pages into one pdf document.
    I went to "Advanced Settings", clicked on "file" and made sure that the check box next to "Create a separate file for each scanner page" was unchecked.
    When I clicked the Save button it showed the page that I scanned and showed 1/1.  On the right side it had options for changing the brightness and Contrast, Rotate and Crop and "Back", "Save" and "Done" buttons, but nothing about scanning another page.
    Not to mention HP's Customer Support is useless!
    I'd appreciate any help I can get with this problem.
    Thanks,
    Mark

    Hi BH,
    I see your diagram.  I just scanned something.  The screen that I'm looking at right now shows the preview page and the scroll box to the left of that just like in your diagram.  The screen does not show the + button nor does it show the red x button under the scroll box as in your diagram.  I can't see the plus sign because it is not there.
    I tried re-installing the software and drivers as you suggested but that did not have any affect.
    Thank you for trying to help me with this problem but it hasn't worked, therefore I can't mark the reply "Accept as Solution".
    I've noticed that on HP's support forum web page there is only 1 solved request for assistance.  That doesn't give me much confidence in HP.
    Please reply back to this post to let me know if there is anything else that I can try or if you know someone else at HP that can help.
    If I don't here back from you, I'm returning this HP Envy 4501 Printer to get my money back to use it to buy a printer from one of HP's competitors.
    Thanks,
    Mark  

  • HP Officejet 6500A How do I scan a document with multiple pages into one file?

    HP Officejet 6500A Plus e-All-in-One Printer - E710n
    Windows 7 (64 bit)
    How do I scan a document with multiple pages into one file?  My old printer (psc 2110) asked after each scan if I wanted to scan another page.  At the end I had one pdf file with multiple pages.
    This new one creates one file for each page and I cannot find a way to create one pdf file with multiple pages.
    This question was solved.
    View Solution.

    Hi mpw101,
    If you load the papers into the ADF - Automatic Document Feeder, and then select Document to PDF then they will all be scanning into one file. Let me know if this works for you?
    I am an HP employee.
    Say Thanks by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"

  • How do I scan multiple pages into one pdf file using the PIXMA MG7520 on Windows 8.0? Please help!

    I recently received a PIXMA MG7520 for a gift.  It works great with my lenovo laptop/tablet running on Windos 8.0.  The one drawback to the HP all-in-one that it replaced is it does not have an ADF.  That being said, there must be some way to scan multiple pages into one pdf file.  I need help figuring thing out.  Thanks in advance!
    Solved!
    Go to Solution.

    Hi mdtolbert54,
    There is a program that comes with the printer called the IJ Scan Utility that can assist you with scanning multiple pages into a single PDF document.  To do this, please follow these steps:
    1. On your keyboard, press the Windows key.
    2. Start typing IJ SCAN UTILITY. The search window opens as you type. Once the IJ SCAN UTILITY is displayed, please select and open it.
    3. In the Canon IJ Scan Utility window that opens, click SETTINGS.... in the bottom right of the window. The Settings dialog box appears.
    4. Click the DOCUMENT SCAN option on the left pane of the window.
    5. In the SAVE SETTINGS section of the window, you will select the save format and location of the document you are about to scan.
    a.) In the FILE NAME field, specify the name you would like to give the file. By default the filename will begin with IMG; you can remove IMG and change it to whatever you would like to name the file.
    b.) In the DATA FORMAT field, use the drop-down arrow to select the PDF (Multiple Pages) option. 
    c.) In the SAVE IN field, please navigate to the area where you would like the file to be saved once it is scanned in. By default, the file will be saved in the MY DOCUMENTS folder.
    6. Once all settings have been selected, click the OK button at the bottom of the window to save the changes. The IJ Scan Utility main screen appears.
    7. Click the DOCUMENT button. Scanning starts. Click the CANCEL button to cancel scanning if needed. Scanned items are saved in previously selected folder location specified in the SETTINGS... window.
    If you find that you need advanced scanning options such as adjusting resolution, brightness, contrast, saturation, color balance, etc. in addition to the options selected above, please click on the SCANGEAR button on the IJ Scan Utility Main screen, then adjust the items as necessary.
    Once the items above are set for document scanning, in the future, you will only need to launch the IJ Scan Utility, then press the DOCUMENT button to perform the scan (unless you want to make changes to the settings).
    Hope this helps!
    This didn't answer your question or issue? Please call or email us using one of the methods on the Contact Us page for further assistance.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • Split TIF document with multiple pages

    Hi,
    Iu2019m using function module 'SCMS_HTTP_GET' to retrieve TIF document from Filenet.  The TIF document returned has multiple pages.  Iu2019m able to retrieve the document with no issue.  What I need to do is split the TIF document for each page.
    Is there a way in ABAP to split the TIF on each page break?
    The reason I need to split is later in program I call FM SSFC_BASE64_ENCODE passing data to Adobe form that uses IMAGE FIELD object to display TIF.  I have no issue displaying TIF with 1 page on adobe form.  But if there are multiple pages only the first page is displayed in the Adobe PDF.  I was thinking if I could split the TIF that contains multiple page into individual TIF I would then pass in table to PDF form to display all pages of the TIF.
    Appreciate the help,
    Gary

    Hi,
    I'm also in the same situation. I am uploading the TIf file with multiple pages, but only the first page is printing. Did you get any luck in either printing all pages OR program which can spilt...
    Thanks,
    Sarma

  • Oracle Text - Problem with filtering binary documents (.doc, .pdf, etc...)

    Hi, I have a problem with filtering binary documents (.doc, .pdf, etc...). I use SQL*PLUS for remote access to Oracle 10.2 on Linux and I create table:
    CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    I insert to this table:
    INSERT into test values(1, 'PATH/text1.doc‘);
    INSERT into test values(2,'PATH/text2.doc‘);
    and then:
    CREATE INDEX test_index ON test(text) indextype is ctxsys.context
    parameters (’datastore ctxsys.file_datastore
    filter ctxsys.auto_filter’);
    Message "Index created" is displayed, but objects: DR$test_index$I, DR$test_index$K, DR$test_index$N, DR$test_index$R and DR$test_index$P are empty => index wasn´t created probably.
    I don´t know, where is bug, either bug is somewhere in this code or on the server (wrong installation oracle or constraint privileges). Do you know in what is bug?

    The following is an excerpt from the 10g online documentation. Note the items that I have put in bold.
    "FILE_DATASTORE
    The FILE_DATASTORE type is used for text stored in files accessed through the local file system.
    Note:
    FILE_DATASTORE may not work with certain types of remote mounted file systems.
    FILE_DATASTORE has the following attribute(s):
    Table 2-4 FILE_DATASTORE Attributes
    Attribute Attribute Value
    path path1:path2:pathn
    path
    Specify the full directory path name of the files stored externally in a file system. When you specify the full directory path as such, you need only include file names in your text column.
    You can specify multiple paths for path, with each path separated by a colon (:) on UNIX and semicolon(;) on Windows. File names are stored in the text column in the text table.
    If you do not specify a path for external files with this attribute, Oracle Text requires that the path be included in the file names stored in the text column.
    PATH Attribute Limitations
    The PATH attribute has the following limitations:
    If you specify a PATH attribute, you can only use a simple filename in the indexed column. You cannot combine the PATH attribute with a path as part of the filename. If the files exist in multiple folders or directories, you must leave the PATH attribute unset, and include the full file name, with PATH, in the indexed column.
    On Windows systems, the files must be located on a local drive. They cannot be on a remote drive, whether the remote drive is mapped to a local drive letter."
    With accessible paths and files, you get something like:
    SCOTT@orcl_11g> CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    Table created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> INSERT into test values(1,'c:\oracle11g\banana.pdf');
    1 row created.
    SCOTT@orcl_11g> INSERT into test values(2,'c:\oracle11g\cranberry.pdf');
    1 row created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> CREATE INDEX test_index ON test(text) indextype is ctxsys.context
      2  parameters ('datastore ctxsys.file_datastore
      3  filter ctxsys.auto_filter');
    Index created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> select count(*) from dr$test_index$i
      2  /
      COUNT(*)
           608
    SCOTT@orcl_11g> In the following, I used a non-existent path and non-existent file name, which produces the same results as when you use a remote path that does not exist locally.
    SCOTT@orcl_11g> CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(100));
    Table created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> INSERT into test values(3,'c:\nosuchpath\nosuchfile.pdf');
    1 row created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> CREATE INDEX test_index ON test(text) indextype is ctxsys.context
      2  parameters ('datastore ctxsys.file_datastore
      3  filter ctxsys.auto_filter');
    Index created.
    SCOTT@orcl_11g>
    SCOTT@orcl_11g> select count(*) from dr$test_index$i
      2  /
      COUNT(*)
             0
    SCOTT@orcl_11g>

  • How can I fix this problem with exporting Pages files?

    Hello,
    I'm having problems with exporting Pages files to Word or PDF (I haven't tried the other formats). Whenever I try to export the Page file, I get one message like this: "The document "XXXXXXX" could not be exported as "YYYYYYY". This problem started after the last Pages update, before that it was working fine. I restarted the computer, updated the OS, but the problem hasn't been solved.
    Does anyone know how to fix this problem?
    Thank you in advance!
    Best regards,
    Filipe

    Computers are made of parts made by humans and assembled by humans of materials that are not perfect.
    For example, a display cable that was accidentally pinched during assembly would pass quality control testing with flying colors and would not fail until the lid had been opened and closed several times.
    Likewise a display might not fail until powered on and off a few hundred times.

Maybe you are looking for