cancel
Showing results for 
Search instead for 
Did you mean: 

ZPL Spool generates with incorrect number of Pages

0 Kudos

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'.

Accepted Solutions (0)

Answers (0)