Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Missing ZPL-Command for Print Width (^PW)


I process a form for a zebra labelprinter as file (use importing parameter /1bcdwb/formoutput to get the binary data of ZPL). After I get the data stream I save this data as a file on a server. The logistic use this file for printing the label.

If I look at this files, I can't see the command ^PW for print width. But I need this command in the file, because if everyone send a label from a workstation to the labelprinters and the command ^PW is in this files, the printer will change the settings for print width. All following labels will print with the print width of the last label which include a ^PW-Command.

For example:

1. Setting of print width is 800pt

2. Logistic print ZPL-Files from server -> labels ok

3. Everyone send a custom-label from a windows-station to the label printer, the file include the command ^PW600, so we have a print width of 600pt -> the custom label looks well

4. Logistic print again a other ZPL-Files from server -> label is not ok, there only print 600pt, 200pt are lost

Here is a source code part:

  CALL FUNCTION wa_printout-form_fm
      /1bcdwb/docparams  = wa_printout-output_param_pdf-docparams
      iwa_doc            = wa_doc
      /1bcdwb/formoutput = wa_printout-result-adobe " returns data (PDF...)
      using_error        = 1
      system_error       = 2
      internal_error     = 3
      OTHERS             = 5.

  CALL METHOD save_output_as_file
      iw_filename = lw_filename128
      ii_bin_data = li_xstr_tab
      rw_error    = lw_error.

Can everyone help me?

Thank you and best regards


Former Member
Not what you were looking for? View more on this topic or Ask a question