This website is not affiliated with, sponsored by, or approved by SAP AG.

UPS Maxicode - 2D barcode

Development SAPscript/ Smartforms

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

UPS Maxicode - 2D barcode

Postby Dicharachero » Thu Dec 30, 2004 3:39 am

First I use sapscript to make a file that contains ELP commands (ELP = Eltron Programming Language), for example a maxicode:

b13,429,M,"068,276,40667 ,[)>961Z41725374GsUPSN
Gs4887V7Gs349GsGs1/MEERBUSCHGsGsRsEot"

In a print preview I download the sapscript to a *.dat file, then i send that file to a thermal printer (Eltron 2442), but I don't get the correct Maxicode

Note:
Gs = ASCII 29
Rs = ASCII 30
Eot = ASCII 4
Dicharachero
 

Postby Guest » Mon Sep 26, 2005 10:41 am

Hello Dicharachero

I am using the ZLPII language with Zebra printers.

Here is how I do proceed.

1. I did create a sapscript containing all ZPL II commands.
There is not lines design using the sapscript commands only ZPL II
code can be find in the sapscript form.

2. I defined a printer as raw printer. ( Connect to my Zebra printer)

3. When I am running the program calling the sapscript, I do the output directly to the printer.

Here is an example of the sapscript:

/E MAIN
/* INITIALIZE
/* set language ZPLII, non continuous media
/* ^XA = Start ZEBRA Character interpreter
/* ^SZ2 = Use ZPLII language
/* ^MNY = Continuous media
/* ^XZ = End ZEBRA commands
AS ^XA^SZ2^MNY^XZ
/*
/* ^JMA = Set Dots/Millimeters 8 dots / Milli
AS ^XA^JMA^XZ
AS ^XA^MUD,300,300^XZ
/*
/* set label home to 20,15
AS ^XA^LH20,15^XZ
/*
/* Print Doc section
AS ^FO0,217^ADN,51,19^FDDOC:^FS
AS ^FO100,217^ADN,51,19^FD&MKPF-MBLNR&^FS
AS ^FO400,217^ADN,51,19^FD&MABDR-LGPBE&^FS

SAP Program used to test the label:

tables: ITCPO.

data: PRINTER like ITCPO-TDDEST value 'ZBR1', " Short printer name
NUMCOPY like ITCPO-TDCOPIES value 1.


CLEAR ITCPO.
ITCPO-TDDEST = PRINTER.
ITCPO-TDCOPIES = NUMCOPY.
ITCPO-TDPREVIEW = ' '.
ITCPO-TDIMMED = 'X'.
ITCPO-TDDELETE = ' '.
ITCPO-TDIEXIT = 'X'.
ITCPO-TDDATASET = 'SCRIPT'.
ITCPO-TDSUFFIX1 = PRINTER.
ITCPO-TDSUFFIX2 = SY-UNAME.

CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'FORM_NAME'
DEVICE = 'PRINTER'
OPTIONS = ITCPO
DIALOG = 'N'.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
WINDOW = 'MAIN'.

CALL FUNCTION 'CLOSE_FORM'.


From that, I think you can change the ZPLII to the ELP commands.

I hope that could help


stjacqd
Guest
 

Re: UPS Maxicode - 2D barcode

Postby seally » Thu Jan 07, 2010 5:01 am

Is the initialization necessary?
example:
AS ^XA^SZ2^MNY^XZ

/* ^JMA = Set Dots/Millimeters 8 dots / Milli
AS ^XA^JMA^XZ
AS ^XA^MUD,300,300^XZ
/*
/* set label home to 20,15
AS ^XA^LH20,15^XZ

Also, why is ^XZ always placed at the end of every line (always placed as conclusion) and why not place it at the end of the last line in sapscript instead?

My current sapscript is:
/: PERFORM F_GET_LABEL_VALUES IN PROGRAM ZSAPM07DR
/: USING &MSEG-MATNR&
/: USING &MSEG-CHARG&
/: USING &MSEG-WERKS&
/: USING &MSEG-MBLNR&
/: USING &MSEG-MJAHR&
/: USING &MSEG-ZEILE&
/: CHANGING &W_MAKTX&
/: CHANGING &W_LICHA&
/: CHANGING &W_PRUEFLOS&
/: ENDPERFORM
B1 ^XA^LH30,30
B1 ^FO0,5^B2N,40,N,N,N^FD&MSEG-MATNR&&MSEG-CHARG&^FS
B1 ^FO0,45^ADN,40,18^FDMaterial Number &MSEG-MATNR&^FS
B1 ^FO0,85^ADN,40,18^FDMaterial Description &W_MAKTX&^FS
B1 ^FO0,125^ADN,40,18^FDP&G Batch &MSEG-CHARG&^FS
B1 ^FO0,165^ADN,40,18^FDVendor Batch &W_LICHA&^FS
B1 ^FO0,205^ADN,40,18^FDInspection Lot &W_PRUEFLOS&^FS
B1 ^FO0,245^ADN,40,18^FDDate of GR &MKPF-BUDAT&^FS^XZ

Should ^XZ be placed at the end of every line?
seally
 
Posts: 4
Joined: Sun May 31, 2009 11:28 pm


Return to SAPscript/Smartforms

Who is online

Users browsing this forum: No registered users and 2 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.