Script problem in main window

Hi,
  In main window there is box at the bottom of the page which is used for totals and the space before it is used for items. I want the items to go to next page instead of overwriting on the totals . please help

Hi,
You can use
/: bottom
/: endbottom
command in the main window and put the box and the totals in that so they will be printed at the end of the page with out any overlapping of the items
Regards
Sarves

Similar Messages

  • Problem with sap script table in main window

    hi all,
    i have created a sap script  for which output is in 7 pages.
    except first page all the remaining pages are giving the correct output.
    the problem with the first page is iam not not getting vertical lines in the table which is in the main window of page 1.
    iam getting the vertical lines correctly in the mainwindow table of all the remaining pages.

    Hi,
    It's simple,
    Pre- U should had declared a second page for the same window with header, main & footer.
    now
    First when u r looping the internal table provide no of rows eg Row 1 TO 10. in the Loop ( Data Tab)
    or
    when defing TEXT Go to PC Editor and mention all the fields Under  PROTECT -  ENDPROTECT.
    This would solve the issue.
    Thanks
    Ravi

  • Script  -  Space in Main window

    Hi all,
        I have designed  main  window  as such it matches the statinary requirements.   the mainwindow  has BOX command  so it is like  table of  2 rows and 5 columns.
    The database fields  present in the script gets displayed  on the mainwindow  ,  only  7  rows gets displayed  on the mainwindow , but still there is enough space  as it can accomodate about 12 rows .  But once the   data reaches 7 rows  it jumps of  to  the other page . 
    I tried  checking  all the things  but iam not able to figure it out. If i try increasing the size of main window  the BOX alignment  gets ruptured  and  it overlaps  with the other window below it.  The problem is  space  inside the main window is empty
    If any one has a slight knowledge about this  please let me know
    I will  paste the code present in the text element   for the line items.
    ==================================================
    /     <b>THIS LINE IS BLANK</b>     
    /:     SET DATE MASK = 'MM/DD/YYYY'.
    /:     PROTECT
    T1     &REGUP-BELNR(13)&,,&REGUP-BLDAT(6)&&REGUP-BLDAT&,,
    =       &REGUD-DMBTR(13R)&,,&REGUD-SKNTO&,,&REGUD-NETTO&
    /:      ENDPROTECT
    ==================================================
    Please do let me know  about this .
    Waiting for ur replies
    Regards,
    Shuja

    hii shuja ,
    PROTECT
    determine that a paragraph must not be separated by a page break. The lines in this command are printed together on one page. If the space is enough on current page, then all the lines are printed on current page. If, however the space is not sufficient the PROTECT command works as a ‘NEW-PAGE’.
    SO remove PROTECT ENDPROTECT and try ..also check by increasing size of main window.

  • Problem with Main window in smartforms

    Hi All,
    I am creating a smartform, in that i need to restrict the no. of line item is to 15 and i need to draw a box for it. My problem is if i am displaying 15 line items the box will be drawn correctly and if i use only 3 line item then the box is drawing only for 3 line item. But i need to draw a box for 15 line items constantly at any given point of time irrespective of no. of line items. I am displaying this info using mail window, plz do help me.
    Thanks & Regards,
    pavan.M

    Hi,
    First describe your internal table and based on that you deifne another internal table in which you will have some 2 dummy fileds
    suppose if you internal table has 10 lines then you need to have 5 more lined to print right?
    say describe lines is v_lines
    v_rem = v_lines mod 15. (you will get remainder here)
    then v_count = 15 - v_rem.
    before main window do code as following .
    do  v_count times.
    v_dummy1 =  text (maintgain soem text in this field)
    v_dummy2  will not have any value.
    append these values to it_dummy table.
    enddo.
    And when you loop main table count one more variable  say v_cnt.
    Now you can loop your dummy internal table based on condition.
    the condition would be   v_cnt  eq  v_lines .
    and print empty text . dont print the field that have some text.
    loop dummy table only after printing main table data in the main window.
    Hope you got the logic
    Dont forget to reward points
    Regards,
    Nageswar

  • Smartform - problem with main window

    Hi all,
    I have following windows in my smartform first page.
    First Page
      -> secondary window 1
      -> secondary window 2
      -> main window
           1 template1
           2 template2
           3 command node
      -> secondary window 3
    I have the same windows in  my next page. I am using the command node in main window for some specific condition to implement page break to next page. I am getting the next page with all the contents from the secondary windows but for some reason the main window in second page is not diplayed.
    Please help me. Waiting....

    Hi Raju,
      One possible solution can be... first fix number of rows in a page. Then in the INITILIZATION use DESCRIBE command on your internal table. Then divide the number of lines by the number of line you have already fixed to be printed on a page. This will give the number of pages.
      Now what you can do is... in your first page take a table node. In that create a  table line with 13 columns and place the first 13 columns in that.
    Then take a ALTERNATIVE node with condition sy-page = the number of pages which you have already calculated.
    For this ALTERNATIVE node in the TRUE node take a COMMAND NODE  with NEXT_PAGE(second page) in GO-TO-NEW-PAGE field.
    And in the FALSE node take another COMMAND NODE with FIRST_PAGE(current page) in the GO-TO-NEW-PAGE field.
    Untill unless you will reach the last page(which we have calculated) this condition will become false and hence the COMMAND NODE in the FALSE node will trigger and the current page will be triggered. This completes the printing of 13 columns for all your internal table rows.
    Now in the NEXT_PAGE(second page) take another TABLE node and again create a new table line with the next 13 columns(14 to 26). And assign NEXT_PAGE in the Next Page field of this page(next page... hope you are not confused ). This will print the remaininig 13 lines.
    But the problem with this solution is that the user has to sort the pages after getting the printouts and also the number of rows that will be printed are fixed on a page.
    Thanks and Regards,
    Bharat Kumar Reddy.V

  • Problem in main window of smartform

    Hi experts,
    I have a secondary window in my page of smartform. and then a main window in which i have used a table to display line item from internal table.
    Now my problem is that when the data exceeds first page the remaining part of dat in mainwindow goes to second page but the secondary window data also repeats in second page.
    Can anyone help plz?
    Thanks in advance.1.13

    click on the secondary
    window you will find
    tabs general attributes,
    output options & conditions
    in the conditions tab
    in add additional events
    check the check box
    Only on First Page.
    Thanks,
    Phani.

  • Problem in main window

    Hi all,
    i have to print some data in coloumn wise and some data in row wise in same row,like 4 coloumns of data and in fifth coloumn i have to display 3 rows of text and their values which are not dependent on first four coloumns,can any one give me solution for this(this should be done in main window,even though first four coloumns have multiple records,5th coloumn is having singe record,so i have to print single record in fifth coloumn and multiple records in first four coloumns)
    thanks and regards,
    gopal
    Edited by: gopaludu p on Oct 15, 2008 6:59 AM

    Thanks viswa,
    but my first four coloums are having multiple records,how can i use template for that.
    i have to display like this(ABCDE are my five coloumns)under coloumn E , i have to display text and values like shown,and first four coloumns are like shown.and heading for coloumn e is not required.
    A-B-C--D----E
    1-1-11----point of departure = india
    2-22-2----
    point of arrival-US
    3-3-3--3--
    truck number=3442
    4-444---
    5---55-5----
    6--6-6-6---
    Edited by: gopaludu p on Oct 15, 2008 7:11 AM

  • Dynamic Stamp Java Script Problem (8.0 Windows)

    I have created a dynamic stamp for my engineering firm, but I am having one problem. The stamp is a date stamp with other information and I need the date to look like this:
    JUL 10 2008
    However, I can only get the first letter ('J') to be capitalized. Is there a way to alter the custom scripting to enable me to get all three letters of the month capitalized?
    Thank you in advance for any responses...

    Thank you for the post, but...
    how do you get the "mmm" part to all be capital letters? As it stands, my date stamp looks like this:
    Jul 10 2008

  • What is the use of MAIN WINDOW in SCRIPTS

    what is the use of MAIN WINDOW in SCRIPTS, y we con't create a script w/o main window.
    Title was edited by:
            Alvaro Tejada Galindo

    Hi
    See this
    What are the different types of windows in SAP Scripts?
    Windows are defined in the Layout sets which define the position and the text to displayed.
    The different types of windows are:
    MAIN - Main Window
    The main window is a continous window which can extend over several pages. If the text in the main window fills up a page, a new page is created.
    Only one main window can be defined in the SAP Script whereas upto 100 instances of main window can be created in a page.
    VAR - Variable Window
    This window can have the variable contents displayed on them. The contents of the window cannot exceed the window size. The content can be formatted for each page.
    CONST - Constant Window
    The constant window can have a fixed content and is formatted only once.
    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.
    Variable Windows (VAR)
    The contents of variable windows is processed again for each page, on which the window appears. The system outputs only as much text as fits into the window. Text exceeding the window size is truncated; the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different form pages.
    Constant Windows (CONST)
    Starting with Release 4.0, the system internally processes windows of type CONST similar to windows of type VAR. Therefore, if you create a new window, always use type VAR.
    <b><REMOVED BY MODERATOR></b>
    Anji
    Message was edited by:
            Alvaro Tejada Galindo

  • 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

  • Tab setting in the  main window sapscript table

    Hi ,
    i have one problem ,i am doveloping new script.in the main window having 5 column table .the table col size is grater than the populated field size.main problem is these values are not populated in the middle of the every column of the table.
    to achive this how to set the tabsettings?
    please sent the solution for this asap.
    Thanking u.

    Hi SS,
    U can do that by giving the alignment (Right,Left,Center Alignment) in the Pragraph format and also in Character format.......
    any of the format you can choose....
    as for as tab is concern you must have the size of the value which you want to populate...
    accordingly you have to give the tab size in paragraph format...
    thnx
    Rohit

  • Main window box is not extended

    Hi Experts ,
    I am working scripts. In main window  I draw box , using below box command.
    BOX XPOS '0.0' CM YPOS '0.0' CM WIDTH '3' CM HEIGHT '1' CM FRAME 10 TW
    BOX XPOS '0.0' CM YPOS '0.0' CM WIDTH '6' CM HEIGHT '1' CM FRAME 10 TW
    BOX XPOS '0.0' CM YPOS '0.0' CM WIDTH '10' CM HEIGHT '1' CM FRAME 10 TW
    BOX XPOS '0.0' CM YPOS '0.0' CM WIDTH '13' CM HEIGHT '1' CM FRAME 10 TW
    BOX XPOS '0.0' CM YPOS '0.0' CM WIDTH '16' CM HEIGHT '1' CM FRAME 10 TW
    My issues is , when Item line is one, it is working fine.
    But if item lines 2 to 10 records, My box was not extended.
    So please give me solution.
    Thanks,

    point 1, wrong forum, see the moderator message right on top of this forum.
    2. well you are drawing hard coded boxes of height 1 and various width´s.
    Sure the will come only for item 1, for item 2 you´d have to draw new own boxes.
    Since you cannot be sure about the height of a position, you had to code these dynamically, which is possible but quite a task.
    Anyway it is NOT advicable to work with boxes on line-item level. at least not with SAP-Script.
    with smartforms you have an easy time doing this, while in SAP-Script you may come quite near to desperation.

  • Grouping in main window

    Hi experts..
    I am working on SCRIPTS.
    I am looping my internal table in main window to print fields of main window.
    my main window fields are--
    box_id   pack_id  sales order  duty_code   box_wt.
    but one more field is there..ie DEST_CODE, its CHAR type.
    but i want to group my internal table records according to DEST_CODE.
    means..on o/p form fields should b displayed---
    dest_code = '--'
    box_id   pack_id  sales order  duty_code   box_wt.
    my all fields are get printed..
    but can some body tell me "how to group my internal table records, according to one specific field"
    when that DEST_CODE  will change,
    those records group must b different.
    thanks i advance

    Hi,
    1. U declare the first field as 'DEST_CODE' in ur Internal Table.
    2. Now, u SORT the internal table on DEST_CODE.
    3. LOOP ur Internal Table & use control break events for grouping based on DEST_CODE.
    Eg:
    In Driver/Print Program:
       LOOP AT itab.
         at new DEST_CODE.
            call function 'WRITE_FORM'.
                exporting
                   element = 'E1'
                   window = 'MAIN'.
            endfunction.
         endat.
         call function 'WRITE_FORM'.
            exporting
               element = 'E2'
               window = 'MAIN'.  
        endfunction.
      ENDLOOP.
    In Script Form: in Main Window
    /E    E1                                             --> Calling Element E1 to print Dest_CODE
    P1   &itab-DEST_CODE&                   --> Printing DEST_CODE once for every new DEST_CODE
    /E    E2                                             --> Calling Element E1 to print Dest_CODE to print other details
    P1   &itab-box_id&,,&itab-pack_id&,,&itab-sales_order&,,&duty_code&,,&box_wt&.  
    Hope its clear!!
    Rgds,
    Pavan

  • Main window of SAPScript versus Main window of smartform

    Hi,
    In case of Smartform we have one main window per page but in case of SAP Script we can have 0 to 99 Main window on one page.
    In case of smartform if the main window on one page gets filled then the remaining long text will jump on main window of second page.
    Following are my doubts:
    If I define three MAIN windows for three different kind of long texts on page one in SAP Script as follows:
    MAIN Window 1 -  Long text1
    Main Window 2 -  Long text2
    Main Window 3 -  Long text3
    1) If the long text 1 on MAIN window 1 of first page gets full does it automatically jump to Main Window 2 of first page ?
    2) If I don't want the long text on Main Window 1 to jump on Main window 2 on first page but on Main winodw 1 of next page , is it possible ? How do I do it ?
    Answers will be rewarded..
    Tushar.

    In SAPScripts if the long text is filled in the Main Window it will spill over into the same Main Window if it is defined in the next page. Text from one Main Window will nt spill over onto the text to different Main window.
    So as far as you questions are concerned:
    1. Not it does not automatically jump over into Main Window 2 from Main Window 1 on same page or next page.
    2. You just need to define the Same Main Window on the next page so that text gets jumped over to the next page. If it is possible just define the next page as the same page, so that you do not have to create a separate page and attach all the windows.
    Hope this helps you...
    Shashi Reddy

  • What exactly is the diff between main window and variable window

    what exactly is the diff between main window and variable window in SAP script?

    hi,
    MAIN WINDOW :- In a main window you display text and data, which can cover several pages (flow text). As soon as a main window is completely filled with text and data, the system continues displaying the text in the main window of the next page. It automatically triggers the page break.
    You can define only have one window in a form as main window.
    The main window must have the same width on each page, but can differ in height.
    A page without main window must not call itself as next page, since this would trigger an endless loop. In such a case, the system automatically terminates after three pages.
    VARIABLE WINDOW :- The contents of variable windows is processed again for each page, on which the window appears. The system outputs only as much text as fits into the window. Text exceeding the window size is truncated; the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different form pages.
    As far as the processing of the window contents is concerned, the system currently treats constant and variable windows alike. The only difference is that constant windows have the same size throughout the form.
    hope this will be useful.
    If useful then reward points.
    with regards,
    Syed

Maybe you are looking for

  • MacBook Pro to MacBook Pro File Transfer

    Perhaps too basic of a question, but I haven't been able to find the answer elsewhere. I'm getting a new MacBook Pro in a couple of weeks and need to transfer non-application files from my old (early 2011) MacBook Pro to the new one.  In the previous

  • Stretched image MacBook Pro Retina to 720p TV

    Whenever I connect my MacBook Pro Retina to my Panasonic HD Ready tv the entire image on the tv is stretched a bit vertically. It's not the gravest of problems but it is pretty **** annoying when watching any kind of video. All the heads and everythi

  • How do I open a add on after it is installed?

    I need to know how to open a add in after it is installed

  • Base UOM is MTR but while MB1A default it is issuing CM

    Hi,   We have one material for this Base UOM is MTR  in some BOM  it is in CM  both conversion factor are mention in Material master  while issuing material against production order it issue in CM but when same material is  issue in MB1A  with 201 mo

  • My iPhone 4S randomly shuts down.

    My iPhone 4S randomly shuts down, when plug it into charge. I restored, as a new iPhone and problem continues, what do I do?  iPhone is 4 months old, and has no damage.