SAPSCRIPT Main Window Issue

I need to print the contents of the main window twice in the same page at different places.I searched the forum but I did not get any relevant thread with a solution.
Can anyone help.
Thanks
Nancy

I've put two main windows on the same page.
Since it is  a main window we cannot rename it, so the name of both the main windows is "main".
When i call it using the function module "write_form'  from the driver program only the first instance of the main window is called, if there is an overflow ( that is the data doesn't fit into the first main window ) it goes to the second instance of the main window and prints the rest of the data in the second instance of the main window.
But this is not my requirement.
I want the same data to be replicated in both the main windows.
Not the first half of the data in the first main window and the second half in the second instance of the main window.
I think I've made my requirement more clearer.
Thanks
Nancy

Similar Messages

  • 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.

  • Problem in sapscript Main Window Box command - Urgent

    Dear friends,
    Problem while showing boxes in multiple pages in sapscript. Box command is defined begining of the main window. But while printing showing in first page only not in other pages.
    Regards,
    Praveen Lobo

    This could be your problem why box command is not getting displayed in all pages, you might be using the box command in the element that is only called once and that to in the first page... so try to check your form and place you box command under element that is getting called in each and every page, it will solve your poblem.
    Note: for testing you can place your box command under element "/E" where you are displaying your line items... even though it is called multiple number of times it gets overlapped.
    close the thread once your question is answered.
    Regards,
    SaiRam

  • SAPscript MAIN Window ITEM TEXT Printing in NEXT PAGE

    Hi,
    I need to print the Item Text (Item Description or Column Description) if the Item Values (Lines) goes to the NEXT page in the Form. I have TEXT ELEMENTS defined for ITEM TEXT and ITEM VALUES in the MAIN Window. There is no issue with Printing the Item Text and Item Values in the FIRST Page. But in the NEXT page only when the Item values are printed (Item lines in excess of FIRST page), ITEM TEXT needs to be printed before printing the ITEM VALUES. If the FROM goes to NEXT page but not the Item values, then ITEM TEXT need not be printed in the NEXT page. The number of lines in the MAIN Window is different for both pages (FIRST & NEXT). I am not sure how to get this done. So, please provide me with a suitable solution to get this done. Appreciate your help in advance.
    Thanks,
    Kannan

    Hi Kartik Tarla,
    Thanks for your reply. Printing item lines between PROTECT / ENDPROTECT, will lead to Print all the line item together in one page. That is not I wanted. It the line items flows to NEXT page, I need to print the Item Header/Item Text. Otherwise, NEXT page should not have the Item Header.
    Thanks.
    Kannan

  • Urgent : SAPScript: Main Window

    HI Gurus,
    Can two Main windows be created in a single sapscript with the same text inputs.?
    If yes, how can we do so?
    Useful response will be surely rewarded.
    Thansk in advance

    Hi Himayan
    you can do tht.....
    as you have on main window.......
    u want to have one more main wondow in ur page..if i m rit...then
    u can do so..
    goto  'page window' >Edit>Create Element-->then select then main window....it ll be sub main window as '01'...and u have to write  text in main '00'...only
    it will come in main '01' automatically...
    u can place this window any where in the page...may have different dimensions....
    It will work man i did it...
    Thnx
    Rohit

  • Sapscript MAIN window and character separation

    Hi all
    We have encountered two issues, when we create Form painter.
    How we want to create the form is below.
    Display 6 fileds below at the top of the paper and at the bottom of the paper with correct character separation.
    &REGUP-BELNR&      &REGUP-XBLNR&     &REGUP-BLDAT&      &REGUD-WRBTR&      &W_WSKTO(16T)&     &REGUD-WSKTO&
    <Ideal Form>
                                        Check
    *ACC doc#54321 Invoice#12345 Date2009/01/01 Amount in invoice1000 Discount30 Sum970*
    *ACC doc#54322  "blank"          Date2009/01/02 Amount in invoice1000 Discount00 Sum1000*
    *ACC doc#54323 Invoice#12347 Date2009/01/03 Amount in invoice1000 Discount00 Sum1000*
    ########CHECK DETAIL INFORMATION at the middle part##########
                                                                                    Total Check Amount
                                         MICR FONT
    *ACC doc#54321 Invoice#12345 Date2009/01/01 Amount in invoice1000 Discount30 Sum970*
    *ACC doc#54322  "blank"          Date2009/01/02 Amount in invoice1000 Discount00 Sum1000*
    *ACC doc#54323 Invoice#12347 Date2009/01/03 Amount in invoice1000 Discount00 Sum1000*
    <Issue>
    1. We cannot display two main windows.
    What we want to realize is
    print 6 fields 2 times in the same form like labels. but right
    ex)Display 6 fileds below at the top of the paper and at the bottom of the paper
    &REGUP-BELNR&      &REGUP-XBLNR&     &REGUP-BLDAT&      &REGUD-WRBTR&      &W_WSKTO(16T)&     &REGUD-WSKTO&
    <Issue 1>
    In below, the bottom part (MAIN01) is blank and nothing comes up
                                        Check
    MAIN00----
    *ACC doc#54321 Invoice#12345 Date2009/01/01 Amount in invoice1000 Discount30 Sum970*
    *ACC doc#54322 Date2009/01/02 Amount in invoice1000 Discount00 Sum1000*
    *ACC doc#54323 Invoice#12347 Date2009/01/03 Amount in invoice1000 Discount00 Sum1000*
    ########CHECK DETAIL INFORMATION at the middle part##########
                                                                                    Total Check Amount
                                         MICR FONT
    MAIN01----
    2.When one field is blank, the character separation become different in each row.
    ex) In below, doc#54322 has no Invoice# then character space for Invoice# is not blanked but the
    space between ACC doc# and Date got really tight
    <Issue 2>
    MAIN00----
    *ACC doc#54321 Invoice#12345 Date2009/01/01 Amount in invoice1000 Discount30 Sum970*
    *ACC doc#54322 Date2009/01/02 Amount in invoice1000 Discount00 Sum1000*
    *ACC doc#54323 Invoice#12347 Date2009/01/03 Amount in invoice1000 Discount00 Sum1000*
    ########CHECK DETAIL INFORMATION at the middle part##########
                                                                                    Total Check Amount
                                         MICR FONT
    MAIN01----
    If you know the solution, please let me know
    Best regard Masanobu Kubota
    Edited by: Koji Yamada on Jan 8, 2009 5:59 AM
    Edited by: Koji Yamada on Jan 8, 2009 6:00 AM
    Edited by: Koji Yamada on Jan 8, 2009 6:02 AM

    Hi,
    As per my understanding of the question,
    As u need two different pages, i.e. one with a single window n other with 2 windows:
    In script create 2 pages:
    1.Page1 have main window and sub window
    2.Page2 have only main window.
    Now in driver program,
    call function open-form.
       when scenario 1
          call function start-form for page1
               call function write-form etc.....
          call function end-form
       when scenario 2
          call function start-form for page2
               call function write-form etc.....
          call function end-form
    call function close-form.
    Hope its clear.
    Plz revert back if u get any doubts.

  • Regarding Main Window issue

    hi all,
    I developed one Smartform Work Order.
    My Requirement is after Completion of Main Window some texts like Terms of Payment and Penalty Clause( These we maintained in texts in PO) needs to come.
    Suppose i am displaying 10 line items . after completion of 10 line items Terms of payment needs to come and next page should start from first line onwards with whatever ending in the first page. It should not start from middle(beacause we define main window from middle ) and also for every page back side terms & conditions needs to come.
    How can we achieve this.
    Please suggest.
    Regards
    Reddy

    Hi,
    check your previous post
    Regarding Page Back in Smartform
    You cannot see it in print preview... try to check it by taking print..
    Regarding printing of terms and conditions after the line items... you can create a text node after the loop node and print the terms and conditions.
    It should not start from middle(beacause we define main window from middle )
    I guess this would be difficult to achieve.. i would like to suggest you to trigger a new page with main window height increased not the width of the main window

  • Sapscript Main Window

    Hi All,
    I am using the standard print program & layout set of order confirmation for quotation.
    In the main window, i am defining a table using box commands & this is defined in the type-top of main window. the header text does get printed at the top of the window, but the table is printed starting from the top of page. I have modified the write form in print program to accomodate the printing at top of main window. Any suggestions how do i print the table/box in the main window.
    Thanks
    Amu

    Hi,
      Instead of using type TOP, define separate ELEMENT for printing header and table to be displayed. Then there will not be any problem of printing.
    Regards,
    Sailaja.
    Dont forget to reward points, if answer helps you.

  • Sapscript  - Main window Frame

    Hi all,
    I am designing a form.I have three main windows in this form. I have the following code in the text editor for thre windows. /: box frame 10 tw
    when I check the layout of the form I can see the box only in the main window 00 but not in main window 01 and main window 02. Can anyone please help me with this.
    Reagrds,
    Varun

    Hi Varun,
    Please note that no need to create a window for each column.you can define Your X-coredinate to define Verical line or means to create a box:
    Sample Code :
    BOX YPOS '1.25' LN WIDTH '120' CH HEIGHT 4 LN FRAME 10 TW
    BOX XPOS '18.00' CH YPOS '1.25' LN WIDTH 0 CH HEIGHT '4.00' LN  FRAME 10 TW
    BOX XPOS '31.00' CH YPOS '1.25' LN WIDTH 0 CH HEIGHT '4.00' LN  FRAME 10 TW
    BOX XPOS '47.00' CH YPOS '1.25' LN WIDTH 0 CH HEIGHT '4.00' LN  FRAME 10 TW
    BOX XPOS '68.00' CH YPOS '1.25' LN WIDTH 0 CH HEIGHT '4.00' LN  FRAME 10 TW
    Lanka
    Message was edited by: Lanka Murthy

  • SapScript  'MAIN' Window without 'Text Element'

    Why is it, if we run 'MAIN' Window without defining 'Text Element'(/E), it displays the contents twice.. The same doesn't happens with other 'Variable' windows..

    Hi Main window is different from Var window.
    Var window will call only once .
    But main window it will call many times, it will go to Driver program and come back to populate the data.
    for Clear info debug and see.
    regards
    vijay

  • Box in MAIN window of sapscript keeps misaligning...

    Hello Experts,
    I am currently modifying a sapscript and inside the MAIN window, there is a box command that 'boxes' a
    static text. But the problem is, the box misaligns since the number of line items is dynamic.
    So, how can I make the box command to just 'box' the static text correctly even though the line item is
    dynamic?

    HI,
    Declare the Box and Static text in the main window with a new text element after the text element of the line items . so it will print it in the end when all of the Line items are printed..
    (or)
    Just create another script with the BOX and the text you want inside the BOX. i.e. this becomes another script which is separate from the line items you are printing there.
    call this script in your driver program with start_form FM.
    REPORT  YTEST_SCRIPT.
    DATA:
      ITAB TYPE TABLE OF SFLIGHT,
      FS TYPE SFLIGHT.
    SELECT * FROM SFLIGHT INTO TABLE ITAB.
    CALL FUNCTION 'OPEN_FORM'
      EXPORTING
        FORM                              = 'ZSCRIPT_TEST'.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT ITAB INTO FS.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          ELEMENT                        = 'TEST'
          WINDOW                         = 'MAIN'.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDLOOP.
    CALL FUNCTION 'END_FORM'.      "---------->Ends the previous form
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'START_FORM'    "------------> Starts your new script with BOX and Static text
      EXPORTING
        FORM                   = 'ZSCRIPT_TEST1'.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
        ELEMENT                        = 'TEST'
        WINDOW                         = 'MAIN'.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'CLOSE_FORM'.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    This will print the BOX and the Static text in a new page after the line items got printed..
    This will solve your issue...
    Thanks&Regards
    Sarves

  • 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^

  • Issue in overlapping of windows with main window.

    Hi all,
    My requirement is to have 4 windows at the end of main window.
    the 4 windows should be printed only after end of all the line items in the main window.
    the problem here is if i extend my main window till the end and overlap the 4 windows. if line items are less it is printing perfectly fine. if line items are many the 4 windows are overlapping on line items. if i decrease the size of main window and place 4 windows after that, if line items extend to two or three pages. windows space will be wasted in page 1 and page 2 as the 4 windows will be printed only on the last page i.e end of line items.
    Any pointers for solving this would be appreciated.
    Regards,
    Sreekanth.

    one death you gonna die, thats what i always say to customers when it comes to this topic.
    IF you want certain things printed on certain positions of a sheet, you NEED to reserve this space, so that no overlapping issue comes up.Reserving this space means that this space may stay free in matter of page breaks and such.
    So they either live with the wasted space, or they live with the information having an uncertain position, since you just give it out in main window after all the line items.
    If first case is BLACK and second case is WHITE, then you have to know that in this scenarion there is no GRAY, just WHITE OR BLACK.

  • Vertical line issue in SAP Script main window

    Hi All,
    I want to draw a vertical line in my main window in SAP Script output.
    But problem is in main window i am printing some texts at the beggining then i am printing line items.
    So this is not fixed line (box). It may increase/decrease based on text available before line items.
    How can i manage this prining vertival line as i don't know height, top of this line!
    Thanks in advance.
    Thanks,
    Deep.

    Hai Deep,
    Use Elements as suggested by Kodarapu.
    Now goto Paragraph Formats create a format for Item lines.
    ex.
    Name Paragraph Format as 'IL' Now click on the Push Button "Tabs" on bottom Right.
    now in "Tab Position" enter the spacing that you need for your item dispaly
    ex.
    Number     Tab position       Alignment
    1               6.00   CH          LEFT
    2               25.00  CH         LEFT
    3               54.00  CH         LEFT
    The above example is for 3 items
    Now in your Script Windows-> Main
    do the following.
    /E           ITEM_LINE_A
    IL           &EKPO-EBELP&,,&EKPO-EMATN&,,,,&EKPO-TXZ01&
    Hope it SOlves your Issue.
    Cheers,
    Suvendu

  • Box in main window (sapscript) problem.

    Hi, all.
    I meet a weird problem....
    I have 2 pages form which have 2 same MAIN window and of course their source code is same one. But when I run the output form, I found that one of the page which main window's box is disappear, while the other page no problem.
    How come like this? Should be the box appear in both MAIN window, right? Hope someone can guide me.
    Thanks in advance.

    Boxes in the main window only get printed in the first page, unless you include them in an element and explicitly call the, But of course that's not the way to go.
    Every other window in the same page which has content that's not inside one element gets printed every page. So to solve your problem, declare another window (perhaps called BOXES) with the appropiate dimmensions and define in it the boxes you need. Replicate this BOXES in the other pages (if you use different page formats inside the sapscript) or leave it in the First page (if it's the only one in the sapscript). The boxes will now print in every page.

Maybe you are looking for

  • Lost Desktop Icons

    I have a desktop folder with content, but no icons on the desktop. How do I get the content to appear on the desktop with icons?

  • Query regarding the variance calculation

    Hi all, Hope all are doing well. i have an query regarding the VARIANCE CALCULATION IN Production planning module. here i could see KKS1,KKS2,KKA1 etc,. codes they are using in sap. can any one kindly clarify these codes and uses. pls regs, siva-v

  • Undefined in browsing path

    Hi, on tools 8.53.04, FSCM92 on Win 2008, I have undefined in browsing path when browsing in Peoplesoft Web interface. Being on any page it is the same. As you can see in this picture : Where does it come and how to delete it ? Thanks.

  • Late '06 Mac Pro w/ Leopard Shutdown & Sleep Problems

    I recently did a clean install of Leopard on a brand new hard drive for my Late '06 Mac Pro. I currently have all updates installed, and the system is running very fast and very stable. But! I've been experiencing two problems over the week I've had

  • Rate Charges for United Kindgom & Switzerland from...

    What are the flat rate charges for calling the United Kingdom and Switzerland from Canada? Calling Europe? Calling Australia? Calling South Africa? Or would it be better to buy Skype credit and use it as a pay as you go if calls are infrequent? If we