Show TOC

New Functions in the SAPscript Editor in Release 3.0

Description

New commands to paint frames, lines and shading in forms

Description

In SAPscript text commands to paint frames, lines, and shading have been implemented in 3.0A. You can set parameters to define the position, size, frame and shading. Within one form you can thus output individual windows or text sections within a window with frames or shading.

The SAP printer drivers based on page printers (HP Laserjet driver, Postscript driver, Kyocera-Prescribe driver) convert these commands during output. All other line printers or page printers not supported in the standard version ignore these commands.
This print output can be displayed in the SAPscript previewer (30A: UNIX-Motif , 30B: WINDOWS, WINDOWS-NT).

Defining frames in a form

The following new text commands are available:


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

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

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






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

Effect

Paints a box with the specified size at the specified position.


Additions

XPOS, YPOS, WIDTH, HEIGHT and FRAME always require that you enter a measurement/unit of measurement. The addition INTENSITY requires that you enter a percentage between 0 and 100.


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

    Internally the following calculation rule applies to determine the absolute output position of a box on a page:
    X(abs) = XORIGIN + XPOS
    Y(abs) = YORIGIN + YPOS
  • WIDTH
    Box width
    Default: WIDTH value from SIZE command
  • HEIGHT
    Box height
    Default: HEIGHT value from SIZE command
  • FRAME
    Frame width
    Default: 0 (no frame)
  • INTENSITY
    Density of shading for box content in %
    Default: 100 (black; solid shading)

Measurements

Decimal measurements must be enclosed in inverted commas (like ABAP/4 numeric constants). The decimal point must be used. Examples:


Unit

Allowed units of measurement: TW (twip), PT (point), IN (inch), MM (millimeter), CM (centimeter), LN (line), CH (character). Conversion:
1 TW = 1/20 PT
1 PT = 1/72 IN
1 IN = 2.54 CM
1 CM = 10 MM
1 CH = character height from form header (CPI)
1 LN = line height from form header (LPI)


Examples


/: BOX FRAME 10 TW

Paints a frame around the current window (frame width 10 TW (= 0.5 PT)


/: BOX INTENSITY 10

Applies grey shading to the window background (density 10 %)


/: BOX HEIGHT 0 TW FRAME 10 TW

Paints a horizontal line at the upper margin over the complete box width


/: BOX WIDTH 0 TW FRAME 10 TW

Paints a vertical line at the left margin over the complete box width


/: 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

Paints a rectangle and two lines to build up a three-column table with emphasized heading


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

Effect

Determines the origin of the coordinate system for the parameters XPOS and YPOS from the BOX command. When a window is started,the POSITION value is set to the upper left corner of the box (default setting).


Additions

If a parameter value has no sign, it is considered as an absolute value, i.e., the values relate to the upper left corner of the output page. If a parameter value has a sign, the new parameter value is calculated relative to the old one. If a parameter is missing,the current parameter value remains unchanged.


  • XORIGIN, YORIGIN
    Origin of the coordinate system
  • WINDOW
    Sets the values for the left and upper margin to the values of the current window (default)
  • PAGE
    Sets the values for the left and upper margin to the values of the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm)

Examples


/: POSITION WINDOW

Sets the coordinate origin to the upper left corner of the window


/: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'

Sets the coordinate origin to 2 cm starting from the left margin of the page and 2.5 CM starting from the upper margin


/: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM

Moves the upper left coordinate origin 1,5cm to the left and 1cm up


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

Effect

Determines the values for the parameters WIDTH and HEIGHT from the BOX command. When a window is started, the SIZE value is set to the values for this window (default).


Additions

If a parameter is missing for the command, the current parameter value remains unchanged. If a parameter value does not have any sign, its value is considered to be an absolute value. If the parameter value contains a sign, the new value of this parameter is considered relative to the old value.


  • WIDTH, HEIGHT
    Dimension of the rectangle or line
  • WINDOW
    Sets the values for width and height to the values of the current window (default)
  • PAGE
    Sets the values for the width and height to the values of the current output page

Examples


/: SIZE WINDOW

Sets WIDTH and HEIGHT to the window dimension


/: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM

Sets WIDTH to 3,5 cm and HEIGHT to 7.6 cm


/: POSITION WINDOW

/: POSITION XORIGIN -20 TW YORIGIN -20 TW

/: SIZE WIDTH +40 TW HEIGHT +40 TW

/: BOX FRAME 10 TW

A frame is applied to the current window. The frame goes beyond the window dimensions in order that the first and lasts text characters are not overwritten.

Changes to the interface

See description.

Changes in procedure

See description.