Skip to Content

ZPL Spool generates with incorrect number of Pages

Hello All,

I am using a script to print Label in ZEBRA printer, And Print also coming properly, But the Problem is the spool in SP02 shows wrong number of pages.

Physically if the printer prints 50 Labels, But the spool shows 100 pages. End users are getting confused because of this.

I am using below code

DATA : lv_result TYPE itcpp.
CLEAR: gs_options.

gs_options-tdcopies = 1.
gs_options-tddest = gv_pdest.
gs_options-tdimmed = 'X'.
gs_options-tddataset = 'Prod'.
gs_options-tdsuffix1 = 'Lab'.
gs_options-tdprogram = sy-repid.

*-- Open the layout set for printing.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
application = 'TX'
device = 'PRINTER'
dialog = space
form = gv_form
language = sy-langu
options = gs_options
IMPORTING
result = lv_result.

DO gv_copies TIMES.

CALL FUNCTION 'START_FORM'.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'MAIN'
window = 'MAIN'
EXCEPTIONS
OTHERS = 1.

CALL FUNCTION 'END_FORM'.

ENDDO.

CALL FUNCTION 'CLOSE_FORM'.

b1.jpg (32.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers