Smartforms: Creating main windows in different pages

Hi all!
I am using smart forms, I tried to create 2 main windows in 2 different pages. I keep getting the following error: "Two main windows are not allowed." However, I have already seen an example where there are 2 main windows created in 2 different pages. Does anyone know of you how to solve this?
Thanks for your help.
Message was edited by: Hajar Belahsen

Hi Hajar,
   You cannot have two main windows. But the main window can be associated to as many different pages that you want.
   Check the program where you saw that the code inside the MAIN window is same. They have actually associated the window with the page. This is what termed as page-window.
   Give feedback.
Regards,
Deva.

Similar Messages

  • Main window of different pages in script

    how to put different data in main window of two different pages?
    please reply quickly,its urgent.
    thanks in advance.

    Hi,
    you can try using 'IF' conditions by checking the &PAGE& variable or check if next page is getting triggered using sap counters available in teh table called SAPSCRIPT or call any particular text element from teh print program if there is a page break etc
    Regards,
    Simmi

  • How can I create more than one main window in a page of SAP SCRIPT?

    How can I create more than one main window in a page of SAP SCRIPT? If anybody helps me I will be obliged.
    Regards,
    Subhasish

    Hi Ganguly,
    It is possible to have more than one main window in a same page.
    You create a main window and simply you copy and past it in the same page.. it will create first main window name as MAIN and other main windows as MAIN01,MAIN02.... up to MAIN99.
    Contets flow from MAIN , MAIN01, MAIN02.......................MAIN99. contents after filling the current window it flows to next window(by default, you skip as well with some keyword not sure could be NEW-WINDOW)
    you want print the main window data twice? or you want to create two main window in the same page ?
    1. give two copies in the no of copies in the output type screen ( Which pop up is coming after excute the program ).
    2. create two page with the same script form.
    3. you can write the coding inside the program to print twice the same page.
    Hope this information use full to you..

  • The main window of third page will not display the text element

    Hey, smartform guru,
    I am working on the smartform to print PO data.
    The smartform has first page and next page as usual.
    I created a third page P_TERMS to print the terms and conditions for PO printout.
    I used commend node to assign the page P_TERMS as the "Go to new page" and it did go to the P_TERMS page but the text element will not print in the main window in P_TERMS page.
    The text element will print in the secondary window.Since the terams and conditions are 4 pages long, I expected it to print in the main window, so I do not have to define several extra pages to print them.
    Any idea?
    Thanks in advance!
    Fisher Li

    Hi Fisher,
    Unfortunately, In a smartform, only single main window is continued to all pages even though you can declare windows under each page as main window, but it actually acts as the same window for all pages. It just means that if text from 1st page is overflowed, it will continue to the next page with main window.
    Command line to go to next page will create an extra page but since text is not flowed in main window, it won't print the text element you have included in main window on third page.
    The solution to your problem as I see is that either you include your terms and conditions in the main window of your first page and just before your text element for T&Cs, use Command to go to third page.
    Hope it helps.
    Ravi

  • Need to print horizontal line at the end of main window in each page.

    Hi,
    I am printing a smartform with main window having 10 lines in footer. The problem I am facing is when the content extends upto two or more pages, I am not getting the horizontal line at the base of main window. For last page it is fine as it contains footer.
    Please suggest how to proceed.
    Thanks,
    RKU

    Hi,
    If you don't have any frame set on your main window:
    Go to output options and mark frames, and then go to details and uncheck checkboxes for above, laft and right, leving only below marked.
    This will give you a line in the bottom of you main window.
    If you dont' want to do this on the main window, can you create a new window placed at the bottom of the page and use this framing technic on that window. But in that case don't forget to mark the "always draw box and shading" checkbox. as this window contains no values, the will not get printed unless  you mark this checkbox.
    Regards
    Åsa Thenstedt

  • Hi gurus in scripts i want to display more then one main window on the page

    hi gurus in scripts i want to display more then one main window on the page how it is to follow any body explain to me plz.

    Hi all,
        I am printing check printing from F110 with Z-form and it has been assigne to FBZP also..
        My client need to print the check information twise that means main window data two times.
        like this: 
           First main window.  :      invice#       amt            amt
                                               9002          4000          4000
                                               9005          5000          4000
    Al so they want like to print same in down part of the main window.
           First main window.  :      invice#       amt            amt
                                               9002          4000          4000
                                               9005          5000          4000
    For this i  have created instance main window of main window like MAIN    01,  but it is not displaying the data in instnce window data
    in the instance main window. 
    Question: Could you please let me know abt the same or good solution. How to cal main window instance , i tried with  
    /:   NEW-WINDOW      in instance main window part but it also appering in main windoe also.
    could you please let me know how to call instance main window or any other solution to get teh data like my example above.
    thx

  • How to create a report with different page sizes

    Hi,
    I would like to create a report with different page sizes, it's possible to do it with diadem?
    When I change the layout parameters, changes afect to all sheets...
    Is there a way to change page size individually for each sheet?
    Thanks in advance.
    Marc

    Hi Marc,
    You can use the DocStart and DocEnd commands along with the PicPrint command to spool multiple print commands to the same output PDF file using the direct printer approach.  This should enable you to programmatically specify the page size differently for each sheet that you add to the print job.
    ' Print PDF Page by Page.VBS
    OPTION EXPLICIT
    Dim i, Path, OldPrintName
    Path = AutoActPath & "2D Stacked"
    Call DataDelAll
    Call DataFileLoad(Path & ".TDM")
    PDFFileName = Path & " Page by Page.pdf"
    IF FileExist(PDFFileName) THEN Call FileDelete(PDFFileName)
    OldPrintName = PrintName
    PrintName = "winspool,DIAdem PDF Export,LPT1:" ' Set to PDF printer
    PDFResolution = "72 DPI" ' "2400 DPI" , "default"
    PDFOptimization = TRUE
    PDFFontsEmbedded = FALSE
    PDFJPGCompressed = "high"
    PrintOrient = "landscape" ' orient paper
    Call PrintMaxScale("GRAPH") ' auto-max, see alternative margin setting variables below
    PrintLeftMarg = 0.181
    PrintTopMarg = 0.181
    PrintWidth = 10.67
    'PrintHeigth = 7 (read-only)
    Call WndShow("REPORT")
    Call DocStart ' Begin multi-page document/print job
    FOR i = 1 TO 4
    Call PicLoad(Path & ".TDR")
    Call GraphSheetNGet(1)
    Call GraphSheetRename(GraphSheetName, "Page " & i)
    Call PicUpdate
    Call PicPrint("WinPrint") ' Add a page to be printed
    NEXT ' i
    Call DocEnd ' End multi-page document/print job
    PrintName = OldPrintName
    Call ExtProgram(PDFFileName)
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Creating a .pdf with different page views

    I'm tyring to create a .pdf with different page views.  For example as the viewer goes through the .pdf some pages I would like viewed as "single page view" and others "two page view".  Is this possible?   I'm working with Adobe Acrobate Pro.  Thanks for any suggestions.

    It's possible to use the Page Open actions to trigger a view mode change but it's messy - if the user tries to override them because they prefer to zoom in, etc. then they'll get very annoyed when things keep resetting.
    To create a Page Open action, open the thumbnails panel, right-click on a page, choose Page Properties, then the Actions tab. You can use the Execute a Menu Item tool to fire one of the view modes.

  • How to display standard text element of main window in next page

    hi all
    In scripts we have standard script medruck for purchase order.
    i want to pull text elements ( terms and payment terms ) in to main window of next page.
    i have included main window in page windows of next page ,but im unable to print text elements of terms and payment terms in next page...
    any one give your valuable inputs.
    Thanks
    deepika.

    Hi deepika,
    First copy standard MEDRUCK to ZMEDRUCK and do the necessary changes.
    Then check in driver program when exactly Terma and condition text element is called. Generaly its after printing all items but just check once to confirm.
    If TERMS and condition element is called ate end just put a NEW-PAGE  command at end of the text element which is called before terms.
    Hope this will help You.
    Thanks
    Dhiraj.

  • How to use Different Main Windows in Multiple pages to print internal table

    Hi experts,
    I have a problem regarding how to have multiple different main windows in  smartforms..the problem is that i want to print an internal table in the third page of the smartform and that table can have dynamic values ..sometime it may have more than 400 values also which can not be printed in one or two pages ...
    so to accomplish the same what i did was..
    i tried creating a new main window in the third page but it is throwing an error saying two main windows not allowed and i also tried by copying the first page's main window but it is just repeating the same content what was there in second page..
      i also tried by creating a secondary window in the third page and in that  window i tried giving my internal table and tried by giving the next page to itself but  that also is not allowed and it throws an error saying a page without a main window cannot point to itself as a next page....
    i also tried using a secondary window and in that window i was trying to display the internal table but it is only showing third page content and fourth page itself  was not created....although in my next page field value of the third page , i have given  the third page itself as a next page ....but this also is not working ,.....
    please suggest how to have different main windows(not copy of first main window) in smartforms in order to display the dynamic contents of an internal table

    HI ,
    Just check with your smart styles with assigned  paragraph  allignment   .
    Try to create character style  with your required  font ,size and  Allignment  .
    Hope u this will solve your issue  .
    Let me know if any concerns......
    Regards,
    Lokesh

  • Smartform: windows in different pages having the same name

    Hi all gurus,
    first of all, please forgive me if I'm missing something, I'm quite new on the Smartform argument.
    Shortly; I have to modify some smartforms made by someone else in order to meet customer's desiderata.
    These smartforms are all different but share a common "structure", which is:
    2 pages definition, P_FIRST and P_FOLLOW, which have actually the same internal "structure": they have a LOGO window, then a TITLE window, then a MAIN window, then a FOOTER, and so on.
    In order to do my task, I added a new window in both P_FIRST and P_FOLLOW, let's call it CERTIFICATION_LOGO.
    Moreover, I inserted a new graphic element under the LOGO window.
    Modifying the smartforms, I noticed I have two different kind of behaviour:
    1) in almost all these SF, I add a window called CERTIFICATION_LOGO in P_FIRST, then I have to add a windows to P_FOLLOW which cannot have the same name ( e.g. I called it CERTIFICATION_LOGO_FOLLOW);
    2) in just one SF, when I add a window P_FIRST, then the exactly same window is added to P_FOLLOW. When I modify CERTIFICATION_LOGO window in P_FIRST, also CERTIFICATION_LOGO in P_FOLLOW is updated.
    I can't find a reason why such different behaviour. Actually I'm testing my solution and found that the only smartform that does not work is the only one which I have described with 2). So my guess is that there's some setting anywhere which leads to that different behaviour and this could be a cause of a raised exception... but maybe it's just a case, also because I found in debug that in this standard call in the form PROCESS_TEXT_WINDOW:
    perform xsf_window_open using docentry-tdwindow
                                    docentry-tdwtype.
    where docentry-tdwindow = 'LOGO' and tdwtype = 'T', the system exit the process at the first execution of:
    check xsfop-xsf = c_true.
      check not xsf_obj is initial.
    What does xsfop-xsf should mean? In my case xsfop-xsf = false and xsf_obj is initial... then the SF is not generated.
    What am I missing gurus?
    Thanks in advance,
    Matteo
    Edited by: Matteo Montalto on Aug 26, 2011 4:49 PM

    When you have common windows (LOGO on page first and logo on page next, etc.) you actually have one window definition.  What you put in the window is therefore always displayed for all pages.  In your case, instead of creating your new window and copying it into the follow page, you have two different windows, which now must be separately maintained, as to content, placement, borders, shading, conditions, etc.

  • Prob in Smartform in Main Window -- Footer part

    Hi,
    I have 2 rows with different 2 text in Main window -> Footer part.
    I want to always keep tht 2-text together either in first page or in second page.
    Currently both r printing in different page if first page do nt have enough space.
    But my requirement is both should print on first page or second page.
    Please let me know hw to control this ?

    You can use the FOLDERs for that.
    Create a FOLDER under the Footer.
    Set "Page Protection" checkbox ON on the FOLDER.
    Put your both line types under the FOLDER
    So, your SMARTForms should like this:
    > MAIN WINDOW
      > HEADER
      > MAIN
      > FOOTER
        > FOLDER - (with page protection)
          > LINE 1
          > LINE2
    Regards,
    Naimesh Patel

  • Main window of triggered page ( thr' COMMAND ) is not getting triggered.

    Hi,
    My requirement is as below -
    I have 3 pages in smartform 
    FIRST  page - next page of it is SECOND page
    SECOND  page - next page of it is SECOND page
    and I have last page ( LAST_PAGE ), which is getting triggered for 1 of the condition.
    Here, my main window in LAST_PAGE  is not getting triggered; Can anyonw please advice on it.

    Hi,
         If u have used Main Windows only then u can place the Command Node in First Page Itself after the command node 1to  First ---> Second Page Trigger your Text nodes etc and again The Command Node 2 Second to Third based on condition else the same second page. Mainwindows will be accessed as specified in first page only .
         IF secondary or other windows have been specified
         Place the Command Node in the Second page and also add the Condition to the Command node the condition to get to last page.
    Regards,
    Vijaya Lakshmi.T

  • SAPSCript how to print  a comment at the end of main window on first page?

    In SAP Scripts, How do I print a comment at the end of the first page (I have several pages of data) in the main window?
    - Ven

    hi
    good
    yes we can put condition.....to display the footer window get printed after all data in main window gets over.........................assingn u r footer window to next page [ i.e u r second page] ...and write the condition
    In such senario no need to use a window for footer.
    In the Script form:
    -> In the Main Window itself after all the main data create an Element.
    -> Use BOTTOM and END-BOTTOM; write your footer information between them.
    In your Driver Program:
    -> After printing all the data (means after passing to form and before closing the form) call one WRITE-FORM with the footer element.
    I'm sure it will work.
    f u r not interested to change the print program. Then simply insert simple code in the footer wondow.
    now insert this code in ur footer window
    IF &TTXSY-PAGE& = &SAPSCRIPT-FORMPAGES&.
    *all code in footer goes here.
    ENDIF.
    &TTXSY-PAGE& holds the page number of current page.
    &SAPSCRIPT-FORMPAGES& holds total form pages.
    This will work.
    write this code then the footer will be printed in last page itself
    /: IF &NEXTPAGE& EQ 0
    whatever footer you want.
    /: ENDIF
    You need to create an element in the MAIN window. You can do it in two ways:
    1. In SE71, you can create:
    /:E FOOTER
    /:BOTTOM
    Text
    /:ENDBOTTOM
    In the print program, just call this element.
    2. In you print program, populate parameter type = BOTTOM in FM, WRITE_FORM.
    Ex.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    element = 'FOOTER'
    type = 'MAIN'
    window = 'BOTTOM'
    EXCEPTIONS....
    However, if you issue new page having new header data. Thus, new item data. And if it will exceed more than 1 page, the footer will still appear. To solve this, you need to create a new element in MAIN. Ex. INIT_FOOTER. It just contains the following:
    /:E INIT_FOOTER
    /:BOTTOM
    /:ENDBOTTOM
    Call this after passing all item data.
    reward point if helpful.
    thanks
    mrutyun^

  • How to Print an Icon (ICON_CHECKED) in the Smartform's Main Window's Table

    Hi Smartform Gurus ...
    I'm encountering a problem in Smartform. I'm creating a smartform for QM Module & I have to show the ACCEPTER & REJECTED Lots in that . At the Place of ACCEPTED, I want to show TICK MARK ICON (ICON_CHECKED in the table ICON) & at the place of REJECTED, I want to show CROSS ICON (ICON_INCOMPLETE in the table ICON) ... in SMARTFORM -> MAIN WINDOW -> TABLE ->MAIN AREA.
    My mail id is : [email protected]
    Please help asap.
    Regards,
    Mohit Grover.

    I am not talking about only these two icons, i.e. CHECKED & UNCHECKED. I am asking generally about how to print any icon in smartform's table, as I want to print some more icons & I don't want to upload graphics first, through SE78 & then shows those as graphics instead of ICONS, because by using this practice, it'll not be used as a general purpose form that can be used with any client/customer.
    Please help.
    Regards,
    Mohit Grover.

Maybe you are looking for