Drawing box in main window of sapscript form

Hi all,
I am developing a script for vendor balance confirmation report, in which I have to provide check boxes to allow the user to select an option.
My problem is if I use the BOX statement to draw the box the alignment keeps changing when the size of vendor address changes.
i.e the boxes moves up and down
I have another reference script in which they used the following statement to draw the box <527>.
Please suggest a way to use statement like this <527>
Thanks,
Rajan

Try it as shown below for drawing dynamic boxes.
Here the code works this way the YORIGIN is incremented by 0.6CM each time it is in the loop thus drawing tables dynamically.
/E TAB
/: POSITION XORIGIN '0.9' CM YORIGIN '+0.6' CM
/: SIZE WIDTH '3.0' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW.
/: POSITION XORIGIN '3.9' CM
/: SIZE WIDTH '7.3' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW.
/: POSITION XORIGIN '11.2' CM
/: SIZE WIDTH '2.8' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW.
/: POSITION XORIGIN '14' CM
/: SIZE WIDTH '2.6' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW.
/: POSITION XORIGIN '16.6' CM
/: SIZE WIDTH '3.2' CM HEIGHT '0.6' CM
/: BOX FRAME 10 TW
P4 &X_VBAP-KWMENG(C)&,,&X_VBAP- ARKTX&,,&V_TOTALa&,,&V_TOTALb&,,&V_TOTALc&
the driver program's piece of code.
LOOP AT it_vbap INTO x_vbap.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TAB'
window = 'MAIN'
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
spool_error = 8
codepage = 9
OTHERS = 10.
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.
Regards,
SaiRam

Similar Messages

  • 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

  • How to get watermark in main window of SAPSCRIPT FORM

    can anyone help me to get watermark in a SAPSCRIPT FORMS
    in all pages

    Hi vinod,
    Thanks for reply I have tried but its not working.
    I have 2 main window one "main" and other "Main01". In the main 01 I have insert Bitmap command. I have other values to display  main.
    watermark is not coming second page.
    As u said I have given New-window the bitmap was not displaying.
    Please can u give details idea in this regards
    Thanks
    Regards
    Prashanth.

  • Draw box across main window

    Hi,
    I need to draw a box around the whole main window using BOX. i.e, if the page extends to more than one page, the box should draw on the next pages also. Right now I'm able to draw only on the first page. How should I do this?
    This is what I have now.
    POSITION WINDOW
    POSITION XORIGIN -20 TW YORIGIN -20 TW
    SIZE WIDTH +40 TW HEIGHT +40 TW
    SIZE WINDOW
    BOX FRAME 10 TW
    BOX WIDTH '260.75' MM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
    BOX XPOS '2.0' CM WIDTH 0 TW FRAME 10 TW
    BOX XPOS '10.5' CM WIDTH 0 TW  FRAME 10 TW
    BOX XPOS '11.5' CM WIDTH 0 TW  FRAME 10 TW
    Thanks,
    A.P

    Hi,
    put the box declaration b/w <b>top and endtop</b>.
    <b>/: TOP</b>
    POSITION WINDOW
    POSITION XORIGIN -20 TW YORIGIN -20 TW
    SIZE WIDTH +40 TW HEIGHT +40 TW
    SIZE WINDOW
    BOX FRAME 10 TW
    BOX WIDTH '260.75' MM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
    BOX XPOS '2.0' CM WIDTH 0 TW FRAME 10 TW
    BOX XPOS '10.5' CM WIDTH 0 TW FRAME 10 TW
    BOX XPOS '11.5' CM WIDTH 0 TW FRAME 10 TW
    <b>/: ENDTOP</b>
    Reward if it helps you.
    Regards,
    Sandhya

  • Box in main window extend to next page in sapscript

    Hi all,
    I am trying to put box in main window in sapscript.
    contents of main window extends  to more than 1 page.
    Box  is appearing on first page but is not extending to other pages.
    Pl help,
    Regards
    Senthil

    Hi,
    Please refer this thread.
    Link: [sapscript box nto printed on all pages;
    Hope this will help you.
    Regards,
    Renuka S.

  • DRWAING BOXES IN MAIN WINDOW

    HOW TO DRAW BOXES IN MAIN WINDOW WITH OUT USING BOX XPOS

    u can draw dynamic boxes by using uline n vline options. But it takes a lot of time, and is suggestible only if it is very critical. Just try out.
    By using uline and vline, you can draw lines dynamically. Also u can specify the width too ... eg ... uline(120). Dont forget to specify the font style ans size of the font.

  • Box in main  window of script is not printing

    Helllo Friends
    Box in main window of script is not printing but the same is available in print preview. I have use the following commands.
    Please help me.
    /:           BOX WIDTH '23.40' CM FRAME 20 TW
    /:           BOX XPOS '0.00' CM YPOS '1.40' CM WIDTH '23.40' CM FRAME 25 TW
    /:           BOX XPOS '0.00' CM YPOS '8.10' CM WIDTH '23.40' CM FRAME 25 TW
    /:           BOX XPOS '0.00' CM YPOS '9.00' CM WIDTH '23.40' CM FRAME 25 TW
    /:           SIZE  WIDTH '0.00' CM HEIGHT '8.10' CM
    /:           BOX XPOS '0.00' CM  FRAME 25 TW
    /:           BOX XPOS '0.50' CM  FRAME 10 TW
    Thanks In Advance
    Regards
    SUNITHA

    Try changing X postion to not equal to zero something else for example.
    /:           POSITION WINDOW
    /:           POSITION XORIGIN '-0.1' CH YORIGIN '+0.4' LN
    /:           SIZE WIDTH +0.7 CH HEIGHT +5.0 LN
    /:           BOX FRAME 7 TW
    /:           BOX HEIGHT '1.1' LN INTENSITY 15
    Nabheet

  • Printing digital signature in main window of sapscript at some location

    Hi,
    I want to print graphics in main window in sapscript. I want to position the graphic ( signature) at some position (preferably right aligned ). How to do that? Can we do that in .bmp graphics. In case we use .tiff format , how to do it. Tell me the steps involved as I have never used RSTXLDMC to upload .tiff files.
    Regards,
    D.Mallick

    Hi
    Just open rstxldmc in se38 and execute.
    It will gve you a screen. You need to fill the first two blocks only. Remaining are optional.
    File Name :  Give pathe+name of your .tiff file
    Type         : Bcol for colour     and bmon for mono
    Resolution      : say 75 (as you wish)
    Second block
       Text name :   only replace astrick by your name ZHEX-MACRO- has to be there.
    Actually  this program will convert .tiff file into text file.
    you can include this text file in any window. Text name is the name of the text file generated
    no more changes
    Now execute.
    Now you can use this text file  ZHEX-MACRO-name   in any windoow
    If useful, give me points
    cheers
    vamshi

  • Printing dynamic box in main window in scripts

    hi ,
    I want to print the dynamic box in main window of my script.
    Ex. Suppose the content of the main window is 5 lines so it should print box for 5 those lines only.

    Hi,
    Create a Main window with only 2 lines, Give a BOX command it will give u Border for entire Main window.
    /:BOX FRAME 10 TW
    For giving vertical lines Syntax is
    /:BOX XPOS 16 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    It gives u a vertical line at 16 character. so for ur requirment add another command at another XPOS.
    Try this below just below ur ITEM ELEMENT which has the display fields.
    Main Window
    /E ITEM_A
    A,,,,&ITAB-ABC&,,&ITAB-XXX&,,&ITAB-CDE&,,&ITAB-GEF&
    /:BOX FRAME 10 TW
    /:BOX XPOS 16 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    /:BOX XPOS 26 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    /:BOX XPOS 36 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    /:BOX XPOS 46 CH YPOS 0 LN WIDTH '0' CM HEIGHT 2 LN FRAME 10 TW
    Change XPOS according to ur requirement.
    Now add another main window to the same page with changing UPPER margin, U can add upto 99 Main windows in one page.
    So add upto ur Page is full.
    For headings
    Create a Variable window same as Main window, in place of fields, give descriptions.
    Make sure that u give BOX command below the field declaration, if u give above, for last record it will not print box.
    Regards
    Bala Krishna

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

  • Open a new window, draw boxes in the window, and communicate between the two windows

    I'm going to research this, but figured I'd jump start here in case someone can give me a quick link or point me in the right direction on how to do this while I'm looking.  This is an area of Flex I haven't hit on yet.
    Basically I need to have my flex app (AIR Application) open a new window, allow the user to draw a box on that new window, and then pass the info of the box (X and Y, Width and Height) back to the main window.
    I've never done any of that and am going to try to find out how, but if someone could point me here before I find it online, that would help a great deal, kind of in a time crunch.... thanks.

    You can open the new window as a TitleWindow popup. You can pass info back to the main app using mx.core.Application.application.
    In main app:
    public var windowInfo:Object;
    In popup:
    import mx.core.Application.application;
    private var app:Object = mx.core.Application.application;
    app.windowInfo.x = this.x;
    app.windowInfo.y = this.y;
    app.windowInfo.otherOne = this.otherProp;
    Looking ahead, it is best to pass information between the main app and components using custom components. Below systemManager, popups and the main app are in different display lists, so add event listeners for custom events to systemManager. My Flex Cookbook post on custom events shows this:
    http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postI d=11246
    http://livedocs.adobe.com/flex/3/html/help.html?content=layouts_12.html
    If this post answers your question or helps, please mark it as such.

  • Positioning box in Main Window

    I have a main window (Sapscript) with multiple text elements as follows:
    <Start Text Element1>
    Include statement with varying text length
    <End Text Element1>
    <Start Text Element2>
    Include statement with varying text length
    <End Text Element2>
    <Start Text Element3>
    I need a box to appear here with item header. ****
    <End Text Element3>
    How can I position the box in the 3rd text element section ? The text appearing in Text Element1 & Text Element2 are not fixed in length. I will not know where text element 3 starts.

    Hi...
    You can do like this.
    BOX XPOS  YPOS   WIDTH 10 CM HEIGHT 10 CM
    INCLUDE TEXT
    INCLUDE TEXT
    INCLUDE TEXT.
    Here, you need to change your XPOS and YPOS accordingly
    So that your Third text will be fit in the Box.
    Regards
    Sandeep Reddy.
    Edited by: Sandeep Reddy on Dec 31, 2007 11:34 AM

  • 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

  • Extra boxes when Main Window Overflows

    Hi All,
      I created a table in Main Window, after that i have long texts. If the long text overflows, then i am getting two boxes which are not even present in the form anywhere. I am wondering how to get rid of those two extra boxes. Please help me.
    Thanks,
    Kumar

    Hi Kumar,
    Elobrate it a bit more.
    I couldn't visualize what do you mean by extra box, where exactly they are...before the table/ after the table.
    or extra boxes in one coulm of the table.
    cheers,
    Sai

  • Two different main windows in one form?

    Hello -
    I have a requirement to print a list at the end of an invoice printout.  The invoice can cover multiple pages, and the secondary list can also cover multiple pages, one page per material.  So essentially I need two different definitions of a main window.  I tried defining my form like this:
    Page...............Next Page.......Main Window
    FIRST..............FIRST.............MAIN
    LIST.................LIST...............MAIN_L
    The first part prints fine, but I can't get the second part to print.  I tried adding a command after the first main window to go to page 'LIST', but nothing in window MAIN_L will print.  All the secondary windows on page LIST print, but nothing from MAIN_L. 
    Then I tried changing MAIN_L to be a secondary window and I can see my data, but in this case it will not allow me to enter the command to start a new LIST page. 
    Help!  Is this even possible?
    Edited by: Susanna Kohlmyer on Aug 20, 2008 2:39 PM

    Try to create two Table Nodes in the Same Main window.
    Like:
    FIRST  ... next is FIRST
    .. MAIN
    .... TABLE1
    .......HEADER (table1)
    .......MAIN (table1)
    .......FOOTER (table1)
    .... TABLE2
    .......HEADER (table2)
    .......MAIN (table2)
    .......FOOTER (table2)
    Regards,
    Naimesh Patel

Maybe you are looking for

  • Nokia c5-03 problems

    hello, I'm using nokia c5-03 for almost 6 months. I hav the following problems , which i couldn't find any solutions 1. .mp4 videos are not smooth in my phone even the videos downloaded from nokia ovi store are not playing well. 2. Phone is tooo slow

  • Trying to move iTunes library to new external hard drive

    I'm trying to move my iTunes library to a new, second, external hard drive and I'm not having much luck. I have two G-Tech 500 GB external drives. One is my Time Capsule and the other one I plan to use to house my iTunes and iPhoto libraries -- I wan

  • Several questions about moving iPhoto library from PowerBook G4 to Mac Book Pro.

    Hello, So yes I was running an old PowerBook G4 laptop, had moved my iPhoto library onto a 2 TB external hard drive so I could free up space on my laptop. Now that I have a new Mac Book Pro, I decided to move the library onto it. Everything seems to

  • Block Purchase order

    How to block or delete the Purchase Order? Regards Rekha Sharma

  • OC4J and SSL

    Hi all, I am trying to configure SSL and OC4J (without using Apache!) and am looking for instructions on how to do this. Note that I also don't need the keys to be signed with a certificate either. Please let me know what I have to do to accomplish t