Draw Box Sapscript
Draw Box Sapscript
IF &NEXTPAGE& = 0
BOX FRAME 10 TW
BOX HEIGHT 0.8 CM FRAME 10 TW
BOX HEIGHT 1.9 CM FRAME 10 TW
BOX XPOS 2.5 CM YPOS 0.8 CM WIDTH 1.1 CM HEIGHT 1.9 CM FRAME 10 >
Effect
Additional
XPOS, YPOS, WIDTH, HEIGHT and FRAME always require
specifs.
a measurement and a unit of measurement to be specified. The additional specification
INTENSITY requires the specification of a percent number between 0 and 100.
XPOS, YPOS
Upper left corner of box, based on the values from the POSITION command.
Default: Values from POSITION commandThe following internal calculation rule is
used to determine the absolute output position of a box on the page:
X(abs) = XORIGIN + XPOS
Y(abs) = YORIGIN + YPOS
WIDTH
Width of box
Default: WIDTH value from SIZE command
HEIGHT
Height of box
Default: HEIGHT value from SIZE command
FRAME
Frame thickness
Default: 0 (no frame line)
INTENSITY
Density of the box contents in %
Default: 100 (solid black)
Measurements
Decimal measurements must be enclosed in inverted commas as literals (like ABAP
number constants). The period should be used as the decimal point. Also see the
following examples.
Unit
Valid units of measurement are TW (twip), PT (point), IN (inch), MM (millimeter), CM
(centimeter), LN (line), CH (character). The following conversions apply:
1 TW = 1/20 PT
1 PT = 1/72 IN
1 IN = 2.54 CM
1 CM = 10 MM
1 CH = character height from layout set header (CPI)
1 LN = line height from layout set header (LPI)
/: BOX FRAME 10 TW
Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT)
/: BOX INTENSITY 10
Shades the window background with a density (gray shade) of
10 %
/: BOX HEIGHT 0 TW FRAME 10 TW
Draws a horizontal line at the upper window border over the entire window width
/: BOX WIDTH 0 TW FRAME 10 TW
Draws a vertical line at the left window border over the entire window height
/: BOX WIDTH '17.5' CM HEIGHT '1' CM FRAME 10 TW INTENSITY 15
WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
/: BOX
HJ ,,&V_TOW_TXTD&,,&V_SOP_TXTD&
This finally gives an output of the above Box shown in pic.
Drawing a line. You can draw a line by setting the Height or Weidth to 0
and add a frane. E.g. a horizontal line:
/: SIZE HEIGHT '0' MM WIDTH '200' MM
/: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.81' MM INTENSITY 100
Hi,
Use BOx Syantax How to Draw table in SAPscript ??? Pls Read the description
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).