Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Label Printing from SAP through Smartforms to Zebra

Former Member
0 Kudos

Hi,

We need to print Labels from SAP to Zebra Printer using Smartforms. we have defined smartstyles with Barcode and have used it in the Smartforms.

We are not able to print labels in the Zebra Printer. Our SAP system is ECC 5.

It will be of great help if somebody gives me the guidelines for doing this. What are all the things we need for the BASIS to set up. They have already set up the printer and it is outputting Labels printed using ZPL II language but not SAP.

Do we need to use Printcontrols and how do we use them.

Thanks

Arunava

10 REPLIES 10

Former Member
0 Kudos

Hi Arunava,

Do you have the correct drivers for smartforms?

Take a look at the OSS notes: 750772 - Information on the ZPL-II printer driver for SmartForms

Cheers

VJ

Former Member
0 Kudos

Hi Arunava,

To test it from SAP you can try this small piece of code from SAP Scripts I know that your requirement is Smartforms but to make sure that it prints from SAP. You can do this.

This should go in SE38.....

data: itcpo type itcpo.

data: field1(30) type c,

field2(30) type c,

field3(30) type c.

parameters: p_spld type usr01-spld.

start-of-selection.

itcpo-tddest = p_spld.

itcpo-tdimmed = 'X'.

itcpo-tddelete = 'X'.

itcpo-tdprogram = sy-repid.

field1 = 'Test One'.

field2 = 'Test Two'.

field3 = 'Test Thress'.

call function 'OPEN_FORM'

exporting

form = 'ZEBRA_DEMO'

language = sy-langu

options = itcpo

dialog = space

exceptions

others = 1.

call function 'WRITE_FORM'

exporting

ELEMENT = 'MAIN_ELEMENT'

window = 'MAIN'

exceptions

others = 1.

call function 'CLOSE_FORM'

exceptions

others = 1.

This should go in SE71 with form name ZEBRA_DEMO....

/E MAIN_ELEMENT

/ XACWJ,E:MSUNG24.FNT

/ FO100,100AJ,50,50^CI0

/ FDHello Arunava!FS

/ FO100,200AJ,50,50CI17F8^FD &FIELD1& ^FS

/ ^XZ

This is ZPL II code try running this you should get a label with <b>Hello Arunava</b> and <b>Test One</b> value.

Thanks & Regards,

YJR.

0 Kudos

Download label definition into print file: Choose File ® Create Format for SAP R/3 to convert the printer commands into an ITF file that is suited for import into SAPscript. The Download Stored Format Wizard appears and allows you to choose between two procedures:

Download the label definition into the Zebra printer (RAM or nonvolatile memory) and create a merge file for SAPscript.

Create a file for SAPscript that contains label definition plus variable data.

For performance reasons you should prefer the first method, since that print files created in R/3 to be sent to the printer have only minimal size. With the second method, even though you avoid keeping the label definition in the printer, you must pass the entire label definition to the printer for each label you print from R/3 (including graphics, fonts, and so on), which is considerably slower.

BAR-ONE in both cases creates a file with the extension ".ITF".

0 Kudos

Hi Vijay,

Thanks for the input. Our Driver is already printing ZPL II code. But the problem comes when we try to print the SAP data through it.

What is the way we can convert this SAP data into ZPL II code. Do we use Print Control for this.

Regards,

Arunava Das

0 Kudos

Hi Arunava,

Are you using BAR ONE Software for designing Labels or Smartforms????

If you are using BAR ONE Software then from there you can convert the Label into ZPL II code and this code you have to put it in MAIN WINDOW.

Have you tried the Example which I have given above if so what is the output????

Thanks & Regards,

YJR.

0 Kudos

Hi Vijay,

We are using Smartforms and not Barone.

Yes that example gives the Output. But we are not able to get the Output when the Layout is created in Smartform.

Is there way we can get the Labels without using Barone and using Smartforms only?

Regards,

Arunava

0 Kudos

Hi Arunava,

Yes its possible to use smartforms to print on zerba printers without using the BARONE tool but there is a whole bunch of settings that needs to be in place before you can start printing through smartforms.

I would suggest you to look into OSS notes. There are a lot of useful OSS notes on the settings required to be done to use smartforms to print on Zebraa. You will need to work with the Basis team coz its extremely difficult for you to get it in place with out their help.

Cheers

VJ

0 Kudos

Hi Vijay,

We have got stuck at the SAPscript also.

We we are doing Test priting through the SAPscript ONLY the worl HELLO gets printed. Rest of the words are not printed.

Also when we try to Trigger the SAPscript from the Report the Output is not coming.

Please guide.

Arunava

Former Member
0 Kudos

Hi Anubhav,

We are doing exactly the same thing what you need to do. We are using third party label software (BARTENDER 7.72 from Seagull scientific) to create label definition and layout. It is very inexpensive software. The SAP variables are used as 'screen data' in Bartender ( string enclosed with & &). The Seagull provides the driver for all kind of printers.

Once the label design is final, create printer specific template file as ITF file. Upload that file in smartforms. It works like charm.

0 Kudos

I forgot to tell you that we are using Zebra S4M which is ZPL based.

Message was edited by: Sharad Agrawal