Print multiple forms between FP_JOB_OPEN and FP_JOB_CLOSE

I am aware, that there are questions regarding "Printing Multiple forms", but I didn't find answers there.
Still my system is not working as expected:
1.  FP_JOB_OPEN is called
2. the generated Adobe Forms function is called multiple times
3.  FP_JOB_CLOSE is called
This program doesn't deliver all the pages, but just the first call. How shall I solve this problem?
(Coding should work anywhere with copy-pase.)
data: fm_name           type rs38l_fnam,
      fp_docparams      type sfpdocparams,
      fp_outputparams   type sfpoutputparams.
parameters: p_fpname type fpname default 'FP_TEST_02'.
* Get the name of the generated function module
call function 'FP_FUNCTION_MODULE_NAME'
  exporting
    i_name     = p_fpname
  importing
    e_funcname = fm_name.
* Sets the output parameters and opens the spool job
call function 'FP_JOB_OPEN'
  changing
    ie_outputparams = fp_outputparams
  exceptions
    cancel          = 1
    usage_error     = 2
    system_error    = 3
    internal_error  = 4
    others          = 5.
* Call the generated function module
call function fm_name.
* SECOND CALL ****************************
call function fm_name.
* Close the spool job
call function 'FP_JOB_CLOSE'
*    IMPORTING
*     E_RESULT             =
  exceptions
    usage_error           = 1
    system_error          = 2
    internal_error        = 3
    others               = 4.

Hi ZSOLT,
In order to call the form multiple times please do the following,
1) Just before your FP_JOB_OPEN you need to pass the output parameters (good practice). You can also set other parameters as well (for example nodialog, preview, copies., etc)
  CLEAR  fp_outputparams.
  fp_outputparams-dest = 'PDF1'.      "Default pdf printer
  fp_outputparams-reqnew = 'X'.       "New spool request
Now call your FM FP_JOB_OPEN with the above output parameters.
2) Usually this step is processed in a loop. (getting your interface data into a internal table and then looping at it)
But here I am enhancing your example code.
In order to trigger the form multiple times you need to change some input data to the form (for example I have changed date and time below in the prepare test data sections) so that the call function fm_name gets regenerated every time there is new data
data  l_datatypes       type sfpdatatypes.
prepare test data
  l_datatypes-char = '#'.
  l_datatypes-string = 'Auf geht''s! '.    "#EC NOTEXT
  l_datatypes-numc = '42'.
  l_datatypes-dec = 0 - ( 12345 / 7 ).
  l_datatypes-fltp = 0 - ( 12345 / 7 ).
  l_datatypes-int = 4711.
  l_datatypes-curr = 0 - ( 12345 / 7 ).
  l_datatypes-cuky = 'JPY'.       " no decimals
  l_datatypes-quan = 12345 / 7.
  l_datatypes-unit = 'DEG'.       " 1 decimal
  l_datatypes-date = '20040613'.      
  l_datatypes-time = '100600'.         
  l_datatypes-lang = sy-langu.
FIRST CALL ****************************
Call the generated function module
  CLEAR fp_docparams.
  fp_docparams-langu = 'EN'.       
  fp_docparams-country = 'US'.  
  call function fm_name
    exporting
      /1bcdwb/docparams        = fp_docparams
      datatypes                = l_datatypes
      mychar                   = l_datatypes-char
     mybyte                   =
      mystring                 = l_datatypes-string
     myxstring                =
      mydate                   = l_datatypes-date
      mytime                   = l_datatypes-time
      mynum                    = l_datatypes-numc
      myint                    = l_datatypes-int
      myfloat                  = l_datatypes-fltp
      mypacked                 = l_datatypes-dec
  IMPORTING
    /1BCDWB/FORMOUTPUT       =
prepare test data
  l_datatypes-char = '#'.
  l_datatypes-string = 'Auf geht''s! '.    "#EC NOTEXT
  l_datatypes-numc = '42'.
  l_datatypes-dec = 0 - ( 12345 / 7 ).
  l_datatypes-fltp = 0 - ( 12345 / 7 ).
  l_datatypes-int = 4711.
  l_datatypes-curr = 0 - ( 12345 / 7 ).
  l_datatypes-cuky = 'JPY'.       " no decimals
  l_datatypes-quan = 12345 / 7.
  l_datatypes-unit = 'DEG'.       " 1 decimal
  l_datatypes-date = '20100913'.                 "You need to change your data in order it to trigger a new form with the new data.
  l_datatypes-time = '10700'.                        "You need to change your data in order it to trigger a new form with the new data.       
  l_datatypes-lang = sy-langu.
SECOND CALL ****************************
Call the generated function module
  CLEAR fp_docparams.
  fp_docparams-langu = 'EN'.
  fp_docparams-country = 'US'.
  call function fm_name
    exporting
      /1bcdwb/docparams        = fp_docparams
      datatypes                = l_datatypes
      mychar                   = l_datatypes-char
     mybyte                   =
      mystring                 = l_datatypes-string
     myxstring                =
      mydate                   = l_datatypes-date
      mytime                   = l_datatypes-time
      mynum                    = l_datatypes-numc
      myint                    = l_datatypes-int
      myfloat                  = l_datatypes-fltp
      mypacked                 = l_datatypes-dec
  IMPORTING
    /1BCDWB/FORMOUTPUT       =
Close the spool job
call function 'FP_JOB_CLOSE'
   IMPORTING
    E_RESULT             =
  exceptions
    usage_error           = 1
    system_error          = 2
    internal_error        = 3
    others               = 4.
I have tested the above code and I am getting multiple forms.
Please try on your end and let me know if it works.
Thanks
Raj

Similar Messages

  • Print Multiple copies of report, and resetting Page number for each copy.

    Dear frnds!
    i am using developer 6i reports i have a problem.
    i want to Print Multiple copies of report, and resetting Page number for each copy" that is 4 copies of an invoice is required
    1 - for user copy
    2- gate copy
    3- accounts office
    4- office copy
    any body please tell me the solution "i am using oracle 9i and developer 6i"
    Thanx
    Ibrar

    Hi,
    I was wondering if you were able to get your multiple copies working? Below is what I have so far, just trying to get it to work before changing the actual template.
    <?for-each-group@section:R5542520/Pick_Slips_Detail_Lines_S3;PickSlipNumber_ID260?>
    <?variable@incontext:G1;R5542520/Pick_Slips_Detail_Lines_S3;PickSlipNumber_ID260?>
    <?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,3,1)?>
    HEADER
    PSN: <?$G1/Pick_Slip_Number_Display_ID54?>
    PSN Detail: <?$G1/PickSlipNumber_ID260?>
    Page 1 of 3
    <?start:body?>
    BODY
    <?$G1/LineNumber_ID6?>
    <?end body?>
    FOOTER
    <?end for-each?>
    <?end for-each-group?>
    XML:
    <R5542520>
    <Pick_Slips_Detail_Lines_S24>
    <Header_Custom_Section_S24>
    <Pick_Slip_Number_Display_ID54>123456</Pick_Slip_Number_Display_ID54>
    <PickSlipNumber_ID260>123456</PickSlipNumber_ID260>

  • Adobe forms -Can we print multiple forms?

    i,
    Right now my form has an ability to display a single Order with single Header & line items.
    Hi,
    I want to enhance the functionality to multiple forms prints.I mean I will be having multiple headers and l ine items.
    I can fill my internal tables with multiple records data but what are the other form changes should i take care( hierarchy, data, etc...)
    In smartforms I was able to do this because there we can define loops.How do we handle it here in adobe forms?
    FYI.. I am filling internal table through WD application.Should I do Some context level changes?
    Also,
    In Dev environment I can see my Bold objects but when i move it to QA they are disappearing & font is also changing.What could be the reason?
    rgds
    Vara

    Hi Vara,
    Re: Adobe Forms
    Regards,
    Sravanthi

  • Print quality difference between iphoto and aperture...?

    when ordering books, is there a print quality difference between using iPhoto and Aperture? or are they sent to the same lab?
    it's possible i may have some setting wrong, but when i order a book using iphoto, i never really feel the quality is that great. it's good, i just feel it could be a lot better. the print quality sort of reminds me of newsprint, albeit high quality newsprint. similar sized prints made at home on my basic 3-in-1 printer look better.
    thanks...

    Previews are what you view on your display. When you import a photo into Aperture (and I'm pretty sure iPhoto as well), your computer automatically generates a preview for quick viewing. The original images are stored in your library, but it is the preview that you see.
    In Aperture, you are able to set the size and quality of these previews. When sharing photos between Aperture and iPhoto, the process is as follows:
    Let's say that your images are stored in Aperture, but you also want to be able to view them in iPhoto without taking up too much room on your hard drive. Essentially, if you were to import the originals into iPhoto as well, you would be storing two exact, yet separate copies of the same image on your hard drive. As you are aware, with large images (whether JPEG's, and especially RAW) this would put quite a tax on your storage capacity after not too long.
    So, you have your images in one or the other (in this case Aperture), but you want to play around with them in iPhoto. What you can do, is open iPhoto, go to the File menu and then select, Show Aperture Library. This will open a window with all of the contents of your Aperture Library. You can then drag any images you want into iPhoto . The only thing is, you are not dragging the original JPEG's, but rather, the previews of those images. If you have those previews set to a lower quality (again for capacity concerns), you will only have lower quality and lower detailed images in iPhoto. These images might not be ideal, or even suitable for printing high quality prints. The previews that you generate in Aperture though can be adjusted to be extremely high quality with no size limits.
    My thinking was that since you mentioned Aperture, it sounded like you had experience with working with it and with ordering a photo book through Aperture. I guess you were saying that you ordered via iPhoto, weren't happy with the quality and were wondering if Aperture created books were better.
    Anyway, if this is the case, I cannot answer that for you. I have never ordered a book through Aperture. If the quality of your images is good, you should be able to get a decent product no matter where you order it from. There is not doubt that the materials used and the print shop that does the work makes a difference, but if your images are good, you should still get a decent product through iPhoto. Perhaps iPhoto isn't the way to go though if you have had poor experiences with them.
    If you haven't used Aperture yet, I would highly recommend it though aside from the photo book aspect of this thread. It is a stellar product.
    I hope this helps.
    Message was edited by: macorin

  • Multiple forms through process and forms

    Hello ALL,
    We are using process and forms for maternity, paternity and
    adoption leave and not able to control creating multiple forms by
    employee. We have not activated parallel run option, still system is
    allowing user to create multiple document for same leave
    Could you let me how to stop user to creating multiple
    forms.

    There are many ways to achieve this.
    1. Use the BADI that you shown in the screenshot.
    2. Set process frequency.
    Regards.

  • Multiple address between CRM and IS Retail

    Hi Gurus,
    In CRM we are maintianing multiple address function for 1 BP but Retail does not has, how to link it between CRM and Retail?
    regards
    Kannan

    Hi All,
    The major thing is we should not use ISU as stativ and CRM dynalic system. As we all aware When SAP is launching any module or technology its beleives in re-usabilty.
    Now the issue data replecation between CRM and ISU-
    1. In a utility market if the customer,retailer and the network operator initiate any business flow they should start with CRM as CRM is handling FOP part.It means CRM has not only build only for ISU.
    2. In ISU before billing so many things is getting triggered - like new connecion,transfer,move-in,move-out etc....these process cant be done with the CRM business module as I mentioned earlier CRM is not only designed for IS-U
    So for a smoother process and with proper business SAP introduced CRM IS-U.
    Without replacting the data between CRM and IS-U we cant process the steps which will at last billed a customer.
    Regards.
    Abinash

  • Printing multiple forms for one output types.

    Hi,
    I need to print the form 4 times for one specific output type.  My internal table contains only one record, but for that one record also i need to print 4 forms. How can i do this, i tried using control parameters but in vain.
    Any suggestions of how to achieve this,
    Thanks & Regards,
    Ramana.

    Hi,
    I am working with only one smart form. But there are different output types(ZVSL, ZVFX, ZVFE & ZVFI) configured for that form. But for one specific output type (ZVSL), i need to repeat the print for 4 times.
    Thanks & Regards,
    Ramana

  • Multiple display between Mac and Ipad

    I have an IPAD with latest IOS system and a Mac with Maverick.
    Would multi display works between Mac and Ipad?
    If so, where can I found manual or instruction to make it works?
    Thanks.

    You'd have to use something like DisplayPad to do that. I have it set up on my system and its working great under Mavericks (it wasn't supported under Mountain Lion on my system).
    Good luck.

  • How to print multiple form for tag printing in smartforms

    Dear Experts,
    I am working on tag printing in smartforms .in tag printing i am showing
    1.material no.
    2.material descrption.
    3.material doc no.
    4.Quantity
    5.supplier.
    my requirement is that for example , if the mat. document no.  has a material of 10,000.00 quantity , in tag printing it should come 1,000.00 of each tag  and total no of tag should be 10. and it should come one after another .
    and the page format size 8 x 6 cm. is it possible .if possible how ! how the system will know how many tag is to be printed . please reply its urgent.

    Hi Kumar,
    Let me know. is the quantity 1000.00 is fixed? if so thn you can achieve the requirement.
    For example:
    There are  A-material with 20000.00 quantity thn  u can first divide the quantity with 1000.00
                 v_ex = 20000.00/1000.00=20.
    thn  you can repeat the  print of the smartform for 20 times by passing  the parameter to  form fm.
    Please reward if  useful.

  • Adobe Acrobat, Print multiple files to PDF and merge open files to closed files?

    I have Adobe Acrobat XI Professional.
    Print to PDF – How can this be done for more than 15 documents at a time?  Right now, if I select 16 or more documents, I cannot ‘right click’ and choose ‘print’.  Is this a setting issue?  If I have many documents I need to print to PDF at once, it would be helpful if there wasn’t this limitation.  Background: This needs to be done to PDF files created from Adobe Live Cycle (and possibly from other software) because the files cannot be merged unless they are ‘printed to PDF’ first.  I don't know an alternate way to merge these files.
    Also, if I have a multi-page PDF open and I need to parse out the pages to different files, is it possible to drag the selected pages out of the open PDF and hover over a closed PDF and have them added to the end of the closed PDF document?  I don't know of a way to do this, but I thought I would check to see if anyone else was aware of a simpler way to parse pages from one document into several pre-existing documents without opening each and dragging the files between them.
    Thanks!

    Thank you for your response...I can do the additional step to combine them, the problem that I have is that the documents need to be in chronological order.  If I print them to the pdf printer or export them, either way, windows sorts them and they are no longer chronological.  While I can organize them when I combine them there are many times that there way too many that need combined into one pdf, making it a very inefficient and cumbersome process to do.  So I was in hopes there was a way to just have the pdf printer create one file instead of one for each document, it would keep them in chronological order.  I suppose I could number them on the print to keep them chronological - but when there are 75 or 100 documents it is a bit of a pain to sit there and respond to each document as it is being printed, and then need to do the additional step of combining.  My goal in this process is to gain efficiency so thought I would see if anyone knew how to use the pdf printer to create the single file.

  • Transfer order of multiple materials between WM and MM warehouses

    Hi
    i have a requirement to manage with a custom program or with standard transaction the transfer of multiple materials (KITS) between WM warehouse and MM warehouse and inside the same warehouse . How can i achieve this functionality
    Can you advice ?
    thanks in advance

    can you describe in a more technical way what you mean by "movement between WM warehouse and MM warehouse"
    Maybe you can give an example how you do that for a single movement

  • Printing a form in original- and in an edited-version.

    Hi there,
    i have a little problem with a form and i'm full of hope someone can help me.
    Problem: I need two printed versions of a filled form. One for customer 1 and another for customer 2. This should happen on a single click on a print button. Version 1 is what you see on the screen. Version 2 has some changes. There must be a textchange (textfield: "customer 1" to "customer 2") and a subform that must be hidden. And now there comes the ugly truth: After printing, i need the form in the unchanged version (if you need to change something after printing without refilling the whole form).
    Example: In the attached PDF are the main required fields. I want to change the text in the gobal-field "version" (this.rawValue = 'customer 2') and hide the subform "text" on the second page (this subform will allways appear on the last page of the forms).
    I'm not getting it. Is it the wrong way? Could it work, if i duplicate the whole form and edit the duplicates?
    Is there a way to get my ideas running?
    Thanks for your help and please excuse my english.
    If you find mistakes, keep them. I don't need them anymore.
    Florian

    Hi,
    Because you have brought the form in from another document, you can not save it as dynamic. You can import a PDF to a flowable layout (dynamic), but the content will come in as static artwork. Sometimes you are better starting from scratch with a new form.
    In order to show/hide objects the form needs to be saved as dynamic PDF in LC Designer.
    Example attached (new form). The script is spread over a couple of buttons that are hidden to the user.
    Good luck,
    Niall

  • Print Multiple forms per Marketing Document SAP B1 2007

    When printing the Delivery document,  I need to print a Packing list and a Bill of Lading.  How can I acheive this in SAP B1 2007?  I am hoping there is a way when pressing the Print button that I can have both documents print like when printing and order,  having both an Order and a Pick list print.
    TIA!!!
    Dana

    Dana,
    You can have multiple Layout pages to the PLD.
    If you open the PLD of the Delivery document / any marketing document
    and From the Print layout designer Menu click display document properties... Paper format tab, you can add 2 or more pages in the field <b>Number of Layout Pages</b>.
    By this you can design the second page of the layout accordingly.
    Regards
    Suda

  • PRINT MULTIPLE FORM

    Hi Guys,
    I have Created a Business Object (Eg- Preview) .
    Can anybody help me out in creating a solution for providing more than one preview option to the end user in the Purchase order/Sales order Scenario.
    Like, while looking at the Purchase Order preview, we get two options- Cancelled PO, & Changed PO.
    thanks & regards
    Manoj Kannaujiya.

    Hi Thomas,
    i want to print two different print form from a single preview button .
    i  have added  some extension field in sales order through adaptation.
    Now my customer want to print  default sales order form as well as extended field with default sales order form.
    these two form would be available on choices like a purchase Order Preview button in the  system .
    is it possible ..?
    thanks
    Manoj Kannaujiya.

  • Printed color difference between Pages and Adobe InDesign.

    Dear members:
    I have created documents in Pages that I later decided to re-create in InDesign.
    One problem I noticed is the fact that colors printed on paper don't look the same. I basically copied the RGB values used in Pages for the different colors and used these same values in InDesign. Although on screen colors look the same, on paper they look quite different. In case this information is important I am using an Epson printer model R1800.
    Any ideas ?
    Thank you again for your help.
    Joseph Chamberlain

    Thank you all for your answers. I appreciate your help and input.
    Joseph Chamberlain

Maybe you are looking for

  • Purging queues in Oracle 8i

    Hi, I've got an old Oracle 8i (8.1.7.3.0) database that has some queues that have been running for years with retention_time=-1 so there are gigabytes of old messages taking up approx 200GB of disk space. Here's an example of how one of the queues lo

  • Error opening Oracle SQL Developer 1.2.1

    In my IDE, I saw extensions pane with title "Entensions - Log" which has the following contents: oracle.ide.db Warning: Classpath entry \DISTAPPS$\ORACLE\v10\Oracle10g\jdbc\lib\ojdbc14.jar not found Warning: Classpath entry \DISTAPPS$\ORACLE\v10\Orac

  • Not running in background mode 'N'

    hi experts,,,,, i have a  small issues in my BDC where i face problem when running in background if i update in 'A' mode its get updated whereas in background 'N' mode it doesnt take the changes and CHANGES NOT  GETTING REFLECTED/... can you pls help

  • Photo image requirement

    This may be the easiest question, but just started creating DVD using only still photo digital shots. All my photos are good quality(more than 150dpi, larger than 1280X960, and I see crystal clear image on 'preview' window, but when I placed the phot

  • Cannot set synch configuration in Desktop Manager

    Hello, I'm using a Blackberry Bold 9700 and a Win 7 computer with Outlook 2003. I'd like to sync my BB with my Outlook contacts and calendar, but I'm completely unable to set up my synch configuration in the Desktop Manager.  When I try to do so, a "