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.

Similar Messages

  • 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

  • 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

  • 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

  • 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

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

  • Drawing Boxes in Script - main window

    hi,
    In script, in main window <u>after table line item datas</u>, i want to draw a box in which i will place some text. On drawing box, it appears on top of that window which i dont want, since it should be placed after item details.
    kapil.

    I do not know this is still relevant for You or not but here is the solution what I did:
    First of all I have to mention this requires SAP standard object modification. !!!
    1.Start SE80 and get into STXC function group.
    2.Select COP_RELATIVE_NUMBER subroutines and double click on that.
    3.Click on Edit button and Get SSCR  Object number from SAP.
    4.Change interface of the COP_RELATIVE_NUMBER subroutines extending it with TYPE parameters
    5.Change the first if Statement.
    6.Extend the Relative case section with a new WHEN '#'.
    7. Cange All COP_RELATIVE_NUMBER calls with new input parameter in CO_BOX, In CO_POSITION, In CO_SIZE.
    From now in Your SAP script You can call BOX statement like this:
    BOX XPOS ‘#10’ TW YPOS ‘#10’ TW  …..
    Will start drowing BOX from cursor current position plus 10 twip.
    Numbers after the # sign are optional.
    Solution works only with TW.
    form co_box.
    data: begin of bx,
            x    type i,
            y    type i,
            w    type i,
            h    type i,
            f    type i,
            i(3) type n,
          end of bx,
          next(10),
          xpos         type i,
          ypos         type i,
          is_relative like boolean.
      bx-x = ft-wpx.
      bx-y = ft-wpy.
      bx-w = ft-wpw.
      bx-h = ft-wph.
      while co-endline = false.
        perform cop_next using next 10.
        case next.
          when 'XPOS'.
    *{   REPLACE        ED1K902054                                        1
    *        perform cop_relative_number using is_relative xpos.
            perform cop_relative_number using is_relative xpos 'X'.
    *}   REPLACE
            add xpos to bx-x.
          when 'YPOS'.
    *{   REPLACE        ED1K902054                                        2
    *        perform cop_relative_number using is_relative ypos.
            perform cop_relative_number using is_relative ypos 'Y'.
    *}   REPLACE
            add ypos to bx-y.
          when 'WIDTH'.
            perform cop_number_value using bx-w.
          when 'HEIGHT'.
            perform cop_number_value using bx-h.
          when 'FRAME'.
            perform cop_number_value using bx-f.
          when 'INTENSITY'.
            perform cop_next using next 3.
            bx-i = next.
          when space. exit.
          when '.'.   exit.
          when others.
            perform cop_warning using subrc_param_unknown next.
        endcase.
      endwhile.
      perform cop_end.
      check co-error = false.
      perform pc_box using bx-x bx-y bx-w bx-h bx-f bx-i.
    endform.
    form co_position.
    data: begin of pos,
            x type i,
            y type i,
          end of pos,
          next(10),
          relative like boolean,
          xpos     type i,
          ypos     type i.
      pos-x = ft-wpx.
      pos-y = ft-wpy.
      while co-endline = false.
        perform cop_next using next 10.
        case next.
          when 'XORIGIN'.
    *{   REPLACE        ED1K902054                                        1
    *        perform cop_relative_number using relative xpos.
            perform cop_relative_number using relative xpos 'X'.
    *}   REPLACE
            if relative = true.
              add xpos to pos-x.
            else.
              pos-x = xpos.
            endif.
          when 'YORIGIN'.
    *{   REPLACE        ED1K902054                                        2
    *        perform cop_relative_number using relative ypos.
            perform cop_relative_number using relative ypos 'Y'.
    *}   REPLACE
            if relative = true.
              add ypos to pos-y.
            else.
              pos-y = ypos.
            endif.
          when 'WINDOW'.
            pos-x = ft-tdwlefts.
            pos-y = ft-tdwtops.
          when 'PAGE'.
            pos-x = 0.
            pos-y = 0.
          when space. exit.
          when '.'.   exit.
          when others.
            perform cop_warning using subrc_param_unknown next.
        endcase.
      endwhile.
      perform cop_end.
      check co-error = false.
      ft-wpx = pos-x.
      ft-wpy = pos-y.
    endform.
    form co_size.
    data: begin of dim,
            w type i,
            h type i,
          end of dim,
          next(10),
          relative     like boolean,
          width        type i,
          height       type i.
      dim-w = ft-wpw.
      dim-h = ft-wph.
      while co-endline = false.
        perform cop_next using next 10.
        case next.
          when 'WIDTH'.
    *{   REPLACE        ED1K902054                                        1
    *        perform cop_relative_number using relative width.
            perform cop_relative_number using relative width 'X'.
    *}   REPLACE
            if relative = true.
              add width to dim-w.
            else.
              dim-w = width.
            endif.
          when 'HEIGHT'.
    *{   REPLACE        ED1K902054                                        2
    *        perform cop_relative_number using relative height.
            perform cop_relative_number using relative height 'Y'.
    *}   REPLACE
            if relative = true.
              add height to dim-h.
            else.
              dim-h = height.
            endif.
          when 'WINDOW'.
            dim-w = ft-tdwwidths.
            dim-h = ft-tdwheights.
          when 'PAGE'.
            dim-w = form_header-tdpagwidth.
            dim-h = form_header-tdpagheigh.
          when space. exit.
          when '.'.   exit.
          when others.
            perform cop_warning using subrc_param_unknown next.
        endcase.
      endwhile.
      perform cop_end.
      check co-error = false.
      ft-wpw = dim-w.
      ft-wph = dim-h.
    endform.
    *{   REPLACE        ED1K902054                                        3
    *form cop_relative_number using is_relative like boolean
    *                               val         type i.
    form cop_relative_number using is_relative like boolean
                                   val         type i
                                   type        type c.
    *}   REPLACE
    data: num type f,
          next(10).
      clear is_relative.
      perform cop_next using next 10.
    *{   REPLACE        ED1K902054                                        1
    *  if next(1) cn '+-.0123456789 '.
      if next(1) cn '#+-.0123456789 '.
    *}   REPLACE
        perform cop_warning using subrc_param_unknown next.
        clear: is_relative, val.
        exit.
      else.
        if next+1(9) cn '.0123456789 '.
          perform cop_warning using subrc_param_unknown next.
          clear: is_relative, val.
          exit.
        else.
          case next(1).
            when '+'.
              is_relative = true.
              num = next+1(9).
            when '-'.
              is_relative = true.
              num = next+1(9).
              num = -1 * num.
    *{   INSERT         ED1K902054                                        2
            when '#'.
              is_relative = true.
              num = next+1(9).
              case type.
                when 'X'.
                  num = ( ft-line_width  - ft-rem_width ) + num.
                when 'Y'.
                  num = ( ft-fill_height - ft-rem_height ) + num.
              endcase.
    *}   INSERT
            when others.
              num = next.
          endcase.
        endif.
      endif.
      perform cop_num_val using num.
      val = num.
    endform.

  • How to use Two main windows with in a page in script ?

    Hi any body explain me...
    How to use Two main windows with in a page in script ?
    with  header data in one main window,
    & Item data in other main window.

    HI..,
    u need to go for <b>SPLITTING THE MAIN WINDOW</b> !!!
    Main windows in page windows allow you to format text in multiple columns. Define an area in the page window, in which to position the main windows.
    Here is the procedure !!
    -->Create a page window and assign it to a page.
    Choose <b>Edit --> Main windows</b>.
    A dialog box appears.
    -->Enter values in the fields <b>Area width</b> and A<b>rea height</b> in accordance with the input guidelines for main windows.
    -->Enter values in the fields <b>Spacing</b> and Number in the <b>Horizontal group</b> if you want to use multiple columns. You can ignore the fields in the Vertical group.
    Determine how many columns and line areas are required for label printing. Then enter the corresponding values in the fields in the <b>Horizontal and Vertical groups</b>.
    -->The value in the field Left margin varies from main window to main window if multiple columns are used. The following applies:
    <b>
    Left margin of current column + Window width + Horizontal spacing = Left margin of next column</b>
    In label printing, the field Upper margin also varies from main window to main window:
    <b>
      Upper margin of current main window +  Window height + Vertical spacing = Upper margin of next main window</b>
    -->Enter a value in the field Start position.
    This is a counter. Enter a starting value which is equal to or greater than 1.
    -->The main windows are added to the list.
    -->Save your form.
    reward if it helps u...
    sai ramesh

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

  • Im getting a headache when i press space in the xcode main window the page scrolls up and down real quick, but why?

    In Xcode in the main window where the code goes every time i press the space bar the page scrolls up to the top then back to the curser again really fast.  If i hold my finger down on the space button then the page goes mad and i cant read anything.  Please help. I am just now running Lion.

    I have the same problem too and tried alot of things like time zone , restarting or changing DNS of wifi connection to 8.8.8.8 still nothing happens .. !!
    iPhone 5s, iOS 8.3

  • 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

Maybe you are looking for

  • PDF Color Shift On Windows Platform

    OK, here goes: I still can't print double-sided on my Mac, although the colors reproduce perfectly on our Canon office printer. Grays print neutral gray. So in order to print double sided documents, I export out of InDesign to a PDF file. I transfer

  • The images on aol come in too large for the email list

    The mail files have changed to a font too big to read effectively-even the welcome sign is cut off-i did not do anything to set it at that size and i can't find a setting change for this

  • Maintain Structure Relations - LSMW - IDOC method

    Hi, Trying to use LSMW Idoc method to upload BP masters. Have maintained the ports, partner types, message types etc. When I reach the "Maintain structure relationship" step, I have a very big tree structure under EDI_DC40 when am trying to maintain

  • Nokia arte 8800 contacts saved but no name appears...

    i have all my contacts saved with numbers in my phone, but when i receive a call or text only the number appears not the name? phone nokia arte 8800 can any1 please help

  • CRM2007 BP

    Hi SDNers, Can anybdy getme the configuration guide of CRM2007 business package with portal.. Its prerequisites, along with CRM BP is there any other files need to upload into EP server and its details. pls. update me on the same Regards, Venkat