SAP-Forum.ORG
   
This web site isn't affiliated with, sponsored by, or approved by SAP AG. Is only a SAP users community.

Go Back   SAP-Forum.ORG > SAP Forums > SAPScript - Smartforms

Similar Threads
Thread Thread Starter Forum Replies Last Post
The number size under the barcode Rampa SAPScript - Smartforms 2 08-09-2011 09:34 PM
EAN 128 Barcode Micro SAPScript - Smartforms 1 08-01-2011 09:21 PM

Aprenda SAP!
Reply
 
Thread Tools Display Modes
  #1  
Old 08-26-2011, 01:15 AM
Micro Micro is offline
Senior Member
 
Join Date: May 2010
Location: Boston
Posts: 306
Default UPS Maxicode - 2D barcode

Hi all,

Is the first time 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

Apreciate any help.

Thanks,
Micro
Reply With Quote
Sponsors
  #2  
Old 08-26-2011, 01:17 AM
Portal Portal is offline
Senior Member
 
Join Date: May 2010
Location: Miami
Posts: 791
Default RE: UPS Maxicode - 2D barcode

Hi Micro,


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

Regards,
Portal
Reply With Quote
  #3  
Old 08-26-2011, 01:19 AM
Rima Rima is offline
Senior Member
 
Join Date: May 2010
Location: Kansas
Posts: 280
Default Re: UPS Maxicode - 2D barcode

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?

Regards,
Rima
Reply With Quote
Entre a los Links relacionados
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 10:26 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Forum Design By inferno