cancel
Showing results for 
Search instead for 
Did you mean: 

xpos ypos

Former Member
0 Kudos
1,460

hi,

what is xpos ypos in box [xpos] [ypos]? are they same as [xorigin] [yorigin] for position?

can explain with a simple example? thanks

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

xpos ,ypos are not same as xorigin yorigin they r the distance from xorigin,yorigin xabs,yabs is the point of display then

xabs = xorigin + xpos,

yabs = yorigin + ypos.

I think this will help u.

Regards,

S.Ravi Kumar

Former Member
0 Kudos

As per the screen resolution is concerned, XPOS and YPOS starts at top left corner of the screen.

XPOS increases horizatally to right side.

YPOS increses vertically to bottom side.

I think this explanation is enough for ur concept.

Regards,

Sujatha.

Former Member
0 Kudos

hi

good

The SAP printer drivers based on page printers (HP Laserjet driver, Postscript driver, Kyocera Prescribe driver) convert this command during output. All other line printers or page printers not supported in the standard version ignore these commands.

This printout can be displayed in the SAPscript previewer (30A: UNIX Motif , 30B: DOS, NT WINDOWS).

How are the borders defined in the layout set?

Using the following new text commands:

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

Draws a box at this position with the specified size.

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 command

The 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)

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

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

/: 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 three-column table with a highlighted heading line

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 the window is output, the POSITION value is set to the upper left corner point of the window (default setting).

Additional

If a parameter value does not have a sign, its value is

specifs.

regarded as an absolute value, this means the values refer to the upper left corner point of the output page. If a parameter value does have a sign, the new value of this parameter is calculated relative to the old value. If a parameter is missing, the current value of this parameter is not changed.

XORIGIN, YORIGIN

Origin of the coordinate system

WINDOW

Sets the values for left and upper border to the values of the current window (default setting)

PAGE

Sets the values for left and upper border 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 window corner point

/: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'

Sets the coordinate origin to 2 CM measured from the left page border and 2.5 CM measured from the upper page border

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

Moves the upper left coordinate origin 1.5 cm to the left and 1 cm 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 output, the SIZE value is set to the corresponding values of this window (default setting).

Additional

If a parameter is missing in the command, the current value

specifs.

of this parameter is not changed. If a parameter value does not contain a sign, its value is regarded as an absolute value. If a parameter value does contain a sign, the new value of this parameter is calculated relative to the old value.

WIDTH, HEIGHT

Dimension of the rectangle or line

WINDOW

Sets the values for width and height to the corresponding values of the current window (default setting)

PAGE

Sets the values for width and height to the corresponding values of the current output page

Examples

/: SIZE WINDOW

Sets WIDTH and HEIGHT to the window dimensions

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

The current window is framed. The frame projects beyond the beginning of the window so that the first and last text characters are not overwritten.

thanks

mrutyun^

Former Member
0 Kudos

hi

With BOX, you can specify an offset for the starting point only as a whole number (non-negative integer). This command would print a box starting 1 CM to the right and 1 CM down from the left upper corner of a window:

/: BOX XPOS '1' CM YPOS '1' CM

With POSITION; you can adjust the position of a line or box relative to a window much more precisely. In the POSITION command, you can specify positive and negative offsets and use non-integer numbers.

Example: The commands shown below position a box slightly to the left and slightly above a window. This leaves a margin between the edge of the box and the text in the window.

/: POSITION XORIGIN '-.2' CM YORIGIN '-.2' CM

/: SIZE WIDTH '.2' CM HEIGHT '.2' CM

/: BOX FRAME 10 TW

(Note that the box must be enlarged to accommodate the shift. If it is not enlarged, then it will not cover all of the window.)

You can also use POSITION to set the starting point to the upper left corner of the active page format. Example: POSITION PAGE moves the starting point from the active window to the active page format.

You want to use the relative sizing capabilities of SIZE to adjust the size of a box, line, or halftone.

With BOX, you can make only absolute size specifications. BOX HEIGHT, for example, overrides the default height setting to the height of the current window.

With SIZE, you can adjust the size of a box or a line with respect to its previously-set dimensions. The following commands would, for example, draw a frame 1 CM in from the margins of the paper:

/: POSITION PAGE

/: POSITION XORIGIN 1 CM YORIGIN 1 CM

/: SIZE PAGE

/: SIZE HEIGHT '-2' CM WIDTH '-2' CM

Former Member
0 Kudos

Hi,

Yes, they are X and Y co ordinates:

BOX XPOS '20' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW

BOX XPOS '45' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW

BOX XPOS '80' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW

BOX XPOS '120' MM WIDTH 0 TW HEIGHT '140' MM FRAME 10 TW

Reward if useful.

regards,

Anji

Former Member
0 Kudos

Hello,

Check this:


Boxes, Lines, Shading: BOX, POSITION, SIZE 

Use the BOX, POSITION, and SIZE commands for drawing boxes, lines, and shading to print particular windows within a form or passages of text within a window in a frame or with shading.

The SAP printer drivers that are based on page-oriented printers (the HP LaserJet driver HPL2, the Postscript driver POST, the Kyocera Prescribe driver PRES) employ these commands when printing. Line printers and page-oriented printers not supported in the standard ignore these commands. You can view the resulting printer output in the SAPscript print preview.

Syntax:

/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY] 
/: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE] 
/: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
BOX Command

Syntax

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

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

Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT, and FRAME, you must specify both a measurement and a unit of measurement. Specify the INTENSITY parameter 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: You must specify decimal numbers as literal values (like ABAP numeric constants) by enclosing them in inverted commas. Use the period as the decimal point character. See also the examples listed below.

Units of measurement: The following units of measurement 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 form header 
1 LN = height of a line relative to the LPI specification in the form header


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

POSITION Command

Syntax

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

Effect: Sets the origin for the coordinate system used by the XPOS and YPOS parameters of the BOX command. When a window is first started, the POSITION value is set to refer to the upper left corner of the window (default setting).

Parameters: If a parameter value does not have a leading sign, then its value is interpreted as an absolute value, in other words, as a value that specifies an offset from the upper left corner of the output page. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value. If one of the parameter specifications is missing, then no change is made to this parameter.

XORIGIN, YORIGIN

Origin of the coordinate system.

WINDOW

Sets the values for the left and upper edges to match those of the current window (default setting).

PAGE

Sets the values for the left and upper edges to match those of the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm).



/: POSITION WINDOW 

Sets the origin for the coordinate system to the upper left corner of the window.

/: POSITION XORIGIN 2 CM YORIGIN '2.5 CM' 

Sets the origin for the coordinate system to a point 2 cm from the left edge and 2.5 cm from the upper edge of the output page.

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

Shifts the origin for the coordinates 1.5 cm to the left and 1 cm up.

SIZE Command

Syntax

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

Effect: Sets the values of the WIDTH and HEIGHT parameters used in the BOX command. When a window is first started, the SIZE value is set to the same values as the window itself (default setting).

Parameters: If one of the parameter specifications is missing, then no change is made to the current value of this parameter. If a parameter value does not have a leading sign, then its value is interpreted as an absolute value. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value.

WIDTH, HEIGHT

Dimensions of the rectangle or line.

WINDOW

Sets the values for the width and height to the values of the current window (default setting).

PAGE

Sets the values for the width and height to the values of the current output page.

 



/: SIZE WINDOW

Sets WIDTH and HEIGHT to the current window dimensions.

/: 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 added to the current window. The edges of the frame extend beyond the edges of the window itself, so as to avoid obscuring the leading and trailing text characters.

If useful reward.

Vasanth