Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

sapscript

Former Member
0 Likes
589

HI ,

I need to draw a box and inside the box , i need to fill fields fetched from table VBAP.the size of the box should varying depending on the no. of the records in table VBAP. at the end of this box ,i need to draw small box for total.This all should be done in SAPSCRIPT.For the box,i can use BOX command.

But please kindly clarify it with command

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
562

Draw a box around your main window, as the min window has the ability to expand dynamically.you can do this by specifyting the BOX command as mentioned below.

After creating the main window,spcify the box command as follows:

/: BOX FRAME 10 TW

This command draws a outline to your main window.

If you want draw vertical lines then use this command.

/: BOX XPOS 0 CH WIDTH 15 CH FRAME 10 TW

/: BOX XPOS 0 CH WIDTH 30 CH FRAME 10 TW

These two commands will draw two boxes in side your box which is created above.

1st command draws a box with the width of 15 characters starting from left margin of the box(XPOS 0).height is of box height.

2nd command draws a box with the width of 30 characters starting from left margin of the box(XPOS 0).height is of box height.

You can draw as many no of boxes as u want in this way.

To print the total you just create 1 more window of your own size and spcify the 1st box comamns which i have mentioned above.

There are so many ways to create Boxes.I just gave you the simple idea.

You can use different combinations that are provided by Vijay Babu Dudla.

2 REPLIES 2
Read only

Former Member
0 Likes
562

BOX, POSITION, SIZE: Boxes, lines, shading

The BOX, POSITION and SIZE commands are for drawing boxes, lines and shadows. These commands can be used to specify that within any particular layout set, window or passage of window text can be output in a frame or with shadowing.

The SAP printer drivers that are based on page-oriented printers (the HP LaserJet PCL-5 driver HPLJ4, the

Postscript driver POST, the Kyocera Prescribe driver PRES) employ these commands when creating output. Line printers and non-supported page-oriented printers ignore these commands. The resulting output may be viewed in the SAPscript print previewer.

Syntax:

1. /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]

2. /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]

3. /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]

BOX

Syntax:

/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]

Effect: draws a box of the specified size at the specified position.

Parameters: For each parameter (XPOS, YPOS, WIDTH, HEIGHT and FRAME), both a measurement and a unit of measure must be specified. The INTENSITY parameter should be entered as a percentage between 0 and 100.

•XPOS, YPOS: Upper left corner of the box, relative to the values of the POSITION command.

Default: Values specified in the POSITION command.

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: Width of the box.

Default: WIDTH value of the SIZE command.

•HEIGHT: Height of the box.

Default: HEIGHT value of the SIZE command.

•FRAME: Thickness of frame.

Default: 0 (no frame).

•INTENSITY: Grayscale of box contents as %.

Default: 100 (full black)

Measurements: Decimal numbers must be specified as literal values (like ABAP/4 numeric constants) by being enclosed in inverted commas. The period should be used as the decimal point character. See also the examples listed below.

Units of measure: The following units of measure may be used:

•TW (twip)

•PT (point)

•IN (inch)

•MM (millimeter)

•CM (centimeter)

•LN (line)

•CH (character).

The following conversion factors apply:

•1 TW = 1/20 PT

•1 PT = 1/72 IN

•1 IN = 2.54 CM

•1 CM = 10 MM

•1 CH = height of a character relative to the CPI specification in the layout set header

•1 LN = height of a line relative to the LPI specification in the layout set header

Examples:

/: BOX FRAME 10 TW

Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).

/: BOX INTENSITY 10

Fills the window background with shadowing having a gray scale of 10 %.

/: BOX HEIGHT 0 TW FRAME 10 TW

Draws a horizontal line across the complete top edge of the window.

/: BOX WIDTH 0 TW FRAME 10 TW

Draws a vertical line along the complete height of the left hand edge of the window.

/: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15

/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW

/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW

/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW

Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.

Read only

Former Member
0 Likes
563

Draw a box around your main window, as the min window has the ability to expand dynamically.you can do this by specifyting the BOX command as mentioned below.

After creating the main window,spcify the box command as follows:

/: BOX FRAME 10 TW

This command draws a outline to your main window.

If you want draw vertical lines then use this command.

/: BOX XPOS 0 CH WIDTH 15 CH FRAME 10 TW

/: BOX XPOS 0 CH WIDTH 30 CH FRAME 10 TW

These two commands will draw two boxes in side your box which is created above.

1st command draws a box with the width of 15 characters starting from left margin of the box(XPOS 0).height is of box height.

2nd command draws a box with the width of 30 characters starting from left margin of the box(XPOS 0).height is of box height.

You can draw as many no of boxes as u want in this way.

To print the total you just create 1 more window of your own size and spcify the 1st box comamns which i have mentioned above.

There are so many ways to create Boxes.I just gave you the simple idea.

You can use different combinations that are provided by Vijay Babu Dudla.