cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in printing BOX command in SAP Script

Former Member
0 Kudos

Hello all,

We are facing an issue while printing BOX command in SAP script.

The user's requirement is that, he needs a fixed main window size even if there is only one line item while printing details abt purchase order.

For this, we have created a another fixed(CONST) window of the same size as MAIN window.

In this window , we have used BOX commands to print the vertical lines.

The problem now is, though the print preview of the form looks good, but when we take a print out, the vertical lines are getting displayed only upto the items.(lines are getting cut)

We need the vertical lines for the whole window.

If any one has any pointers with respect to this issue, kindly help us out.

Also, if possible kindly mail to the ID given below.

Thanks & Regards

Prathibha Jangam

mailto:prathibha_jangam@infosys.com

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi all,

Thanks for all ur response.

But, considering another element in the MAIN window where all the BOX commands have been placed was tried by us.

This did not solve our problem.

The issue is with the printout of the form, while the preview in the system looks absolutely perfect.

I would also like to know, if this could be a printer problem?

Please let us know if anyone has a solution for the same.

Thanks,

Prathibha.

Former Member
0 Kudos

Hello,

When u are using box u may some time face this problem.

Just read this OSS notes.

Symptom

When SAPscript documents are printed with a device type that is controlled by the printer driver STN2 (the so called standard driver for line printer) the texts are subject to strange shifts: texts that should be printed apart are all printed together in the same line, and so on.

The text is shifted out to the right, which should actually be located in the middle.

Additional key words

STN2, standard driver, SAPscript, print

Cause and prerequisites

In SPAD (Spool administration), it can be determined whether the device type which is used for the printer (for example, LP01) uses the SAPscript printer driver STN2: The device type which is allocated to the output device, for example IBM6408, is located in the list of the output devices. Now, you will find the field "Printer driver" in the list of device types, when you choose the IBM6408. If "STN2" is there, then this note is correct.

Fundamentally, the printer driver STN2, which can be used for all line printers, is less capable of printing things as they should be printed than other printer drivers. The following characteristics of an SAPscript form can only be returned inefficiently or not at all by the STN2 driver:

BOX command for the sign of frames/lines: Not supported

HEX...ENDHEX command for graphics: Not supported

Non-integral line spacing: Not supported

Overlapping texts: Not supported

The STN2 printer driver cannot position texts which are to be delivered to every possible position on the paper such as other printer drivers can (since there is no universal print command for this characteristic for line printers). Rather, every form is delivered in the same manner as a typing machine, from the above left hand corner and then until the right hand corner, where a uniformed line spacing (normally 6 LPI) is used. "Half line feeds" are not possible here, so texts may possibly slide 'to the bottom'.

Shifts occur in the same way if one line texts are described in the form as easily overlapping. In this case, the text with the smaller X position is distributed, and afterwards, the text with the larger starting point, which, under these circumstances, is positioned very wide 'to the right', and in this case,is even outside the frame of the paper and therefore, it is no longer visible in the expression.

Problems with line spacing or "strange" line breaks:

This printer driver cannot deal with non-integral line spacings. This is determined by the way the printer works and cannot be changed.

The paragraph definition (line spacing) or the line spacing in the header data in the SAPscript form must be changed here in order to correct the problem.

Example: If a standard line spacing of 6 lines per inch is defined in a layout set, the lines can only be issued in this raster. Line spacings of less than 1/6th of an inch cannot be realized instead, the text from two lines is grouped together. Line breaks and vertical shifts might result from this.

Problems with line spacings and/or "strange" horizontal positionings:

The printer driver STN2 is not able to convert non-integral character spacings and therefore, it is not able to address horizontal positions (for example, tabulators) on the page "exactely". This is determined by the way the printer works and cannot be changed. You will have to change the paragraph definition (tabulator position), the font, or the window position in the SAPscript layout set to solve the problem.

Example: If a standard line spacing of 10 characters per inch is defined for a layout set, the first print position in a line can only start within this raster. If the character spacing is changed within the line because of a font change (for example, to 12 cpi), you will have to position in this changed raster at once. As opposed to all other printer drivers (HPL2, POST, PRES, SWIN), STN2 is not able to print overlapping text instead, text is shifted to the right or left (or it might also be shifted down to the next line). "Strange" horizontal positions of text sections might be the result.

Solution

1. Do not use line spacings in the layout set other than 1, 2, 3, and so on when printing with a device type that has a STN2 driver.

2. Change the fonts as little as possible (the best would be, if you would not change them at all) in the layout set where tabulators are used.

3. Enter only 6 lines/inch (LPI), 10 characters/inch (CPI) in the header data of the layout set.

Regards

Former Member
0 Kudos

I think no need of seperate window for this case.

Any way can u explain ur issue in detail to the following mail id.

ravindranath.k@in.bosch.com

Regards

Former Member
0 Kudos

Hi,

use box command in main window

BOX YPOS '1.0' CM WIDTH '128.0' CH HEIGHT '4.0' CM

FRAME 10 TW

Regards,

Amole

Former Member
0 Kudos

No need to have a seperate window inorder to display lines.

Have a text element with in the main window which is having the Box command and items to b displyed in the main window.

This will work.

Dharani.

Former Member
0 Kudos

hi,

You dont have to declare a separate window. Remove the constant window and place the lines using box command in the main window itself. this will solve your problem.

Regards,

Richa