Variable size of Box in SAP Script

Hi Gurus,
My requirement is to border the data printed in main window with lines. I am using the BOX command but problem is that on every page the number of rows varies. How can I keep the length of the box in main window variable?
Regards,
Charles

printing dynamic box in main window in scripts

Similar Messages

  • How to increase size of check box in sap script

    Hi All,
    I need to include check box in sap script. I included check box using insert>character->sap symbols. I cant able to view check box in print preview but i can able to get check box in print out.Size of check box printed in the paper is not having enough size. I need to increase size of the check box. Give me suggestion for increasing size of check box.
    Regards,
    Peranandam

    Chk the link.
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/80318f454211d189710000e8322d00/frameset.htm

  • How to display Lines and Boxes in SAP Script

    hi,
    Can any one help me how to display Lines and Boxes in SAP Script.
    Regards
    kiran

    The SAP printer drivers based on page-oriented printers use these commands when creating output whereas the line printers and non-supported page-oriented printers ignore these commands.
    Syntax:/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    This command draws a box of the specified size at the specified position.
    The following calculation is performed internally to determine the absolute output position of a box on the page:
    X(abs) = XORIGIN + XPOS
    Y(abs) = YORIGIN + YPOS
    WIDTH determines the width of the box.
    Default: WIDTH value of the SIZE command.
    HEIGHT determines height of the box.
    Default: HEIGHT value of the SIZE command.
    FRAME determines the thickness of frame.
    Default: 0 (no frame).
    INTENSITY determines the box contents as a grayscale percentage.
    Default: 100 (full black)
    The other details I guess is provided by friends who have posted before me.
    Regards,
    K.Sibi

  • Problem printing box in sap script

    i am printing the main window in a box in sap script, the box is appearing on page one but it does not seem to appear on the later pages, how do i get it to appear on all the pages? is there any setting that i'm missing?

    Hi,
    Can you elobrate your question.
    if your question is like this.
    -> You have only one page you are displaying the data in that box and that data is exceeding the main window and printing in
    the second page and you are not getting the BOX in the second page .
    a) If it is your question check whether there is any if condition
    before the BOX command like
    /:   if &page& = 1.
    /:  BOX height 5 ln width 50 ch
    /:   Endif.
    remove the if condition there.
    or
    /E  ele1.
    /:  BOX height 5 ln width 50 ch
    place the Box statement in the first line  of that window.
    -> You have two pages .
    a) If it is so check wheter the box command is there in both
    pages.
    Thanks,
    NN.

  • How to create a box in sap script n footer

    Hi,
    I am working on a Sap Script in which i have to display a box having the decision of crt profile and i don't know how to display it. It is clear that it is to be displayed in the footer of it and the code for that decision is coming from the program.
    plzz provide me guidelines as how to solve this problem.

    To draw a box, try this syntax.
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
    example:
    /: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.18' MM INTENSITY 100.
    /: POSITION XORIGIN '11.21' MM YORIGIN '5.13' MM.
    /: SIZE HEIGHT '120' MM WIDTH '90' MM.
    Regards,
    Joan

  • Unequal height in BOX in SAP Script??

    Hi Experts,
    In the SAP Script, am defining a BOX with the below code,
    /: POSITION WINDOW
    /: POSITION XORIGIN '-0.5' CH YORIGIN '-0.25' LN
    /: SIZE WIDTH '+0.4' CH HEIGHT +2 LN
    /:BOX FRAME 10 TW
    /:BOX HEIGHT '1.7' LN INTENSITY 20
    WINDOW size is,
    left: 50 CH
    upper: 14 LN
    width: 28 CH
    height: 11 LN
    am getting the print it as below,
                              I
                              I
    I                         I
    I                         I
    I                         I
    I                         I
    I                         I
    I----
    I
    left and right vertical lines are continuous lines, as my laptop dont hv required keys, am typing just upper case "i", so, actually, there is no gap, think that, its a continuoas vertical line
    issue: when u see the left vertical column(height), its 6 hieght, but when u see the right vertical comun its 8 height........so, why the left is shorter than right vertical column?
    thanq
    Edited by: SAP ABAPer on Nov 24, 2008 5:37 PM

    Try merging both BOX commands into one.

  • Problem in creating small box in sap script

    Hi,
    I am working on a sap script in which iwant to create a small on the right hand side of the footer of the script and also want to display the data in that box.
    plzzz provide me guidelines how to solve this problem.

    u can use the BOX command.
    The BOX command draws a box as per the specifications. The x , y co-ordinates are for the upper left corner with reference to the values in the position command. The Position command is used to set  x,y coordinates with respect to the start position.
    plz chk this link:
    how to display Lines and Boxes in SAP Script

  • How to print those check boxes in SAP scripts?

    Hi experts,
    I have to create sap script form in which i have to create check boxes and at run time according to some condition i have to
    check those check boxes.how this can be done?
    Thanks in advance
    Rohit

    Check out the below related threads
    check box
    Re: check box in script
    Regards,
    Santosh

  • How to print check box in sap script

    I have a requirement in SAP Script to print a Check bok.
    I tried using SAP symbols in the script, but it does not print. It inserts <679> for checkbox &  <697> for marked checkbox. Any special command to be passed?
    Regards,
    Prabhu Rajesh.

    Hi,
    Are you sure your printer is capable of printing graphics ?
    Cheers
    Colin.

  • Box in  Sap Script and text within

    Hi,
    I want to create a box at the end of the main window and text within it.
    The main window can end at 1st page itself or it can be extended to second page based on the articles. So the box should appear at the end of the last article in the main window.
    and also i would like to know, how do we write text in a box.
    Could any1 help me out on this.
    Thanks

    You can create a variable window in the main window.
    You can restrict the last item of the main window by varying the size of main window. In your wite-form ,
    CALL FUNCTION 'WRITE_FORM'
          EXPORTING
             element                  = 'ITEM'
          function                 = 'SET'
          type                     = 'BODY'
          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.
    DO this. in the bottom of the main window, create a variable window.
    you can add your text in the variable window inside main window.
    it will be displayed just after the item ends.
    Reagrds,
    Pritha.
    Message was edited by:
            Pritha Agrawal

  • Printing Boxes in sap-script

    Hi,
    I want to display boxes for line items of a purchase order in the output of a sapscript.I wrote the box command under text-element for display line item.Now
    my problem is these boxes should come in output multiple times means how many line items with corresponding line items.
    How i'll be able to do this?Please suggest on this.
    Thanks
    Bprakash Soni

    Hi prakash,
    FORM SCRIPT .
    select single ersda from mara into v_ersda
      WHERE MATNR = IT_MATERIAL-MATNR.
    SELECT pstat
            werks
            EKGRP
            PRCTR
            MINLS
            MAXLS INTO  corresponding fields of TABLE IT_SCRIPT FROM
            MARC
            WHERE MATNR = IT_MATERIAL-MATNR.
    CALL FUNCTION 'OPEN_FORM'
      EXPORTING
       APPLICATION                       = 'TX'
       ARCHIVE_INDEX                     =
       ARCHIVE_PARAMS                    =
       DEVICE                            = 'PRINTER'
       DIALOG                            = 'X'
        FORM                              = 'ZFINAL_13688'
        LANGUAGE                          = SY-LANGU
      EXCEPTIONS
        CANCELED                          = 1
        DEVICE                            = 2
        FORM                              = 3
        OPTIONS                           = 4
        UNCLOSED                          = 5
        MAIL_OPTIONS                      = 6
        ARCHIVE_ERROR                     = 7
        INVALID_FAX_NUMBER                = 8
        MORE_PARAMS_NEEDED_IN_BATCH       = 9
        SPOOL_ERROR                       = 10
        CODEPAGE                          = 11
        OTHERS                            = 12
    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                        = 'TOP'
                        FUNCTION                       = 'SET'
                          TYPE                           = 'TOP'
                          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.
    LOOP AT IT_SCRIPT.
      CALL FUNCTION 'WRITE_FORM'
       EXPORTING
         ELEMENT                        = 'NEW'
        FUNCTION                       = 'SET'
         TYPE                           = 'BODY'
         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.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
    EXCEPTIONS
       UNOPENED                       = 1
       BAD_PAGEFORMAT_FOR_PRINT       = 2
       SEND_ERROR                     = 3
       SPOOL_ERROR                    = 4
       CODEPAGE                       = 5
       OTHERS                         = 6
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.
    /E   TOP
       plant,,status,,GROUP,,Profit,,Min.Size,,Max.Size
    /:   BOX FRAME 10 TW
    /:   BOX YPOS 2 CH HEIGHT 0 CM FRAME 10 TW
    /*   BOX XPOS 15 CH WIDTH 0 CM FRAME 10 TW
    /*   BOX XPOS 28 CH WIDTH 0 CM FRAME 10 TW
    /*   BOX XPOS 35 CH WIDTH 0 CM FRAME 10 TW
    /*   BOX XPOS 42 CH WIDTH 0 CM FRAME 10 TW
    /*   BOX XPOS 55 CH WIDTH 0 CM FRAME 10 TW
    /E   NEW
       &IT_SCRIPT-pstat(C)&,,&IT_SCRIPT-werks(C)&,,
    =    &IT_SCRIPT-EKGRP(C)&,,&IT_SCRIPT-PRCTR(C)&,,
    =    &IT_SCRIPT-MINLS(C)&,,&IT_SCRIPT-MAXLS(C)&
    /:   BOX FRAME 10 TW
    /:   BOX YPOS 2 CH HEIGHT 0 CM FRAME 10 TW
    /:   BOX YPOS 4 CH HEIGHT 0 CM FRAME 10 TW
    /:   BOX XPOS 15 CH WIDTH 0 CM FRAME 10 TW
    /:   BOX XPOS 28 CH WIDTH 0 CM FRAME 10 TW
    /:   BOX XPOS 35 CH WIDTH 0 CM FRAME 10 TW
    /:   BOX XPOS 42 CH WIDTH 0 CM FRAME 10 TW
    /:   BOX XPOS 55 CH WIDTH 0 CM FRAME 10 TW
    do this in main window.
    also write the command
    /:   BOX YPOS 2 CH HEIGHT 0 CM FRAME 10 TW
    as many times as the no. of line items that can fit in the table by increasinf height of box from to 2 to 4 or 6 ...
    hope this helps.
    do reward if helpful.
    regards,
    keerthi.

  • Creating Box in Sap Scripts

    HI Gurus,
    I am working on Check Printing. My issue is that I want to create a box frame  for the Check amount window.
    My Windoys attributes are :
    LEFT MARGIN     : 14.90 cm
    UPPER MARGIN  : 22.20 cm
    WINDOW WIDTH : 3.90 cm
    WINDOW HEIGHT: 1.15 cm
    I want a box frame to be created for the particular window , just like we outline the window in Smartfom.
    How should I wirite the box Command?
    If possible please wrte the code as I am new to scripts.
    Thanks in advance.
    Regards,
    Asish Dash

    Hi,
    /:           POSITION WINDOW
    /:           POSITION XORIGIN '-0.5' CH YORIGIN '-0.25' LN
    /:           SIZE WIDTH '0.5' CH HEIGHT '0.25' LN
    /:           BOX FRAME 10 TW
    /:           BOX HEIGHT '1.7' LN INTENSITY 15
    I guess this will resolve your problem

  • Box in SAP Script

    Hello All ,
    This issue is driving me crazy . In the Layout there are three columns one is Material , 2nd one is  Scanned  and the 3rd one is Scanned By .
    In the Print Preview there are no issues . But in the Actual Print , I am facing 2 issues : -
    1 - A box is getting Printed for Scanned . There is no BOX command or anything in the Script . Where is this Box coming from ?
    2 - I want the Box mentioned in Point 1 . But it is coming after Scanned By . That is , Under Scanned By , I have give line to write name like this
         __________________ and the box is coming after this in the actual Print .
    I am not able to figure out how the box is coming and how it is being positioned .
    Can anyone please help me figure this out .
    Rahul .

    This was because there was <727> in the Script , from where the check box was getting printed .

  • Box in SAP Scripts

    How can I find the height of box which is already defined.
    example : I have
    box 10 TW
    ...Code
    What is this TW ? where can I get the characteristics of this box ?
    Thanks
    Tharani

    Hi
    TW is a unit of measurement to define the frame thickness.
    For more details, see:
    http://help.sap.com/saphelp_46c/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm
    Max
    Message was edited by: max bianchi

  • Sap script creating dynamic box problem

    Hi all,
    I am unable to create dynamic box in sap script.
    Because the printing lines in the main window changing from one customer to another customer.
    So could you please guide me how to create a dynamic box in sap script and also how to know the printing line nunber in main window.
    Advance thanks for your suggestion
    Regards,
    Sudhakar.

    In script form u can write following code
        /:       DEFINE &MY_XPOS& = ' '
        /:       DEFINE &MY_YPOS& = ' '
        /:       DEFINE &MY_HEIGHT& = ' '
        /:       DEFINE &MY_WIDTH& = ' '
        /:       PERFORM GET_BOX_SIZE IN PROGRAM Z_MY_PROG
        /:       CHANGING &MY_XPOS&
        /:       CHANGING &MY_YPOS&
        /:       CHANGING &MY_HEIGHT&
        /:       CHANGING &MY_WIDTH&
        /:       BOX XPOS '&MY_XPOS' MM  YPOS '&MY_YPOS' MM  HEIGHT '&MY_HEIGHT' MM WIDTH '&MY_WIDTH' MM INTENSITY 10 FRAME 0 TW
    In report u can write following code
    Form Get_Box_Size TABLES IN_PAR  STRUCTURE ITCSY
                             OUT_PAR STRUCTURE ITCSY.
         Loop at Out_Par.
              Case Out_Par-Name.
                   When 'MY_XPOS'.
                         Out_Par-Value = 100.
                   When 'MY_YPOS'.
                         Out_Par-Value = 57.
                   When 'MY_HEIGHT'.
                         Out_Par-Value = 300.
                   When 'MY_WIDTH'.
                         Out_Par-Value = 'Does it matter?'.
              EndCase.
              Modify Out_Par.
         EndLoop.
    EndForm.

Maybe you are looking for

  • Report using ALV_List

    I am using a ALV List to display following report. *Material      Material Description     Valuation Class      Stock     * *364             SIKAFILL GREY    3000                   3,000      * *364             SIKAFILL GREY    3001                  

  • Not able to pay manual accrual as part payment

    Dear Gurus I have a Rebate agrrement with manual payment procedure-B-Payment allowed up to the value of the pro forma sett. In sales volume I can see a value of Rs.80K from different billing docuement. I also posted a manual accrual of Rs.50 over and

  • Question about Intel 82801FBM LPC Interface Controller in a Tecra A3X

    I have had to replace the HDD in a A3X. XP pro sp2 loaded fine and all's well but the device mngr is reporting this Intel 82801FBM LPC Interface Controller as an Unknown Device. The Intel Chipset ID Utility identifies this as a component of the Chips

  • Customer classification data from ECC to CRM

    Dear Friends, We have the middleware active between ECC and CRM for customers. Now we have the requirement to download customer  classification data (XD03->Extras->Classification) from ECC to CRM. Please suggest me how we can map this data in CRM and

  • [solved] network

    Hi all, I've been trying to set network working on my desktop but haven't been succeeded till now.. I noticed a weird situation (at least to me) if I do ping google: ping -c 3 www.google.com I'll get in the final statistics time = 11149ms but if I do