cancel
Showing results for 
Search instead for 
Did you mean: 

No output frame lines in SAPScript

Former Member
0 Kudos

Hi Guys,

I have compeleted creating a PO form (SAPScript) and I was able to print . However, the lines/outline of the frames in the windows were not printed.

I used EPSON LQ-2180 which has a device type of EPESCP2.

Do you know how can I print the frame lines?

Please guide me on what to do.

Thank you very much in advance!

Regards,

Reymar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

It looks like you're drawing over-lapping boxes, which could be a problem. Try drawing a single box with individual vertical lines divvying it up like this:

/: POSITION WINDOW

/: POSITION YORIGIN 23 MM

/* Main box

/: BOX XPOS 0 MM WIDTH 190 MM HEIGHT 7 MM FRAME 20 TW

/* Vertical lines

/: BOX XPOS 10 MM WIDTH 0 MM HEIGHT 7 MM FRAME 20 TW

/: BOX XPOS 28 MM WIDTH 0 MM HEIGHT 7 MM FRAME 20 TW

/: BOX XPOS 86 MM WIDTH 0 MM HEIGHT 7 MM FRAME 20 TW

/: BOX XPOS 95 MM WIDTH 0 MM HEIGHT 7 MM FRAME 20 TW

/: BOX XPOS 115 MM WIDTH 0 MM HEIGHT 7 MM FRAME 20 TW

/: BOX XPOS 155 MM WIDTH 0 MM HEIGHT 7 MM FRAME 20 TW

Answers (3)

Answers (3)

Former Member
0 Kudos

Please post your BOX command

Try increasing the FRAME value, I find some printers won't show anything under 20 TW. And I had one that wouldn't show 15 but would show 10 and 20.

Former Member
0 Kudos

Hi Michael,

Please see the codes below:

/: POSITION WINDOW

/: BOX XPOS 0 MM YPOS 23 MM WIDTH 190 MM HEIGHT 7 MM FRAME 20 TW

/: BOX XPOS 0 MM YPOS 23 MM WIDTH 10 MM HEIGHT 7 MM FRAME 20 TW

/: BOX XPOS 0 MM YPOS 23 MM WIDTH 28 MM HEIGHT 7 MM FRAME 20 TW

/: BOX XPOS 0 MM YPOS 23 MM WIDTH 86 MM HEIGHT 7 MM FRAME 20 TW

/: BOX XPOS 0 MM YPOS 23 MM WIDTH 95 MM HEIGHT 7 MM FRAME 20 TW

/: BOX XPOS 0 MM YPOS 23 MM WIDTH 115 MM HEIGHT 7 MM FRAME 20 TW

/: BOX XPOS 0 MM YPOS 23 MM WIDTH 155 MM HEIGHT 7 MM FRAME 20 TW

ZI ,,Item,, Item No.,,Item Description,,U/M,,Quantity,,Net =Price,,Total

I've used a 20-TW frame value. But when I tried to print the form again, still, there are no line frames printed.

Thank you very much for your reply. I hope you could add some light on this.

Regards,

Reymar

Former Member
0 Kudos

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.

Pre-Setting BOX Position Arguments

You can use the POSITION and SIZE commands to preset some arguments in the BOX command. POSITION presets the start point (upper left corner) of a box or line. SIZE specifies the width and height of a box.

You can use POSITION and SIZE to preset arguments, but you can also set the start point and size arguments of a box or line directly in the BOX command.

By default, if no positioning is specified, the upper left corner of a box or halftone or the top of a line is aligned with current SAPscript window. That is, the upper left corner of the box, halftone, or line starts at the upper left corner of the current window in the active form. By default, the height and width of a box are set to the height and width of the current window.

Use POSITION and SIZE to preset the arguments in a BOX command in the following situations:

The BOX command exceeds the 132-character (1 line in SAPscript) length limitation if you specify all arguments directly in the command. You may exceed this length limit if, for example, you use symbols in a command.

By pre-setting arguments with POSITION and SIZE, you can work around the limitation on the length of a command. You do not need to specify the preset arguments in the BOX command.

You want to use the enhanced capabilities of POSITION for adjusting the starting point of a box or line.

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

Thanks for that.

But I already did the BOX command.

During print preview, the box/frames are properly drawn. But during printing, these lines/frames/boxes are not printed.

Did I miss some settings?

Thanks again,

Reymar

Former Member
0 Kudos

Theres not much u can do abt this in your script mate. If the print preview is coming correct, then u mayb have to get a page format created according to your settings. Let me know how it goes...But be rest assured that ur script is right, and there is nothing more required in it.

Thanks

Nayan

Former Member
0 Kudos

Hi Nayan,

I actually made a Zformat for this. Its format type is 'Format type for SAPScript'.

Do I need to configure the Print Controls for these?

Thanks,

Reymar

Former Member
0 Kudos

When u create a script, you define PAge Format there. Check the page format that you are using in the script. When u create a new page format for getting the print, keep the size of the paper same, both height and width...

If you have the BASIS guys around, they would be able to help you regarding this...

Nayan

Former Member
0 Kudos

Hi Nayan,

I actually have no problem with the assignment of format to the device type and to the output device.

The print preview shows the correct format including the frames/lines, fonts and spacing.

I think this is more on the printer side. This printer is a dot-matrix type.

Is there any other thing I missed regarding my SAPScript printing?

Regards,

Reymar

Former Member
0 Kudos

create box.