Adobe Forms - Page Break via a Conditional Break

Having read through the forum I am getting the impression that Page Breaks is a bit of a problem.
I can enforce a page break between datasets by setting "After:" to "Goto Next Page", on the Object->Pagination tab, however this results in a blank page at the end of the entire output which is just the Master Page with all the static elements.
The 'Conditional Breaks' sounds like the logical point to force a page break based on a combination of inequality or if a particular data element equals a known value.
However, I don't seem to be able to get the 'Conditional Break' to work.
So, the question I would like to ask, is how can you tell if the conditional break logic is correct and whether or not it is running? For example on an ABAP system is it possible to run it and debug it?
My attempts at getting the break to open a pop up or write to disk via JavaScript fails, which is leading me to think they  are being ignored by the Adobe Form at both the server and client level.
Is it possible that I have missed another setting somewhere else in the Adobe form configuration?

Hello Jason!
You are right that conditions (and all scripting) are bit tricky in this solution. Still they work.
Debugging of AIF at ABAP side is not possible due to the architecture of the solution - from the ABAP POV it is just a web-service call and receiving result (PDF) back. You can't stop it on midpoint or intercept it somehow.
At the same time there are other ways to check it.
First, you can enable trace and saving additional info in SFP transaction under Utilities -> Settings.
Details see [here|http://help.sap.com/saphelp_nw70/helpdata/EN/f7/a04aee0cb94978a011401311efe603/frameset.htm]
And the nice way to check if your condition block is taken into the account is simple check like 1 = 2.
If this works and you receive page break than all you need is find errors in your condition syntax, otherwise the problem is somewhere else.
Regards,
Petr Perstnev

Similar Messages

  • Print Adobe form pages on different printers based on the condition

    Hi All,
    I am new in Adobe forms. We have requirement to print first 5 line items in adobe form (which are printing on first page) on one printer and remaining pages on another printer.
    What solution I was thinking was, in print program call the adobe form twice with flag as a importing parameter. For the first call the flag value will be set and for second run a blank value will be passed in flag.
    If flag is set then call make the first page "visible" and if flag is cleared then "hide" the first page and make the remaining pages "visible".
    But as its an item data which is designed on "Design" view I am not able to write a script to hide the page. Any suggestion you can give to resolve this issue.
    Thanks,
    Mihika.

    If it is OK to have the default printer defined/maintained in the user master (like tcode Su01 or System > User profile > Own data, Then the standard logic may suit your needs. I think you will need to undo some config for the whs. Te standard logic works as detailed below. the system needs to get to #4 below, then the SAP userid printer will be selected.
    the system proceeds with automatic printer determination as described below Config Tcode is OMLV.
    1) First the system checks whether a printer is set in the configuration "Printer-Movement". If so, the printer determination is complete at  this point.                                                         
    2) If not, the system uses the parameter "PriSrcTyp" defined in the configuration "Printer-Movement" to decide how it will proceed.  If the parameter is set here, the system checks if a printer is defined in the setting "Printer Picking Area" and then proposes this printer.                                                            
    3) If the system finds no printer, it searches in the setting "Printer - Storage Type" and uses this, if a printer is set.                   
    4) If the system cannot find a printer using the methods described above it selects the printer defined in the user master of the user currently logged on.                                                
    5) If no printer is defined here, the system automatically proposes LP01
    This writes the data to the spool file.

  • ADOBE form - page reset for the second SO

    Hi all,
    Iam working on sales order form ( ADOBE Form). Nneed to display SO header and item details.But it is not for a single SO and it is for multiple SOs.First i need to display one sales order and its items after completing the all items of the first SO , the second SO details should come in the next page. This is fine, i have done this, but for the second SO the page numbers should start from 1. That means the page no has to be reset for each SO change.Suppose assume that, if the first SO is taking 2 pages for  printing item details and second SO is taking 3 pages for printing item details then the page nos should follows the below sequence:
    First SO :  1 of 2
                    2 of 2
    second SO : 1 of 3
                        2 of 3
                        3 of 3.
    but it is printing as 1 of 5, 2 of 5 ..... like this. Because we are using the system field for this.Can we reset the page numbers according to the condition?
    Regards ,
    Vineel.

    Hi,
    One addition to the previous answer. You need to set the Output device in the program itself and the nodialog field of the outputparams should be set to 'X'. For example you can go through the below code.
    DATA:
      w_formname TYPE fpname,
      w_function TYPE funcname.
    DATA : docparams TYPE sfpdocparams.
    DATA : formoutput TYPE fpformoutput.
    DATA : outputparams TYPE sfpoutputparams.
    DATA:
          BEGIN OF fs_orders,
            vbeln TYPE vbak-vbeln,
          END OF fs_orders,
          t_orders LIKE STANDARD TABLE OF fs_orders.
    SELECT vbeln
      FROM vbak
      INTO TABLE t_orders
        UP TO 5 ROWS.
    CHECK sy-subrc EQ 0.
    w_formname = 'YH297_FORM_SALESORDER'.
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
      EXPORTING
        i_name                     = w_formname
      IMPORTING
        e_funcname                 = w_function
      E_INTERFACE_TYPE           =
    outputparams-dest = 'PDF1'.
    outputparams-nodialog = 'X'.
    LOOP AT t_orders INTO fs_orders.
      CALL FUNCTION 'FP_JOB_OPEN'
        CHANGING
          ie_outputparams = outputparams
        EXCEPTIONS
          cancel          = 1
          usage_error     = 2
          system_error    = 3
          internal_error  = 4
          OTHERS          = 5.
      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.
      CALL FUNCTION w_function
        EXPORTING
        /1bcdwb/docparams        =
          document                 = fs_orders-vbeln
      IMPORTING
        /1BCDWB/FORMOUTPUT       =
        EXCEPTIONS
          usage_error              = 1
          system_error             = 2
          internal_error           = 3
      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.
      CALL FUNCTION 'FP_JOB_CLOSE'
    IMPORTING
       e_result       =
        EXCEPTIONS
          usage_error    = 1
          system_error   = 2
          internal_error = 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.
    ENDLOOP.
    Regards,
    Ram

  • Arabic SubTotals in Adobe Form Page.

    Hi Everyone,
    I have a requirement of printing Subtotals of a table in Arabic as well as English on the same page for all pages in the form.
    FYI i have made a function module to convert english digits into arabic, which i use in my code to convert english amounts to arabic amounts.
    Like -
    CALL FUNCTION 'ZJP_M_ARABIC_NUMERALS'
    EXPORTING ENGLISH = V_AMOUNT
    IMPORTING ARABIC = V_AMOUNT_AR.
    This gives me the arabic amount.
    Now i am printing english subtotals using the javascript code :
    var fields = xfa.layout.pageContent(xfa.layout.page(this)-1, "field", 0);
    var total = 0;
    for (var i=0; i <= fields.length-1; i++) {
    if (fields.item(i).name == "AMOUNT") {
    total = total + fields.item(i).rawValue;
    this.rawValue = total;
    Through this code i am able to get the english subtotal in my offline adobe form.
    My PROBLEM is - how do i use this english subtotal generated via javascript to convert it into arabic subtotal (using the FM)
    for each page.
    Any help is highly appreciated..!!
    Thanks,
    Piyush.

    Hi Piyush,
    Check this below link set locales for a field using java script this might help if you are looking for @ scripting
    /people/raghavendra.prabhu/blog/2010/12/17/currencynumber-formatting-in-hcm-forms
    I have 2 approaches (hopefully both of them will work).
    1)  Have a hidden field with arabic locale, in your loop keep adding values to this field.
    2) have the required field on the form set the locale to arabic, just assign the english value to this field. (if both english and arabic totals are from same records and same values mathematically then only the presentation locale is different but the value sud be the same right).
    If I am wrong understanding your requirement, please explain what is the difference ...?
    Cheers,
    Sai

  • ADOBE form page hiding using formcal scripting

    Hi Experts,
    I am new to ADOBE form and currently working on invoice print output. (NOT an Interactive adobe form)
    My requirement is
    i wanted to print one main page and 5 different annexures(anexures are having different layouts so is in diff forms and contained in diff pages)
    Deppending on 'Oreder reason' (made as global variable) , i need to select appropriate annexure and print
    main page and any one of the annexure.
    so i should hide all other annexure, to achive this i used formcalc scripting.
    i tried hiding annexure 2 by following code,
    data.Annexure2::ready:form - (FormCalc, client)
    if ( data.G_F_ORDER_REASON.rawValue == "ANX" )
    then $.presence = "hidden"
    endif
    i have passed value 'ANX' to this , i could see the value of order reason printed on page Annexure2 but it is not executing (getting in to if condition) condition and not hiding the page ...
    Experts please help me...
    this way i have to hide 4 other annexures...please help me or give me some other option to achive this.
    thanks and regards
    varun
    Edited by: skyblue on Aug 6, 2011 3:30 PM
    Moderator message: please do not cross-post.
    Edited by: Thomas Zloch on Aug 8, 2011 11:29 AM

    Hi Experts,
    I am new to ADOBE form and currently working on invoice print output. (NOT an Interactive adobe form)
    My requirement is
    i wanted to print one main page and 5 different annexures(anexures are having different layouts so is in diff forms and contained in diff pages)
    Deppending on 'Oreder reason' (made as global variable) , i need to select appropriate annexure and print
    main page and any one of the annexure.
    so i should hide all other annexure, to achive this i used formcalc scripting.
    i tried hiding annexure 2 by following code,
    data.Annexure2::ready:form - (FormCalc, client)
    if ( data.G_F_ORDER_REASON.rawValue == "ANX" )
    then $.presence = "hidden"
    endif
    i have passed value 'ANX' to this , i could see the value of order reason printed on page Annexure2 but it is not executing (getting in to if condition) condition and not hiding the page ...
    Experts please help me...
    this way i have to hide 4 other annexures...please help me or give me some other option to achive this.
    thanks and regards
    varun
    Edited by: skyblue on Aug 6, 2011 3:30 PM
    Moderator message: please do not cross-post.
    Edited by: Thomas Zloch on Aug 8, 2011 11:29 AM

  • Send Adobe form as PDF via E-mail

    Hi,
    I am doing one interacive adobe form where i need to send that filled form in PDF format via email.
    I tried using below options but unfortunately its not working:
    1.I used "Email Submit Button" but its sending attachment as XML which I dont want.
    when reffred threads on this problem , they suggested to go to XML VIEW of this button and change SUBMIT FORMAT to "pdf" from "xml".... but in this case , that button is not working at all.
    2.I used below solution
    Use a regular form button:   Place a regular form button on your form .  Look on the Object Window for the button.  On the Field tag, towards the bottom will be a set of "Control Type" radio buttons.  Select the "submit" option.  There should now be a "submit" tab in the Object window.  Switch to the tab and on the "Submit As" pulldown select PDF.  But this is also not working.
    Your comments are helpful for me.

    Hi,
    Get your form data in XML format from Interface. There are some standard classes available to convert the XML to PDF and sending mail.
    Thanks,
    Revanth Naidu

  • Adobe Forms - Page Count

    Hi All,
    I am facing a problem with one issue in Adobe Forms.
    We need to have two sets of data in the same spool. Like one set of data on one body page and other set of data on other body page. So, if there are total 5 pages of 2 sets, they should print like 1of3, 2of3, 3of3 and 1of2, 2of2.
    Please Help !
    Thanks in Advance.
    Sahitya

    Hello Sahitya,
    If you know in advance two sets of data can be identified then you can trigger smartform twice for each data set and have added spool. In this case you need not to do any change in ur form design.
    Pls ref below link for further details of spool addition-
    http://help.sap.com/saphelp_nw70/helpdata/EN/e3/31f03bb8e8ed0ce10000000a11402f/content.htm
    Regards,
    Nishikant.

  • Adobe Form -  How to set a condition for a Subform

    Hi All
    I am new in Adobe Form and learing it - (I had some knowledges of SmartForm) - One of the requirement I have to do is to print out a different layout (subform) according to a value of a flag.
    In Smartform, I can draw diffrent layouts and put a condition on each layout so each one can be printed accroding to the flag value.
    In Adobe Form, the subform (or any other object) cannot be conditional set - I don't know how to do it - Could comeone please show me how - I reward points for any reply - Thanks

    You are excused with your English - and you must excuse mine , too
    Your questions:
    But, how i write the condition ?
    1- If ( article.table1 = Null ) then ... ?
    2- If ( article.table1.Rangée1.SubForm2.lib_article.rawValue = " " ) then... ?
    Try this:
    1- // Locate the table node from to down
    var tNodes = xfa.resolveNodes("Table1[*]");
    If (tNodes.value == NULL)  {
        tNodes.presence = "Hidden" }     
    or
    2- // locate the varable fields and loop thru to check if they are all empty
    var fNodes_1 = xfa.resolveNodes("article.table1.Rangée1[*].SubForm2.num_article");
    var fNodes_2 = xfa.resolveNodes("article.table1.Rangée1[*].SubForm2.lib_article");
    var fNodesLength = fNodes_2.length;
    var table_empty = "Y";
    for (var fNodeCount = 0; fNodeCount < fNodesLength; fNodeCount++) {
       If     (fNodes1.item(fNodeCount).rawValue <> " ") or
              (fNodes2.item(fNodeCount).rawValue <> " ")      {
                 table_empty = "N";
    // Now find the table node and hide if if necc
    var tNodes = xfa.resolveNodes("Table1[*]");
    If table_empty = "Y"  {
        tNodes.presence = "Hidden" }    
    You must place those codes at the Subform Article level in Javascript mode
    Good Luck
    Edited by: Liem Van Duong on Jun 13, 2008 2:45 AM
    Edited by: Liem Van Duong on Jun 13, 2008 2:46 AM

  • Adobe form page per work table record

    I have read detail records into a table and I want one page per record in that table.  Other tables are to be subset of that record but all data to be written on each page relates to one record in the table.  How do I set the hierarchy so each record in the top table makes a new page.
    Easy to do in Smartforms but I want to use SFP as it is much more detailed when designing form.
    I have laid out the Master Page and I want each record to fit into Content area.
    Also the Master Page was uploaded directly from pdf created from users desgn in EXCEL which worked nicely.
    Do any of the example (FP_TEST*) Adobe forms work easily as an example?

    Solution:  Define subform for the page.
    subform tab > Content: flowed, Direction: Top to Bottom
    Pagination    > Place; In Content Area If Dataset must be Paginated Overflow: Go To Content Area Overflow Leader *1st sub-subform
    Binding        > Default Binding (the table with [*])
                             check Repeat Subform for each Data Item
                             check Min Count 1
    This made each record in table a new page.  In my case I was writing a cycle count record (LINV) with additional statistical and historical data.

  • Adobe Forms page break inside a table

    Hi,
    I have a 50 columns table and I need to print the first 25 columns on a page and the next 25 columns on the following page. Beside this if the number of lines in the table is big enough to flow on a new page I would like to print them like that:
    First n lines (where n is the maximum  of lines that can enter in one page)
    Page 1
    Coumn1 ........ Column25
    Page 2
    Column26..... Column50
    Next n lines
    Page 3
    Coumn1 ........ Column25
    Page 4
    Column26..... Column50
    and so on, until the lines in the table are all printed.
    Thank you very much!

    Hello Ana,
    You can only add a maximum of 20 columns and 50 rows in a single page, the solution would be to conditionally divide the main table as 20xN, 20xN, and 10xN. And regarding the flow on a new page:
    1. If you use the subform for line items, then make the subform type 'Flowed'.
    2. If you use only table in body page then check for Allow page-breaks within content.
    Regards,
    Manish

  • Dynamic row counter column in Adobe Forms

    Hi Guys,
    My table in Adobe Forms is dynamically created with Conditional Breaks. I want to display 1st column as Sr.No. displaying row counter for tables on each page.
    Anyone have idea how to achieve the same.
    Sr.No
    Name
    Address
    1 (generated in adobe forms dynamically)
    xyz
    awsaxa sadsad
    2 (generated in adobe forms dynamically)
    abc
    asds  sad ads
    so on......
    Regards,
    Naveen

    Hi Guys,
    Not able to find any counter variable for table. So what I did is inserted the counter logically before calling Adobe forms driver program.
    FYI.
    Regards,
    Naveen

  • Adobe form:How to Print last row of body to next page & printing max7 rows?

    Hi,
    In ADOBE PDF, Design view, for item level data only 7 row or less should appear in first page for following page if rows are greater than 7 if its less than  7 then last row should be on second page. In design page Below Body Row, user details are 'positioned' so they overlap as soon as item level data exceeds 7.
    Using a Static PDF, 7.2. I checked with Pagination property of Item level data, its been set to Place:Following previous and After Continue filling parent. Will putting condition using Form Calc would suffice in condition breaks? What would be condition?
    Thanks
    Mohinder

    Hi,
    Solved by changing Condition in Table pane, making one row and increasing Header and footer.
    Thanks
    Mohinder

  • Current page printing problem - while repeating pages : Adobe forms

    Hi Experts,
    I have a problem in printing current page number of an adobe form.
    My requirement is that , my form got 2 pages. On first page i am not printing page numbers and excluded from numbering.
    Numbering starts from second page. The second page needs to be repeated twice.
    In this case my page printing should look like :
    First page - no page number
    second page - 1 of 1
    Third page - 1of 1 (as it is a copy)
    IF second page extends to multiple pages (eg.. 2)
    First page - No Page no
    First instance of second page - 1of 2 , 2 of 2
    Second instance of second page - 1 of 2 , 2 of 2 . Presently it is printing like : 3 of 2 , 4 of 2. I need to initialize current page count. I could able to set the total page count 2 via variable from print program. But while printing the second instance, I am not able to initialize the current page count.
    I have seen the following thread which exactly talks about my problem but with out any solution.
    Re: Adobe Forms - Page Count
    Can any one help me in this regard.
    Thank You,
    Regards,
    Naresh.

    Hi,
    I am not sure how your page design looks like.
    Assumption:
    During runtime, ONLY 1 page for Page1, multiple pages for Page2 and Page3, same number of pages for Page2 and Page3.
    This is what i did:-
    I have 3 pages:
    Page1: With NO page number: ONLY 1 page
    Page2: With page number: Multiple page
    Drag the "Insert -> Custom -> Page n of m"
    - TextField: "CurrentPage",
    -- replace the original script: "this.rawValue = xfa.layout.page(this)" with "this.rawValue = xfa.layout.page(this) - 1"
    - TextField: "PageCount",
    -- replace the original script: "this.rawValue = xfa.layout.pageCount()" with "this.rawValue = ( xfa.layout.pageCount() - 1 ) / 2"
    Page3: With page number: Multiple page
    Drag the "Insert -> Custom -> Page n of m"
    - TextField: "CurrentPage",
    -- replace the original script: "this.rawValue = xfa.layout.page(this)" with "this.rawValue = xfa.layout.page(this) - 1 - ( xfa.layout.pageCount() - 1 ) / 2"
    - TextField: "PageCount",
    -- replace the original script: "this.rawValue = xfa.layout.pageCount()" with "this.rawValue = ( xfa.layout.pageCount() - 1 ) / 2"
    Good luck.

  • In Adobe forms - the space between items more

    Hi Experts,
    While displaying the ouput through adobe forms , the space between the items is more.
    Please suggest me how to reduce the blanklines inbetween the items.
    Even I made the subform content as 'FLOWED' and also in context for some fields i added condition if TB_ITEM-TEXT NE space ..
    I tried by Events with scripts as,
    if ( $.rawValue eq null )
    then
    $.presence = "hidden";
    endif
    still space between the items is not reduced. Please help me out from this.
    Thanks in advance.
    Regards,
    Priya.

    Hi Ankit and Rajeev,
    Thanks for your reply.
    As ankit said,
    In print program by using read text function module  am capturing item texts. If item text exists am setting flag .
    with that flag, in adobe form in context am checking condition if flag field not equal to space then it will enter for item text field.
    even after this..item texts not exists but in the output spaces are not truncated.
    Rajeev,
    My requirement is for body page.
    My output is like this :
    In table am dispalying matnr, desciption, unit of measure , quantity , amount ....
    10 8910047 CILPENETR PC 30 20,000
         ab
         abc
    20 22447   VALVE     PC 20 30,000
    in the above format 10 and 20 are line items.
    inbetween this line items ab, abc are the two text fields which displaying material Sales text and Itercompnay text.
    if items texts not exist,
    I want output should get displayed as like this,
    10 8910047 CILPENETR PC 30 20,000
    20 22447   VALVE     PC 20 30,000
    inbetween 10 and 20 spaces should be truncated if those fields value is empty.
    In subform Pallets -> Object -> Subform, alreday its 'Flowed' and Flow direction as 'Western Text'.
    Please help me out.
    Regards,
    Priya.

  • Processing in Adobe forms

    Hello Gurus,
    I am new to adobe forms.
    I need to do some data processing in the adobe form. Based on some condition, I would like to move the value of a the record being looped to a structure being passed to the form and clear the internal table record's field.
    Please guide me where I can write the processing logic.
    Thanks in advance.
    RSS.

    Hello Roy,
    I declared the global paramters and moved the import parameter to the global parameter in the initialization.
    But as you said, how can we call this subroutine in the form. Where exactly we can call this. Am not able to find the the editor to call this subroutine. Please help me out.
    Thanks for all the support you have been giving me.
    RSS.

Maybe you are looking for

  • Error while doing AUC Settlement

    Dear All While doing settlement of Asset using transaction code AIBU, I am getting the following error: Balance in transaction currency Message no. F5702 Diagnosis A balance has occurred in transaction currency 'INR' with the following details: Excha

  • Adding a custom field in standard search criteria in SAP SRM SLM

    Hi Friends, Currently we are using SAP SRM with SLM system . In SLM system we have a functionality to replicate the supplier to other system ( like ECC SUS etc). As per the requirement we have done some enhancement and now we need to enhance the stan

  • Quick Question re: .pat files

    Hello:                                                                                                          windows 7 Home  Ps:Cs6 i am just curious about something. some things have recently changed on my computer of which i have no idea why or

  • Newest upgrade: Why have my websafe fonts disappeared?

    I just upgraded to the Feb. release of Muse and my own websafe fonts have all disappeared. Why? What happened? Sigh... I wish I had known this would happen; I wouldn't have upgraded so quickly.

  • Do I still have to run maintenance & cron scripts?

    Do I still have to run maintenance scripts or does Apple take care of them? If I do is there an inexpensive effective app. to do this automatically for me? Thanks.