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

Similar Messages

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

  • Unable to print BSEG-SGTXT in Main window - SAP Script

    Hi
    I have an issue in Scripts.
    I want to print BSEG-SGTXT in my Main Window and below is my code but i am unable to print the text. while debugging, i am getting value in zsgtxt field, but i am unable to get/print in script.
    can any one help me why it's not printing? and plese suggest where it's wrong.
    In Main window:
    /:   PERFORM TEXT IN PROGRAM ZFIGS_CHECK_PRINTING     
    /:   USING &REGUP-BELNR&                              
    /:   CHANGING &ZSGTXT&                                
    /:   ENDPERFORM                                       
    CH   &ZSGTXT&           
    In Subroutine pool:
    FORM text TABLES intab STRUCTURE itcsy
                             outtab STRUCTURE itcsy.
      DATA: zbelnr(10),
            zsgtxt LIKE bseg-sgtxt.
      READ TABLE intab WITH KEY name = 'REGUP-BELNR' .
      IF sy-subrc = 0.
        MOVE intab-value TO zbelnr.
        SELECT SINGLE sgtxt INTO zsgtxt FROM bseg
              WHERE bukrs = '8140' AND
                    belnr = zbelnr.
        IF sy-subrc = 0.
          MOVE zsgtxt TO outtab-value.
          MODIFY outtab INDEX sy-tabix.
        ENDIF.
      ENDIF.
    ENDFORM.
    Thanks,
    Siva

    Hi,
    Can any one tell how to write loop statement in Main window to display BSEG-SGTXT. As i am getting text (BSEG-SGTXT) from subroutine pool and calling into Main window using Perform statement and printing duplicate text in multiple times insted of different text.
    Thanks,
    Siva

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

  • Maintianing multiple line items in main window  in scripts

    Hi folks,
      i want to print multiple line items in main window of script for eg 50 line items then my main window should continue in second page also. how to maintain this.
    can u provide me sample code for this..
    Thx in advance,
    Neelima.N

    You have an internal table with 50 lines, is it correct?
    Let's say, there's a MATNR field in your internal table.
    First do, what I wrote in my previous comment.
    The create an element in yout main window, like this:
    /E LINE_ITEMS
    /  &GS_MAIN-MATNR&
    In your printer program you have to code the following:
    LOOP AT gt_main INTO gs_main.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    WINDOW = 'MAIN'
    ELEMENT = 'LINE_ITEMS'.
    ENDLOOP.
    This code will loop all 50 of your table entries.
    In the MAIN window will fit 30 entries.
    When the LOOP is reaching the 30th entry, SAP will automatically create a new page (because of the NEXT PAGE statement you set in the page settings in the SAPScript) and will continue the printing.
    Regards
    Tamá

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

  • 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

  • How to create an Area and place main windows in scripts

    How to create an Area and place main windows in scripts ?

    hi prasad,
    jst create a page first and define page windows.
    here u can specicify whether the window is main or secondary.
    to adjust the window goto form  painter  do the adjustment.

  • Printing from FLASH without "Print dialog Box" Pop-up window?

    hi guys,
    i got a flash + OSX question, maybe someone can help me,
    i'm working on a Adobe Flash (Flash version 9, actionScript
    3) project, running on a MacOS X 10.4, on a core2duo iMac, it is
    connected to a printer (Xerox Phaser 6360).
    - the flash will be displayed in full screen.
    - it is a "create your own postcard- &- print it out"
    flash-based multimedia project.
    - so Flash will need to print stuff.
    issue is:
    - everytime when something need to be printed, macOS X will
    prompt a "Print Box" pop-up window say Cancel or Print (see my jpeg
    below).
    - so it might overlap on top of my Flash project, which is
    running full screen (so having the pop-up window overlapping my
    flash is no good).
    so i need a solution to avoid this, any idea?
    what i can think of are:
    A- is there a way to avoid/by-pass this step? meaning a way
    not to show this?
    or
    B- or is there a shareware/way to "auto-click RETURN button"
    so even this screen appear it will be "auto-click" away.
    or ..C?
    i knew there is a Plug-in (or Xtra) for Macromedia Director
    called: Print-o-matic,
    the URL is:
    http://www.printomatic.com/products.cfm/
    it work well on the Director on Mac OS7, but they only made
    it for Director & Authorware, not Flash :-( do you know
    something similar for Flash?
    this
    is the pop-up Print dialog box i meant (which i want to avoid),
    click to view
    or u can copy the URL to view there:
    http://photos-g.ak.facebook.com/photos-ak-sf2p/v193/184/11/743997016/n743997016_546542_881 6.jpg
    about the printer URL:
    [url=http://www.office.xerox.com/printers/color-printers/phaser-6360/enus.html]High
    speed color for high volume printing - Phaser 6360[/url]
    hope i'm able to get a solution here.
    thanks guys,
    cheers,
    tintoy

    quote:
    Originally posted by:
    actiontintoy
    so does anyone got any solution for this issue?
    which is:
    able to print without showing the "print dialog box" pop-up
    window,
    pr any other way to by-pass the pop-up window,
    thanks.
    BTW, i'm adobe Flash + mac OS X 10.4
    Hi...did you solve the problem?
    Would you mind telling me how to disable print dialog?
    Thanks!!!

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

  • Possible to print Int.Tab data in a window other than MAIN window in Script

    Hi,
      Can we print a internal table data in a window which is a VARIABLE Window in SAP Script? my requirement is not to print in MAIN Window.
    Thanks in Advance,
    Jakeer.

    Hi,
    You can do that.But main window is must.
    Create a text element and please check it maynot overflow if so data will be truncated.
    For not printing main window :
    Do one thing set the main window margint to the botom of the form.
    Then create a text element in main element
    NEW             
    NEW-PAGE        
    NEXT            
    NEW-PAGE = 'NEXT'

  • SAP Script: Printing the signature on main window at the end

    Hi,
    I am working on a SAP Script (Benefits enrollment form HR_BEN_ENRO).  I copied the HR_BEN_ENRO into ZHR_BEN_ENRO and making the necessary changes without modifying the driver program.
    The problem I am facing is as follows:
    In the main window there are so many Text elements.  At the end of the main window, after the last text element, I have put some text using Include statement.  The last text element is getting triggered for some employees and hence the text underneeth that is printing, but for some employees the last element is not triggering and hence nothing is printing underneeth that.
    Is there any solution to print the this text at the end of main window after printing all the remaining information.
    I also tried using BOTTOM & ENDBOTTOM. But in this case I don't know how to check that I am in last page of the main window.  I tried the following way:
    /: BOTTOM
    /: IF &PAGE& = SAPSCRIPT-FORMPAGES&
    SIGNATURE:__________   Date:__________
    /: ENDIF
    /: ENDBOTTOM
    In this case the value I am getting for &SAPSCRIPT-FORMPAGES& is 0 (zero).
    Any solution..please.
    Appreciate.

    How to link the ZHR_BEN_ENROL instead of HR_BEN_ENRO?
    I mean when I execute the TCODE: HRBEN0001 and select particular employee and click on Print form under Offer Selection area. Then standard program calls HR_BEN_ENRO. How to replace it with Zform?
    Thanks in advance.
    Regards,
    Krishna

  • 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

  • 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

Maybe you are looking for

  • Possible Wifi Solution

    K - had this **** thing 2 days - driving me nuts w/ the wifi drops (and can't connect to my other network... another issue not yet resolved). But, changed it to a static IP address - that seems to have helped a lot. And.... here is the vodoo entry, a

  • Custom META attribute

    Hi, I've looked at HTML source of a Standard Portal page and I saw that some META tags describing current page are present: <META name="title" content="News"> <META name="description" content="News page of my Website"> <META name="keywords" content="

  • End User Tables

    hello , i have installed Oracle Discoverer 10 g for our Oracle EBS 11i, when i try to connect through apps user in Discoverer Desktop it says that Apps user cant use End USer Tables, Please reply that how can i give privilege to apps user from Discov

  • How to make the white poly-carb glossy/shiny again?

    I've wiped it down with water, and it still isn't the way I'd like it to be. It looks dull. It could be the scratches, though. Anyone?

  • How do I get an arrayList from an external class

    I have 3 classes. 1 is used to create a contact object. 2 is for my GUI 3 Does all the buisness logic. I need to get an updated arrayList back from class 3 to display the contents in my GUI class. Can someone give me a snipet. I know hat to do from t