Script new-page continuation.

Dear all,
          In my script scenario i need to bring all the customers for a particular company.In my main window i am printing the customer name1,name2,street,city,country all details line by line.
My query here is if in a page1 name1,name2, street comes in a page and remaining city, country carry overs to next page2.
Its should not happen if in case of carry over of address to next page occurs it should come in a new fresh page.
How can i call a new page here in this case.
Hope i am clear wit my query.
Regards,
Rakesh.

Hi,
U can use the IF Condition in which ever window u want based on your data.
Like
/: IF <data> EQ <wa-data>
FIRST PAGE
/: ELSE
OTHER PAGE
/: ENDIF
Thanks,
amit
Edited by: amit kumar on Apr 8, 2009 10:38 AM

Similar Messages

  • Script new page

    Hi i am creating new page in script and giving some text in that page window.
    but that page not all triggering here,
    all ready first and next pages are there in my script .. i created new page,, but not coming...
    could any body explain how to solve my problem..
    thanks,

    Hai,
    First   Call That  text Element  Were U Used New-page Coomand.
    SAPscript automatically inserts a page break when the main window of a page (MAIN) is full. You can use the NEW-PAGE command to force a page break in the text at any point you want one. The text following this command then appears on a new page. The page break is always performed (it is an unconditional page break).
    The NEW-PAGE command completes the current page. This means that all the windows that are still on the page are printed immediately. If you use the NEW-PAGE command without parameters, the page defined in the current form as the next page will be taken next. If, however, your form contains a number of different pages, then you can specify any one of these as the next page to be used.
    Syntax:
    /: NEW-PAGE [page_name]
    /: NEW-PAGE
    The current page will be completed and the text in the following lines will be written to the page specified in the form.
    /: NEW-PAGE S1
    As above, except that the page S1 will be taken as the next page.
    If, in a NEW-PAGE command, you specify a page not contained in the form, the specification is ignored.
    Take care that there are no blank lines immediately before a NEW-PAGE command. If an implicit page break occurs within the blank lines, an unexpected blank page may be printed.
    Regards.
    Eshwar.

  • New Page (continued)

    Dear all,
    Maybe we got miss understanding here.
    What i want to make is :
    my table like this:
    Field1
    aaaaaa
    bbbbbb
    cccccc
    ~
    dddddd
    eeeeee
    ffffff
    gggggg
    ~
    hhhhhh
    jjjjjj
    kkkkkk
    i want to display in my report
    aaaaaa
    bbbbbb
    cccccc
    then change to new page
    dddddd
    eeeeee
    ffffff
    gggggg
    the '`' character is my new page mark.
    I hope this clear.
    Best regards
    Jansen Hutagalung

    Hi Jansen,
    The instructions provided by Philipp here can be followed:
    New Page
    Let me try to give you stepwise instructions for the same procedure that Philipp suggested:
    1. Go to the Paper Layout of your report, and inside the repeating frame of the group where you want a pagebreak, define any object like a white line (which anyway shouldn't show up in your report, so it is harmless).
    2. In the Property Inspector of this line object, set "Page Break Before" to yes.
    3. Still in the Property Inspector of this object, go the "Format Trigger", and you could type your code like:
    begin
    if :<your_column_name> = '~' then
         return (TRUE);
    else
         return (FALSE);
    end if;
    4. Compile
    Now run the paper layout. This should break the page just before every occurrence of '~'
    Similarly, if you do not want the '~' value to be printed, you can go to the Format Trigger of that field, and use similar code as above to return FALSE whenever the field value = '~'
    Navneet.

  • 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

  • Script to add a new page in LiveCycle

    I am new to LiveCycle so please forgive my ignorance. I have 2 things I am trying to do.
    1. In my fillable form, I want to have default text in the the form field that appears in light gray and disappears automatically when a user clicks in the field to enter text. I know how to add a default but then my user would have to erase the default to add their own information. I don't know if this is an easy thing or if it needs scripting.
    2. I created a button and I want to add JavaScript to it to have it copy the second page of my form and add it as a third page to be filled out too. I don't want to send a form with a bunch of extra pages so I want my users to create new pages as necessary. I know how to view the script editor and I added some script, but it doesn't appear to be correct as I don't get the green or red icons to attach the script to the button and when previewed, the button does nothing. I chose on Click and I understand that the script creates a path to my object with a period in between each object, but I don't understand after the instanceManager.addInstance(true) what I should put. What does the "true" part mean. I thought that I would put the name of the object that I wanted added. Am I close to doing this right or is it much more complicated? Does my button have to be in a subform with the objects or something to work? Am I trying to do something that is possible?
    I wish I could printscreen to this forum.

    For each of the fields that you like to have default value displayed and get cleaned on entry you can have following JS script in "enter" event....
    if (this.rawValue == "<default value for that particular field>") {
         this.rawValue = ""
    and for "exit" event....
    if (this.isNull) {
         this.rawValue = "<default value for that particular field>"
    Hope tha helps with the first issue....
    And with the second question you had....yes it is some thing that can be done with few tricks and little script.
    Your button does not need to be part of that subform...and noting wrong even if it is.
    instanceManager.addInstance(true)     //true is part of syntax however following example can give you better idea
    _secondPageSubForm.addInstance(true) is what you would use in "click" event of the button where "secondPageSubForm" is your subform name to repeat and designed to fit entire page so you can continue adding entire page rather than part of page. And "_" (Underscore) is part of the syntax to recognize the repeating subform.
    And to whole thing work as expected you need to save/render PDF as Dynamic template and set your "secondPageSubForm" as repeating in "Binding" tab.
    Hope that helps, Good Luck,

  • Problem in sap-script, page count when trigger new page.

    Hi to all,
    Please help on my sap-script problem. When I trigger new-page the page count should continue.
    Ex: I have total of 2 pages, the second page is trigger in new-page. the page count of 2nd page should show as Page 2 of 2. but it shows on me is still Page 1 of 2.
    my command of new-page is in the zprogram. using function command_control
    thanks to all,
    I will reward points.
    Booh.

    Hi ,
    use &PAGE& of &SAPSCRIPT-formpages&
    IF Found Helpfull.
    Do Reward.
    Regards.
    Eshwar

  • New page creation in sap scripts

    Hai
    some one can give me the path for creation of  new page in sap script(forms).
    pl giove me the complete path
    thank u in advance

    hi
    Goto SAPSCRIPT transaction code se71.
    open your sap script.
    goto pages button
    right click
    create element
    a new page element gets created
    fill in required details of this new page like page name next page
    next page is the page that comes after the current page
    if you have no next page - give the current page name in next page.
    you can further create windows in this page and continue
    Regards,
    Richa

  • Is there a way to have a text box continue onto a new page

    I can no longer link text boxes from one page to the next. So, I want to create a text box and just have it continue onto a new page, and then another page, etc., etc. because there are things we want to do with that text....that's why it's in a text box. Any suggestions.

    Just 1 of a hundred features removed from Pages 5.2.
    Pages '09 should still be in your Applications/iWork folder. Use it.
    Peter

  • How to create new page in SAP Script?

    Moved to correct forum by moderator.  Duplicate deleted.  Do NOT post the same question in two forums.
    Hello friends,
    I am modifying one SAP script.
    It is already contains 2 pages. FIRST and NEXT.
    All I have to do is to create one more page which should be display as last page.
    And this last page should display some data.
    I tried and created a new page in SE71 but when i execute the program, it doesn't show newly created (LAST) page.
    Please guide me.
    REgards,
    RH
    Edited by: Matt on Nov 7, 2008 4:26 PM

    Hi
    U need to force the call of this new page.
    I suppose your sapscript is arrange with 2 page: FIRST and NEXT, where FIRST has NEXT as next page.
    So the system automatically print the pages FIRST and NEXT: u need to insert the statament:
    /: NEW-PAGE LAST
    in the MAIN window.
    U can create a text element NEW_PAGE and you'll call it as soon as you've finished to print the main data:
    /E NEW_PAGE
    /: NEW-PAGE LAST
    U can use the fm CONTROL_FORM
    Max

  • Issue in New Page Display in a SAP Script

    Hi All
             I have applied a line count logic in my SAP script, such that if lines are more than 32, Sub Total is displayed on this page(Sub Total needs 4 lines to display) and from next page,another heading starts. (Total around 39 lines can be displayed  in one page)
    Sub Total Text contains 2 lines of text, and 2 blank lines after it (Total 4 lines)
    Now, if number of lines is around 36, Sub Total, doesnt fully display in this page and the 2 blank lines gets passed to the next page. And I am also firing a new page from my code. As a result, the 2nd page comes fully blank and the data is now being displayed at the 3rd page. How can I prevent the 2nd page from coming blank ??
    I am using Function Module 'CONTROL_FORM' (or WRITE_FORM) to fire a new page.
    I do not want to apply a line count logic for this as this wont be fool proof !!
    I hope I have made the issue clear. Kindly help !!
    Thanks
    KP

    Hi,
    otherwise u can do one thing: U call the PERFORM in the SCRIPT FORM passing the &PAGE&(Contains the current Page No) value to it. take a loal variable and pass the PAGE value to the local variable and check for every line whether both &PAGE& & local varaiable are same, if not then set the FLAG value to 'X' (it means the new page has triggered).
    Eg:
    In Script:
    /:  lv_tabix = lv_tabix + 1.
    /: PERFORM new_page_flag IN PROGRAM ZXXXXX
    /: USING &PAGE&
    /: USING &lv_tabix&
    /: CHANGING &FLAG&
    In ZXXXXX Program:
    FORM new_page_flag USING int_tab STRUCTURE itcsy
                                CHANING out_tab STRUCTURE itcsy.
    data : lv_page TYPE i,
             lv1_tabix TYPE i.
    READ TABLE int_tab WITH KEY name = 'LV_TABIX'.
    IF sy-subrc EQ '0'.
      lv1_tabix = int_tab-value.
      clear : int_tab.
    ENDIF.      
    IF lv1_tabix EQ '1'.
      lv_page = '1'.
    ENDIF.
    READ TABLE int_tab WITH KEY name = 'PAGE'.
    IF lv1_tabix GT '1'.
      IF lv_page NE  int_tab-value.
        READ TABLE out_tab WITH KEY name = 'FLAG'.
        IF sy-subrc EQ 0.
           out_tab-value = 'X'.
           MODIFY out_tab.
           clear : out_tab.
        ENDIF.
      ENDIF.
    ENDIF.
    IF sy-subrc EQ '0'.
      lv_page = int_tab-value.
    ENDIF.                          
    Hope it helps!!
    Rgds,
    Pavan

  • SAP Script info req to print new line iten on new page

    hi
    i had an req to print the list of MATNR & KUNNR on script,but the req is like this,at NEW MATNR,the script shd start with new page,say,if there are 5 MATNR,2 are same & 3 are same with diff KUNNR.
    On first page:2 MATNR shd be printed
    On Second Page:3 MATNR shd be printed & so on each time on new page...
    Please tell me how to do it,in window MAIN,how shd i wirte code for this?
    regds

    hey,
    Check this,
    First in your print program call FM 'START_FORM'.
    Then call FM 'WRITE_FORM'
    After this call FM 'CONTROL_FORM' :
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
    command = 'NEW-PAGE'
    EXCEPTIONS
    UNOPENED = 1
    UNSTARTED = 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.
    At last call FM 'CLOSE_FORM'.
    By using FM control_form and passing parameter 'NEW-PAGE' you will get one new page even thow if content of ur main window of previous page is not exceeding..
    hey call new-page for every new matnr
    Regards,
    Midhun Abraham
    Edited by: Midhun Abraham on Oct 11, 2008 8:47 AM

  • Need to add a new page in the SAP Script as last page

    Hello,
    I need to add a new page in the SAP Script as last page.
    Currently I have three pages in the form(FIRST,NEXT,LAST). For this I created one more page END.
    FIRST page next page is NEXT
    NEXT page next page is NEXT
    LAST page next page is LAST
    END page next page is END.
    I used NEW-PAGE END in the main window but it is not working and also I trired with CONTROL_FORM this also not working.
    Thanks,
    Ravi.

    Hello,
    I need to add a new page in the SAP Script as last page.
    Currently I have three pages in the form(FIRST,NEXT,LAST). For this I created one more page END.
    FIRST page next page is NEXT
    NEXT page next page is NEXT
    LAST page next page is LAST
    END page next page is END.
    Create the text element in the main wondow of your form
    /E           ENDPAGE
    /:           NEW-PAGE END
    and call the element from your print program by using write_form, where you want the END page in your print.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element = 'ENDPAGE'
        EXCEPTIONS
          element = 1
          window  = 2.
    Thanks,
    Ravi.

  • How do I make content in a text field continue onto a new page?

    I am creating a form and one of the pages contains a text field for an essay. I'd like the responses in this text field to carry onto new pages if they reach the end of the first page. How do I make new pages appear with only the continued text field? Thanks!

    All right...
    public class guiClient extends JFrame implements ActionListener {
    static String userString;
    static String currentFont;
    String fontchoice;
    String fontlist;
    static JTextField userName = new JTextField();
    public guiClient() {
         super("My Client");
    public guiClient() {
         super("My Client");
    // Create a ComboBox
    GraphicsEnvironment gEnv = GraphicsEnvironment.getLocalGraphicsEnvironment();
    String envfonts[] = gEnv.getAvailableFontFamilyNames();
    Vector vector = new Vector();
    for ( int i = 1; i < envfonts.length; i++ ) {
    vector.addElement(envfonts);
    JComboBox fontlist = new JComboBox (envfonts);
         fontlist.setSelectedIndex(0);
         fontlist.setEditable(true);
         fontlist.addActionListener(this);
         fontchoice = envfonts[0];     
    //Create a regular text field.
         JTextField textField = new JTextField(10);
         textField.setActionCommand(textFieldString);
         textField.addActionListener(this);
    public void actionPerformed(ActionEvent e) {
    //if the action is from the textfield (e.g. user hits enter)
         if (e.getActionCommand().equals(textFieldString)) {
              JTextField fromUser = (JTextField)e.getSource();
         if (fromUser != null){
    //place user text in editor pane
    //send message to server
                   if (userName.getText() != null) {
                        userString = userName.getText().trim();
                   out.println(userString + ": " + fromUser.getText());
              fromUser.setText("");
         else if (e.getActionCommand().equals(fontlist)){
         JComboBox cb = (JComboBox)e.getSource();
    String newSelection = (String)cb.getSelectedItem();
    currentFont = newSelection;
         userString = currentFont;
    return;

  • Quick SAP Script question New Page Print

    Quick SAP Script question
    I have added a new page to an existing SAP Script BUT only want it to print if a condition is true.
    I need to do this from within the form as the print program is SAP Std.
    Any idea how I can prevent the new page from printing?
    i.e. I need the form NOT to call the new page if the condition is false. Is there a way of forcing an exit or stop from with in the form?

    Hi,
    To trigger a new page, there is script ediotr command NEW-PAGE.
    so find where is that command is triggered and use the below code for trigger it on any specific condition....
    if &condition& = 'True'
    /*  NEW-PAGE
    elseif
    /: NEW-PAGE   
    endif
    so it means if condition is satisfied your new page will not work.. else it will...
    Hope you got it...
    Try this..
    Best luck..
    Regs,
    Lokesh.

  • PDF Merge - merged report ages are not continuous but starting in new page.

    Hi,
    we tried using - FOUtility.mergeFOs(java.io.Reader[] foReaders, java.util.Properties prop) to merge and create a single PDF file but its not working as expected.
    Issue:
    The space of output pdf page 1 is discarded and the second merged file always starting in new page.
    Input:
    Report1 having 1 page
    Report2 having 2 pages - (another description )
    Expected Output PDF:
    Page 1 ( report1) , Page 1( report 2's page1 and continues ) to page 2(report 2)
    Actual Output PDF :
    Page 1 ( report 1), Page 2( report 2's page1), Page 3 ( report 2's page 2)
    Issue:
    The space of output pdf page 1 is discarded and the second merged file always starting in new page.
    Anyone faced this issue before, if yes, how did you solve it ?
    Thanks,
    Ayaps

    The output is a chm file. I am compiling as MS HTML Help
    under RoboHelp x5.
    After doing a little more trail work, I have noticed some
    other "strange" happenings. I can get the porjects to merge, but
    from the TOC all of the articles open in a new window. From the
    index, however, they all open as they should--in the topic frame
    from the main window. Not sure why that is.
    For a brief synopsis, here is what I have at this point:
    A "master" project file that includes:
    One new project for a section that is
    complete.
    One project from the existing documentation.
    I am not sure if I need to have the window definitions for
    each project would impact this or not.
    Through trial and error, I have narrowed down the problem to
    the original documentation project. If I remove it from the TOC and
    generate the project, the new topics display as they should.
    I will keep testing and see what I came come up with. If you
    have any idea as to what I might change in the original
    documentation to get it to work just let me know.
    Thanks for all your help!
    Aaron

Maybe you are looking for

  • Duplicates in iphone contacts won't delete

    I have duplicates and triplicates of contacts in my iPhone. My iMac only shows one of each. I tried to delete them in the iPhone, but they don't go away

  • How to update PO invoice plan?

    Dear all, I need to update Start-date and End-date of PO's invoice plan, the two dates storage in a Z-table. Anyone who can tell me which function module I should use or how I can achieve this functionality. Thanks very much! Best Regards.

  • Would the MacBook Pro Retina 13" with 4GB of RAM be sufficient for me?

    Hello,  I was looking to purchase my first laptop and first Mac computer. I'm very short on cash, and I'm looking to grab one as soon as possible. I know it is often reccommended to purchase the MacBook Pro with 8GB of RAM (if you're going for the 13

  • Write access blocked on additional drives

    I recently had an issue with my Mac Pro with Leopard where it was stuck in boot loop. I followed the fix of using the disk utility off the Leopard disk to repair permissions and everything seemed to be fixed. Then, for no reason I can think of, after

  • Elements 10 closes down when Panoramic merge is selected

    Hi wonder if anyone can help, I am using Elements 10 with Windows 8.  When I select panoramic merge, the software closes down  and I get an error message saying that its encountered a problem and closing dow.  Can anyone help me resolve this please.