Main Window in SAP Script

Hi Guys,
I wanted to know as to why is it possible to create multiple main window in SAP Script.
      In most theory it is written a SAP Script can only use 1 main window, If thats the case why is it still possible to create more than 1 of them.
      Can you explain its use and functionality.
Helpful answers will be duly rewarded.

Hi,
U can have multiple main windows in Sapscripts(Upto 99)
Main Windows (MAIN)
Each form must have one window of type MAIN. Such a window is called the main window of the form. For SAPscript forms, the main window has a central meaning:-
? It controls the page break.
? It contains the text body that may cover several pages.
? It allows to fix text elements at the upper and lower margins of the allocated page window (for example, for column headings).
As soon as a window of type MAIN is full, SAPscript automatically triggers a page break and continues to output the remaining text in the main window of the subsequent page. Page windows of type MAIN have the same width throughout the form. The SAPscript composer thus avoids reformatting of the text after each page break.
If a page does not have a main window, the system implicitly processes all other windows of the page and continues with the subsequent page. This page must not call itself as subsequent page (recursive call), since this would produce an endless loop. In such a case, SAPscript terminates the output after three subsequent pages.
For printing header lines or totals, the different output areas of the main window are of special importance.
The diffetent Output areas of main window are
                                                                  TOP
                                                                  BODY
                                                                  BOTTOM
its use and functionality.*
Suppose you have requirement that you r displaying data from two line item tables which can flow multiple pages.
In this case u have to use multiple mail windows.
Regards
Sandipan

Similar Messages

  • Regarding Number of MAIN Windows in SAP Script.

    Hi,
    SAP Script allows to place a maximum of 99 MAIN Windows. Is it possible to have different content in different MAIN Windows i.e., if i have 2 MAIN Windows in SAP Script with numbers 00 and 01 can i have different contents in these two windows. If possible please give us an example for the same.
    Thanks in advance for your esteemed help.
    Regards,
    Raghavendra Goutham.

    HI All,
    Thanks for your esteemed replies.
    But i want to frame my question exactly.
    In my script there are two main windows with number
    MAIN 00 and MAIN 01.
    MAIN 00
    Content:
    /E  data
      abc,,def
    In MAIN 01 i want to have only XYZ, some thing like this
    MAIN 01
    /E total
    XYZ
    My problem is: whenever i am changing the content in MAIN 01, the content in MAIN 00 is also getting changed.
    I do not want this to change, i want different content in both of them. Is this possibel if so how.
    Thanks and Regards,
    Raghavendra Goutham.
    MAIN 01

  • How to print a window (ex:total)only after end of main window in SAP Script

    How to print a window(ex: total) only after end of main window in SAP Script
    Thank you.

    Create a total window and place it after your main window, get the number of lines in your main window and place counter
    Ex,&SAPSCRIPT-COUNTER_1(+)&,
    IF SAPSCRIPT-COUNTER_1& EQ <number of lines in main window>
    **print total
    ENDIF.
    Regards,
    Sairam

  • Printing of boxes in Main window of SAP Script at 2 different locations

    Hi Experts,
      I have an requriement in SAP script, I want to draw two boxes. The first box will be at the beginging of main window with 0.5 cm, which is comming perfectly. After the first box I have to display the entries related to a particular table, after the completion of that table I need to draw another box of lenght 0.5cm and the entries related to another table, needs to be displayed.
    I am able to get the first box with intensity, but for the second box I am not getting exact position where i need to draw a dynamic box by filling intensity.
    For that reason i have drawn two ulines and wrote the text, is there any way to fill internsity in between those lines.
    Thanks
    Ravi.

    Hi Sujeet,
    I already tried with that command, the problem is in between two boxes I dont know how many lines of data will come.
    There is a need of drawing a box dynamically.
    Thanks
    Ravi

  • How to print line item 2times in two different main window in Sap Script

    Hi,
    I am designing check printing form using Sap script. I need to print line items 2times in different 2main window.can yu pls explain  how print like this.
    JK

    i cud not get ur query..pls elaborate

  • Can't see the Vertical line command in the main window of SAP Script.

    Hi,
    I have a peculiar situation where, I am not able to see the command through which vertical line separators are coded in the script within the main window. Can any one help me find this...?
    Regards,
    Owais...

    Hi Ravi Kant,
           What does this mean?
    /E           ITEM_YWERT
    WH           &rwerter-wert(10)&,,&vline&
    /E           ITEM_TAB
    /:           CASE &VARPOSR-YZEILE&
    /:           WHEN '0001'
    /:           DEFINE &TAB& = ',,'
    /:           WHEN '0002'
    /:           DEFINE &TAB& = ',,,,'
    /:           WHEN '0003'
    /:           DEFINE &TAB& = ',,,,,,'
    /:           WHEN '0004'
    /:           DEFINE &TAB& = ',,,,,,,,'
    /:           WHEN '0005'
    /:           DEFINE &TAB& = ',,,,,,,,,,'
    /:           WHEN '0006'
    /:           DEFINE &TAB& = ',,,,,,,,,,,,'
    /:           WHEN '0007'
    /:           DEFINE &TAB& = ',,,,,,,,,,,,,,'
    /:           WHEN OTHERS.
    *           Tab. not defined
    /:           ENDCASE

  • Change in output of quotation form in main window ( in SAP SCRIPT)

    HI expects,
          i want to change to the output values of quotation form and that should come in single line. at present it is coming in double line.as per my requirement is to be display the data in one line.
    item      material                              description
                                    Qty                                       price             price unit               value
    0010    fff.044                                   motor                                                                               
    10ea                                       26.541.00     1ea                       265.41
    my requirement is
    item     material      qty         description       price         price unit          value
    0010   fff-044        10ea       motor             26.541.00     1ea                265.41
    how can i solve this problem in SAP SCRIPT (standard form : rvorder01)

    Hi,
    As stated above , you cannot make changes in standard SAP script, create a Z one and then use it.
    Manish

  • Getting Dynamic XPOS and YPOS for drawing the line in MAIN window in SAP Script using BOX command

    Hi Experts,
    I am trying to draw a line using the BOX command in the main window.
    /:         BOX HEIGHT 0 TW FRAME 10 TW INTENSITY 100
    I want to draw a line in XPOS and YPOS dynamically..
    Is there any way to find such I can draw a line dynamically after triggering a Text element. or determine the XPOS and YPOS dynamically such that I can draw a line in an intended position dynamically.
    Thanks in Advance
    Regards
    Rajesh Chowdary Velaga

    Any update on this ??

  • Printing logo at a specified position in main window in sap script

    Hi,
    I need to print a logo just after the signature which is coming in the main window, So basically i need to call a var(secondary) window inside the main window just after the signature and the position of logo should be towards the right.
    I tried it by insert->graphics but now what I am getting is the image on the left side.How can i define the position(upper margin & left margin) of logo while using the insert->graphics??? Is there any other way to do the same?????
    Ekta

    Hi Ekta,
    For example consider the dimensions
    MAIN  2,00 CM  12,00 CM  17,00 CM   9,00 CM
    Logo   16,00 CM  21,00 CM   3,00 CM   3,00 CM
    This logo(secondary window) Print after the main window ...
    Regards,
    Sravanthi

  • How to add field on into standard address window in SAP script

    Hello Exports,
            I want to add Vendor number field in between the Vendor name and vendor address in the address window in sap script.
    Address is written in standard Address and Entendres. I need to add the vendor number in thsi Address and Endaddress.
    Please guide in this.

    goto the Vendor Name field .
    Hit enter.
    A new line is created.
    Give your Vendor Num field there.
    Bhupal

  • How to Edit the Graphical Window in SAP Script

    I want to change a logo in Window in SAP Script, but the window type is Graphical, hence it is not editable.
    Please let me know the solution

    @bhushankotwal
    I think you mean GRAPH window type in SAPscript form.
    You may change GRAPH window type to VAR, then you will able to edit it. After you modified it you can change it back to GRAPH window.

  • Create new window in SAP Script

    Dear All
       how to create new window in sap script
    Regards
    Suresh
    Edited by: Alvaro Tejada Galindo on Apr 9, 2008 11:58 AM

    Hi,
    To create a new window in scripts.
    1.  After opening the form in SE71   Click on Windows push button.
        it will gives a screen  list of windows in a page
    2. Click on Edit option in menu bar  in Edit-->Create Element click it will gives a popup window in the window give Name of the window and short description press enter  like that you can create windows in  a page
    3.  Click on Page windows it will gives a screen where that window you want to place in that page.    Click on Edit option on menu bar Edit-->Create Element
    it will gives a list of windows which your created in a page   here you have to select which window you want to place.  Double click on that window it will adds on the page and give the bottom of the screen you can find  standard attributes block
    there you have to give the position of the window in a page. 
    or
    Click on setting option on menu bar  settings-->form painter
    it will gives a GUI editor here you can drag the window position it is easy to use.
    then you can see the layout.
    Thanks
    Ganesh

  • Variable window in SAP script

    Hello Friends,
    I have a problem in SAP scripts while printing an internal table data in to a variable window. It is overwriting the contents.
    Ex:
    In my internal table (itab) with only one filed (text) have the below data.
    Firt line
    second line
    third line
    fourth line
    I am looping the internal table and within the loop I am calling the write form.
    In script I am writing like below
    &itab-text&
    In the output I am getting only last line.
    Output:
    fourth line.
    But I need to print all lines one by one.
    Please help me.
    Regards.
    Krishna.

    You can't print internal table data in Variable window, you have to print them in Main window
    The function module WRITE_FORM_LINES allows multiple lines to be APPENDED to a non-main window. You should note that the text lines must have the SAPscript ITF format. In the absence of other information, the system uses identically named formatting attributes (character and paragraph formats) of the form to format the content of the text lines.
    Here is an approach which allows multiple records / lines to be output in a variable window.
    If you transfer your information from the internal table into the text lines, complete with appropriate formatting symbols, you will find that the text lines are output nicely formatted in your non-Main window.
    loop at internal table into WCSCATALOG.
    clear tline.
    tline-tdformat = 'S1'.
    concatenate '<B>' WCSCATALOG-CODEX '</> ,, ' WCSCATALOG-STXT into ltline-tdline.
    append tline to tlines.
    endloop.
    call function 'WRITE_FORM_LINES'

  • Costant Window in SAP Script

    Hi
    i have copied a already existing sap Script(both layout SE71 and Print program Se38) in our Script but for that i am not doing any changes in  Print program.
    for any changes in my layout(se71) i create Perform ,and put form for that in a Subroutine pool.
    but due to some requirement i have to create 2 constant window in my layout,but i am not writing any code to call that window in the print program. therefore that window are not showing in printing test.
    i want to ask , there is a way to call these constant windows without not adding any code for this in prin program.
    regards
    Atul

    Hi Atul ,
    Since you want a constant window on all your pages .Try this!
    1. Create a variable window .(with same measurements of tht of your constant window)
    2. Call it every time you call new page , this will reduce the overhead too .
    3. Adjust your page and make space for this window .
    4. You need not change the text but just adding an additional window .
    Hope it helps!
    Much Regards ,
    Amuktha .
    Edited by: Amuktha Naraparaju on Feb 6, 2009 9:55 AM

  • Box inside Main window issue in Scripts

    I have issue in placing a box inside the main window. I would like to display text with a box frame at end of the line items.
    I tried creating seperate FOOTER window in the Last page, but it dint work as expected, since if the line items ended in the first page then the LAST page did not trigger and one more complication was if there were 4 pages, then there was blank window (FOOTER) in 2 pages and it looks ugly.
    I tried putting the box frame by using text element, calling after the end of the line items. The text displayed as needed, but the frame was misaligned.
    Kindly help me. Thanks in advance.
    Have a great weekend.

    Raj,
    Try to find out which text element is trigerring after the line items text element while debuging the script  and then place the box code in that text element.
    regards.

Maybe you are looking for

  • Alpha channel  distinction

    I am have Flash 2004 MX. I plan to purchase 9 when CS3 releases and I would like to do some alpha channel work.before then. If I use Sorenson's ON2 plug-in to create an flv with an alpha channel - and then import it to FLASH 2004 MX - will the aplha

  • Can I sync with iTunes staying minimized?

    OK, this admittedly is a nit. When iTunes is minimized, I replace my iPhone in its dock. I do this all the time. (One reason: I can't edit my To Do lists, which are in my iPhone Notes, from my Mac.) It's annoying that iTunes restores its window to an

  • Hi, is it possible register MD013ZM/A to MacBook Pro 13.3 (MD101LL/A). Thanks

    Hi, Is it possible register MD013ZM/A to MacBook Pro 13.3 (MD101LL/A). Thanks

  • Will resetting allow reregeristing of the unit to someone else?

    I am new to the site. I use the Ipod as a remote only and no longer need it so I wish to pass it on to my child.  Hence the need to get reset to "out of the box" specs.  Any help is appreciated.

  • Batch processing tiff to jpeg

    Does anyone have any idea if it is possible to change a collection of tif-format images into jpeg with one single operation, rather than treat each image individually? < thread title edited by forum host >