Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Zebra Printer

Former Member
0 Likes
2,420

Every time the material is released from QA, lables are printed for that material in the quantity determined by the GR slipno. in the material master.

Now sometimes, it shows the SAP print spool of the zebra printer with the right quantity but prints much more than that.

Like if in the spool it shows 193, it actually printed 300 until the printer was out of paper.

I was looking at the form which i developed and the print program but could not find anything.

The real problem is that how can the no. of pages different from the spool.

And there is only one output request / spool request.

Has anyone came across the same situation ?

This usually happens when the print quantity is more than 100.

Any help will be greatly appreciated and awarded fully.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,300

Hai

You dont need a Zebra bar one tool for printing graphics from smartforms. You need to have propers

drivers and proper settings in place. Take a look at the OSS notes 750772 - Information on the ZPL-II

printer driver for SmartForms

Check the point 5 in the above oss notes:

5) Support of bitmap graphics

Colored bitmap graphics from SmartForms are changed to black and white when you print

from the LZPL printer driver. If the picture quality is affected by this conversion,

change the graphic to B/W with a graphics program (such as PaintShop Pro), and import

it to SmartForms as as a black and white graphic. Monochrome graphics are not converted

by the driver. However, all graphics may be justified to adjust the size of the graphic

to the printer resolution (203, 300 or 600 dpi).

During the import to SmartForms, you have the option to flag a bitmap as "resident".

In this case, the LZPL printer driver saves the graphic in the RAM of the printer when

it first occurs (Device "R:" of the zebra printer). At the end of the spool request,

the driver deletes the graphic again from the printer's RAM, so that no more memory

remains occupied.

Resident graphics during label printing from SmartForms are therefore only faster

if more than one label is printed within a spool request, and the resident graphic

is repeated on each label.

Thanks & regards

Sreenivasulu P

17 REPLIES 17
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,300

Can you please post the print program. Also the code inside the MAIN window of your form.

Regards,

Rich Heilman

Read only

0 Likes
2,300

Here is my sapscript code.

^XA

DFTESTFS

LH0,0FS

^LL813

^PW610

^MD0

^MNY

LH0,0FS

FO461,125A0R,33,28CI13FRFDItem Code:FS

FO461,309A0R,34,28CI13FRFN992FS

FO400,125A0R,33,28CI13FRFDDescription:FS

FO400,309A0R,34,28CI13FR^ FN999^FS

FO325,125A0R,50,40CI13FRFDControl No.:FS

FO325,320A0R,50,40CI13FRFN993FS

FO225,310A0R,60,88CI13FRFDRELEASEDFS

FO125,125A0R,33,28CI13FR^FDBy: ^FS

FO125,200A0R,34,28CI13FRFN994FS

FO70,125A0R,33,28CI13FRFDDate:FS

FO70,200A0R,34,28CI13FRFN995FS

F O125,450A0R,33,28CI13FRFDRe-Test Date:FS

FO125,630A0R,34,28CI13FRFN996FS

FO70,450A0R,33,28CI13FRFDInspection Lot:FS

FO70,630A0R,34,28CI13FRFN991FS

^XZ

NEW-PAGE

^XA

^XFTEST

FN999FD^FS

FN998FD^FS

FN997FD^FS

FN996FD^FS

FN995FD^FS

FN994FD^FS

FN993FD^FS

FN992FD^FS

FN991FD^FS

^PQ1,0,0,N

^XZ

^FX End of job

Print Program Code:

Standard Printing program is SAPM07DR. I copied it to Z program. Replaced the include M07DRAUS with ZM07DRAUS. And changed the following subroutine.

form ausgabe_we01.

data: v_wesch like mara-wesch,

zwesch like mara-wesch,

v_loop type i.

  • Changes by SAFZAL - 03/08/06

  • Limit the printing to material types packaging,Raw and Intermediates

ranges: r_mtart for mara-mtart .

r_mtart-sign = 'I'.

r_mtart-option = 'EQ'.

r_mtart-low = 'ZPAK'.

append r_mtart.

r_mtart-low = 'ZRAW'.

append r_mtart.

r_mtart-low = 'ZINT'.

append r_mtart.

clear r_mtart.

  • end of changes - safzal

perform open_form.

*commented & code added by Sujit- 11/10/2004

  • IF not t159p-xmehr is initial.

  • IF mseg-weanz gt 0.

  • anzahl = mseg-weanz.

  • ELSE.

  • anzahl = 1.

  • ENDIF.

  • ELSE.

  • anzahl = 1.

  • ENDIF.

select single wesch

into zwesch

from mara

where matnr eq mseg-matnr

and mtart in r_mtart.

if sy-subrc = 0.

*if GR slip is more than 0 then only print

if zwesch > 0 and mseg-zeile = 1 and mseg-shkzg = 'H'

and mseg-xauto = ' '.

v_wesch = mseg-menge / zwesch.

v_loop = ceil( v_wesch ).

  • DO anzahl TIMES.

do v_loop times.

*End change- Sujit

perform we01_druck.

enddo.

endif.

endif.

perform close_form.

endform.

Read only

0 Likes
2,300

Are you using the standard OPEN_FORM routine, or is that custom too?

perform open_form.

Regard,

Rich Heilman

Read only

0 Likes
2,300

Plus, make sure that your MAIN window height is 39 lines.

Regards,

Rich Heilman

Read only

0 Likes
2,300

Open form is the standrad one.

Window height is 39 cm.

Read only

0 Likes
2,300

I think 39cm is way too big. Make is 39 LN(lines).

THis could be contributing to the page numbers being so inflated in the spool.

Regards,

Rich Heilman

Read only

0 Likes
2,300

Thanks Rich.

I've never tried it. I am going to change the size and will transport it into production and will see if it makes a difference. I'll get back to you next week.

Have a great weekend.

Read only

0 Likes
2,300

Rich,

I changed the height to 39 lines . But still getting the same error.

Read only

0 Likes
2,300

I always use BARTENDER 7.72 (third party tool) to design label and generate SAPScript ITF for Zebra printer and it always works great. I even did not care to learn about ZPL.

Read only

0 Likes
2,300

I did not use Bar one . Can this be the reason ?

The coding was very simple so i did it on my own using ZPLII commands.

Read only

0 Likes
2,300

Number of pages shown in the spool might differ from the number actually printed, if the number of copies is more than one.

Check if the number of copies is set to more than one based on certain condition in the program or by output type condition tables.

Regards

Sridhar

Read only

0 Likes
2,300

Sridhar,

I've checked the no. of copies. It is not doubled in the program or the script.

And also if i am printing less than 100, it is giving me the correct result. It only does that when the no. of pages is more than 100.

If there was no. of copies set somewhere, it'd be applied to any no. of pages.

Read only

Former Member
0 Likes
2,301

Hai

You dont need a Zebra bar one tool for printing graphics from smartforms. You need to have propers

drivers and proper settings in place. Take a look at the OSS notes 750772 - Information on the ZPL-II

printer driver for SmartForms

Check the point 5 in the above oss notes:

5) Support of bitmap graphics

Colored bitmap graphics from SmartForms are changed to black and white when you print

from the LZPL printer driver. If the picture quality is affected by this conversion,

change the graphic to B/W with a graphics program (such as PaintShop Pro), and import

it to SmartForms as as a black and white graphic. Monochrome graphics are not converted

by the driver. However, all graphics may be justified to adjust the size of the graphic

to the printer resolution (203, 300 or 600 dpi).

During the import to SmartForms, you have the option to flag a bitmap as "resident".

In this case, the LZPL printer driver saves the graphic in the RAM of the printer when

it first occurs (Device "R:" of the zebra printer). At the end of the spool request,

the driver deletes the graphic again from the printer's RAM, so that no more memory

remains occupied.

Resident graphics during label printing from SmartForms are therefore only faster

if more than one label is printed within a spool request, and the resident graphic

is repeated on each label.

Thanks & regards

Sreenivasulu P

Read only

0 Likes
2,300

I am not using Smartform.

Shahnila

Read only

Former Member
0 Likes
2,300

Hi Shahnila,

I had a look of the print program. I have a guess. In the following statement

v_wesch = mseg-menge / zwesch

you are moving the calculation result into a quantity type field (v_wesch)in which, the interpretation of decimal points depends on the corresponding UNIT field. Therefore when you move the value of v_wesch to v_loop then use "write v_wesch to v_loop unit mara-meins" or declare v_wesch as P type variable. I hope this will solve your problem.

Read only

0 Likes
2,300

Hi Shahnila,

Did you get chance to implement the proposed solution?

Read only

0 Likes
2,300

Yes. I am going to make the changes. But again , there is no problem with spool quantity. The issue is that it is printing more than it shows in the spool. if there is some programming issue, the wrong quantity should be displayed in the spool as well