Page break in script

Moved to correct forum by moderator
Hi all,
We have a problem in script where we need to increase he main window size where it is being populated with items, when we increase the main window the footer is getting over written in main window,we need to keep the fooetr only in the last page
any inputs will be helpful.
Edited by: Matt on Nov 19, 2008 10:47 AM

Create two pages in script.
In page1 : create the main winodw and display the data as per your requirement.
In page2:create the var window assign as footer window and dispaly the text as per your requirement.
Page1 -
>page1(next page)
page 2------>blank(next page).
and in Main Window after all the fields description in next line
give NEW-PAGE page2 command.
Ex:-
In Main Window
P1 &ABCD-ABCD&,,&ABCD-ABCD&
/: NEW-PAGE page2
In driver program.
AT LAST.
      CALL FUNCTION 'CONTROL_FORM'
        EXPORTING
          command   = 'NEW-PAGE PAGE2'
        EXCEPTIONS
          unopened  = 1
          unstarted = 2.
    ENDAT.

Similar Messages

  • Generating Page break in SCRIPTS

    Hi experts..
    I am working on SCRIPTS.
    I have one internal tabl.
    I want to generate PAGE-BREAK depending upon 3 fields.
    How to generate page break.
    assume those fields as Field1, Field2, field3.
    thanks

    Hi,
       write below code in the driver program.
    sort itab by field1 field2 field3.
    LOOP AT ITAB.
      AT NEW  field3.
                CALL FUNCTION 'CONTROL_FORM'
                  EXPORTING
                    COMMAND   = 'NEW-PAGE LIST'  " LIST would be the new page
                  EXCEPTIONS
                    UNOPENED  = 1
                    UNSTARTED = 2
                    OTHERS    = 3.
      ENDAT.
    ENDLOOP.
    Thanks,
    Suma.

  • How to put Page break in SAP Script

    Hi Experts,
    Please tell me how to put page break in SAP Script. or give some sample code
    looking forward for your reply..
    Regards,
    Kali Pramod

    Hi,
      NEW-PAGE is used to insert a page break ,
      it can be conditional if used between IF..ENDIF
      e.g. /:IF &KNA1-NAME1& = 'XYZname'
            /:NEW-PAGE
           /:ENDIF
      If u want to Page break after displaying certain records or after some condition you use NEW-PAGE
    reward if useful.

  • How to find out the page break in the scripts?

    Hi Friends, this is very urgent, plz help me,
    I want to initialize one field(&script-counter&) at each page break. so how can I find out when the page break has occured?
    regards,
    Venkat.

    Hi Naresh,
    here it is automatically continuing with new page(once the first page is completed). but I just want to know when that new page had triggered.
    regards

  • QUERY: AppleScript script editor "page break" in Appleworks

    What is the keyword or code sequence required to set text delimiter in AppleScript 1.10.7 to "page break" for the purpose of removing ALL of them at one time in an Appleworks 6.2.9 document using a script?; something like:
    tell application "AppleWorks 6"
    activate
    set the_text to the text body of front document
    set user_tid to AppleScript's text item delimiters
    set user_tid to AppleScript's text item delimiters
    set AppleScript's text item delimiters to (**page break**)
    set temp_list to text items of the_text
    set AppleScript's text item delimiters to ("[PB removed]")
    set temp_string to temp_list as string
    set AppleScript's text item delimiters to user_tid
    set the text body of front document to temp_string
    end tell
    THIS IS SPECIFIC TO APPLEWORKS ONLY, please, since it appears to me that what keywords or code sequences are "recognized" via AppleScript is NOT "standardized" across all MacOSX programs, I do NOT acknowledge that I should be asking this in the Applescript forum.

    Hello Yvan,
    Well, what I was concerned is AppleScript 2.0 (OS X 10.5) might not provide conventional utxt-to-TEXT (Unicode text to plain text) coercion in passing text to AppleWorks 6 and so AW6 receives UTF-16 data and yet interprets them in system's primary script (e.g. MacRoman), which should yield wrong result... (Perhaps "A" wrongly becomes 0x0041 instead of 0x41, "•" becomes 0x2022 (which is interpreted as SPACE and QUOTATION MARK in MacRoman) instead of 0xA5, etc)
    As for replacing text in AW6 document using AppleScript and ignoring case, a complete test code would be like the following one. The point is to get text from text body of AW doc, coerce it to Unicode text, perform text items' dance on Unicode text, put resulting Unicode text back to text body of AW doc.
    If it returns {true, 49, 49, 49} under both OS X 10.4 and 10.5, it would be OK.
    All the best,
    H
    --TEST CODE
    --(0) prepare a sample document
    set t to "The lark's on the wing; The snail's on the thorn."
    tell application "AppleWorks 6"
    activate
    make new document at front with properties {document kind:text document}
    tell document 1
    set text body to t
    end tell
    end tell
    --(1) get text from front document
    tell application "AppleWorks 6"
    tell document 1
    set t1 to text body
    end tell
    end tell
    --(2) replace "T" by "•" ignoring case
    set u1 to t1 as Unicode text
    try
    set AppleScript's text item delimiters to {"T"}
    set uu to u1's text items
    set AppleScript's text item delimiters to {"•"}
    set u2 to uu as Unicode text
    set AppleScript's text item delimiters to {""}
    on error errs number errn
    set AppleScript's text item delimiters to {""}
    error errs number errn
    end try
    u1 = "The lark's on the wing; The snail's on the thorn."
    u2 = "•he lark's on •he wing; •he snail's on •he •horn."
    --(3) put text to front document
    tell application "AppleWorks 6"
    tell document 1
    set text body to u2
    end tell
    end tell
    --(4) check the validity of text of front document
    tell application "AppleWorks 6"
    tell document 1
    set t2 to text body
    end tell
    end tell
    return {t2 as Unicode text = u2, count t, count t1, count t2} -- should be {true, 49, 49, 49}
    --END OF TEST CODE

  • Adobe Form : detect page break using java script

    Hi,
    How can we detect a page break at a runtime using java script? I need to display a data in internal table at header and unique for a document number. i've 10 order list which has multiple items, each of the orders are printed in a new page and i wanted to know this event using a java script which could help me to add some additional logic at header.....pls can someone help on this?

    Hello Prabhu,
         From your doubt, what I understand is that, You have designed a header in Master Page. You need to fill this header using the Item table which is already designed in the design view(body page). Means you want to fill the Item details(which are in body page) into the header(which is in the master page).
    To read the contents from body page into master page, you need to write Javascript code on the header fields(which is in the master page) in the Layout Ready Event.
    For example, if you want to fill the field Order_description in header(master page) from the column Order_Description which is in the Item table(body page)
    In the form layout, select the order_description field and in the event READY LAYOUT write the below JavaScript code.
    var currpage = xfa.layout.page(this);------> Get the current page
    var fields = 0;------> Variable to store the number of fields in that page.
    fields = xfa.layout.pageContent(currpage-1, "field", 0); ------> Get the number of fields
    for ( i=0; i<= fields.length-1; i++ ) ------> Loop on each field on the page
        if ( fields.name == "ORDER_DESCRIPTION" ) ------> Check if the corresponding field is in the Item table
             this.rawValue = fields.item(i).rawValue; ------> Assign that value in the Header field
    Repeat the same steps for other fields in the Header. This will work for all Purchase Orders spanned across multiple pages.

  • How to give Page break in XML

    Can we give an page break instructions through XML file.
    I have an xml file which i am importing and generating pdf.Is there any tag or paragrapg style that can be applied to xml element to indicate page break.

    Hi Nishatry,
    You cannot add the Page break as a symbol in XML. Instead you can add element or attribute as "PageBreak".
    In InDesign scripting you can find the "PageBreak" elements and insert the pagebreaks by using the following code.
    var myDoc = app.activeDocument;
    PageBreaking(myDoc);
    alert("Page Break Inserted");
    function PageBreaking(elm){
        for (var i = 0; i < elm.xmlElements.length; i++){
            try{
                XMLelementName=elm.xmlElements[i].markupTag.name.toString();
                elm.xmlElements[i].select();
                if(XMLelementName=="PageBreak"){
                    elm.xmlElements[i].contents = SpecialCharacters.frameBreak;
            }catch(e){}
            PageBreaking(elm.xmlElements[i]);
    I think this is usefull for your requirement.
    Regards,
    Ramkumar .P

  • Creation of New Page in SAP Script

    Hi Experts,
    Please advice when will a new page trigger in SAP Script :
    As per my requirement I need to create a new page for an existing layout and make changes to the second page alone...
    but this page should be triggered only for a specific condition. Is it possible to trigger second page when it satisfies certain conditon?
    I have searched SDN regarding the same but most of them have recommended to use NEW-PAGE...but as per my understanding NEW-PAGE is used when certain data needs to be printed on the next page ( not on the new page ).
    Thanks
    Karthik.R

    Ok friend,
    Try using the conditions in your driver program using 'CONTROL_FORM' function module. or using some other condition in it.
    You can also give conditions in text editors and you can trigger the pages.
    i think these links will help you in solving your solution just check these Link: [new page based on condition in sap script|new page based on condition in sap script; this is just an hint from this you can develop the idea.
    Link: [Breaks in Smartforms|LAST PAGE FOR SAP SCRIPT;.
    Also there are other few related links in SDN which will help you.
    I think this must solve your issue if you still face any queries please revert back to me i will help you.
    Thanks,
    Sri Hari

  • XHTML code for a page break in PDF file exported from WAD

    Hi All
    I'm new to WAD and I have created a web template with several tables and charts
    I'm exporting these to a PDF document but I need to put page breaks in as I want to put a table and a chart on each page
    I'm not sure how to do this and was wondering if adding it to the XHTML code direct would do the trick but as I don't know XHTML code I'm not sure.
    Any help would be appreciated
    thanks in advance
    Sandra

    Hi Cook,
    In my project I had same requirment. But I didn't find any solution for this.
    I tried to implement the same using XHTML and java script aslo. but these are the functionality which we are using for web page formating not the not the formating of external output like PDF and Excel.
    So if you find any solution, then please share with me also.
    Thank You

  • How to remove page breaks in converted document

    This is probably more a Microsoft Word problem, but it started out as an InDesign document, so I thought it wouldn't hurt to post the question here in case someone else has encountered a similar problem.
    I formatted an epub on Amazon for my job. Since I am more familiar with InDesign, I used it along with Amazon's script to turn it into an epub.
    Since then, I've noticed the cover has inexplicably rotated 90 degrees on Amazon. I asked about it in Amazon's forums, and they said InDesign isn't really reliable for epubs.
    So I'm trying to recreate everything in Word. The original Word document isn't up to date with all the editing and corrections I did, so I exported each InDesign chapter document into a PDF, then used Adobe Acrobat to save each PDF as a Word document.
    Some of the resulting Word documents seem to be littered with multiple page breaks and/or section breaks. I'm able to delete most of them, but some of them fall right in the middle of a sentence and won't delete. I've selected the paragraph icon in the ribbon to turn on invisible characters, and I can't see a page or section break indicated in most of these breaks.
    Anyone know what might be causing these and how to delete them?
    Maybe I should just copy everything from my InDesign documents and paste them into Word instead?

    Hello,
    If your reports is executed in the MODE CHARACTER , the "Page Break" generaed in the output is the one defined in the prt file
    Code Name : after page
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/files/printing/printer_def_file_syntax.htm
    regards

  • Conditional Page breaks In Adobe forms

    hi experts...
    I have to do conditional page break for item table for each VBELN. if  vbeln has more than 5 line items ...Have to do page break and
    remaining items have to display on next page..
    thanks in advance
    bala...

    try using the below java script:
    if (this.index != 0) { this.index%16 == 0 }
      let me know if it works.

  • 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

  • Dynamic tables and conditional page break

    I have inserted a table in my form and have included an Add New Row button to insert additonal rows.   I want a maximum of 16 rows added with a subtotal field.  I want the table, then to automatically go to a new page with a subtotal field.  At the end of all pages I want to include a total field.   The table goes to the next page after a number of rows are entered, but there is not a break;  the original form continues.  How do conditionally break the page and have a (new) table display in the second page?
    Thanks for your help.

    Hi Paul,
    Thanks for working with me on this.   I have sent a copy to the gmail.com address.  I'm new to LiveCycle, so please forgive me.
    Date: Thu, 29 Jul 2010 09:18:53 -0600
    From: [email protected]
    To: [email protected]
    Subject: dynamic tables and conditional page break
    You can accomplish that with a single table and some creative script. I suggest that you get the table worked out and working correctly then we can add in the page totals and final total afterwards. Once the table is ready email the form to mailto:[email protected] and I will put together a sample for you that shows what to do. Please include a description of what you want to do with the email as the mail message and this forum are not tied together. Also if you have a data file  that fills out the table that would be useful as well.
    Paul
    >

  • Conditional Page break in Adobe forms.

    Hi all,
              In Adobe forms i am displaying the purchase order details.i want to create a conditional page break..
       i am displaying purchase order header details below that i am displaying the item details of the purchase order.
       i one page. i want to display only 4 purchase order header and 3 items for each purchase order. in total i want to display 0nly 16 lines in a page. my Hierarchy look like this...
    data
    ....Masterpage
    ---......page1
    .....static image
    ....bogypage(subform)
    ---......headertable(subform)                              
    ..............headerdata(subform)
    ........................ebeln
    ........................burks
    ........................table(table)
    ...........................group(group)
    ...............................row1(row)
    ..................................ebelp
    .................................matnr
    with regards,
        sivaprasath.s  SAP Consultant...

    try using the below java script:
    if (this.index != 0) { this.index%16 == 0 }
      let me know if it works.

  • Detecting Page Break before/after text

    Is there a way to detect if there is a page break before or after a block of text through scripting?

    yourSelection.characters.item(-1).contents
    This will return a regular single character "\r" for a hard return at the end, but any of ID's breaks will be indicated by one of the values:
    SpecialCharacters.COLUMN_BREAK
    SpecialCharacters.EVEN_PAGE_BREAK
    SpecialCharacters.FRAME_BREAK
    SpecialCharacters.ODD_PAGE_BREAK
    SpecialCharacters.PAGE_BREAK
    (as you can see there is more than one 'break' character).
    To check a page break before the current paragraph, you will have get a pointer the paragraph before the current one and do this same check on that.
    Check also the constant
    yourSelection.startParagraph
    which can be
    StartParagraph.NEXT_COLUMN
    StartParagraph.NEXT_EVEN_PAGE
    StartParagraph.NEXT_FRAME
    StartParagraph.NEXT_ODD_PAGE
    StartParagraph.NEXT_PAGE
    indicating the Keep Options applied to the current paragraph. These also make paragraphs start at a new page.
    Finally, there is the possibility that none of the above applies, but the previous paragraph ended right at the bottom of a text frame, and the current paragraph starts at the top of a new frame. No special character or code, but still a page break. (Perhaps you could test paragraph.lines for that.)

Maybe you are looking for