Application Development and Automation 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: 
Read only

Printing tab in Bar Code using SAPScript

0 Likes
1,605

Hi,

We are trying to print information from multiple fields in Bar code (using Code128 symbology) on our Utility Invoices, printing of which is done using SAPScript.

Our objective is that when accepting payment using FPCJ transaction, the Cash Desk Operator will use a Bar Code Scanner and import relevant invoice data into multiple fields.

However, for that to happen, it is necesary to print tab feeds between data of contiguous fields using Bar code.

We have tried printing tab feeds in Bar Code using hexadecimal '09'. But it has not helped. Can anybody suggest how one can print tab feeds in Bar Code using SAPScript?

Thanks in advance,

Arijit Mitra

7 REPLIES 7
Read only

Former Member
0 Likes
1,232

Hi

See the doc related to BARCODE printing and do accordingly

To Create a Bar code prefix:

1) Go to T-code - SPAD -> Full Administration -> Click on Device Type -> Double click the device for which you wish to create the print control -> Click on Print Control tab ->Click on change mode -> Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP) -> save you changes , it will ask for request -> create request and save

2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix

Create a character format C1.Assign a barcode to the character format.Check the check box for the barcode.

The place where you are using the field value use like this

<C1> &itab-field& </C1>.

You will get the field value in the form of barcode.

Which barcode printer are you using ? Can you download this file and see.

http://www.servopack.de/Files/HB/ZPLcommands.pdf.

It will give an idea about barcode commands.

Check this link:

http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm

Check this link:

http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm

Detailed information about SAP Barcodes

A barcode solution consists of the following:

- a barcode printer

- a barcode reader

- a mobile data collection application/program

A barcode label is a special symbology to represent human readable information such as a material number or batch number

in machine readable format.

There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.

You can print barcodes from SAP by modifying an existing output form.

Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.

Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.

Reward points if useful

Regards

Anji

Read only

0 Likes
1,232

Hi,

We have followed the steps mentioned in your post and yet have not been successful.

We are using a device type with driver SAPlpd/SAPWIN driver 3.0 and Character set 1406 (Printer I2SWIN ISO 8859-2 (MS Windows Latin-2)).

We have created a Print Control SBP26, where flag for print control variant ONCE and flag for print control interpretation mode HEX have been selected. Character format C1 has been defined as advised. We have then tried to print a variable tab of type c to which the value '09' has been assigned in the following manner:

<C1> &tab& </C1>.

Unfortunately, when we are scanning the bar code, it is being scanned as 09 only, and not as tab feed.

We have tried printing through SmartForms also with the same result.

Will appreciate if you can suggest how we can resolve the issue.

Thanks and regards,

Arijit Mitra

Read only

0 Likes
1,232

ok this is really not my terrain, BUT i might have seen the problem.

If you are using a hex "09" as a tab feed, and this 09, will even get recognized when scanning, where is the problem?

I hardly guess you got to trigger youselv some code when reading that "09" making your tab feed yourself.

sorry if i´m totally wrong, but normally when setting a user (programmer) specified condition, its as well the user (programmer) that has to take care about it then.

Read only

0 Likes
1,232

Hi Florian,

I am not exactly sure I have understood what you have stated in your post.

But essentially, what we are trying to achieve is to print tab feeds in Bar Code, so that when the Bar code is scanned, the cursor can move to the next field.

I read somewhere in SDN Forums that tab feed can be printed in Bar Code by printing hexadecimal '09'.

Unfortunately, when we are trying to print hexadecimal character '09' in the manner mentioned earlier, at the time of scanning it is being read as 09 only, and not as tab feed.

That is exactly where our problem lies. Would be grateful if somebody can suggest a solution.

Thanks and regards,

Arijit Mitra

Read only

0 Likes
1,232

Hi,

I am currently searching for a solution to this myself. I know that for barcodes you can input the corresponding ASCII hexadecimal value, preceded by "\x" to denote that it is a hex character. So "12\x0913" should print: 12 13. If I try scanning to notepad it works, however in SAP it seems to jump back a field instead of forward. I'm still trying to figure out what the problem seems to be. I've also tried out Carriage Returns and Line Feeds with little success.

Dave

Read only

0 Likes
1,232

Also just to clarify I was printing these barcodes out in Label Matrix and not in SAPScript, but it seems that SAP just doesnt want to interpret them properly.

Read only

0 Likes
1,232

Well I'll post my solution anyway, although I'm sure you had wanted to use sapscript to pull data from sap (you have to define a variable TYPE x apparently).

I used label matrix 7 to create a barcode with a tab using the expression "\x09". However then when I scanned it I go all sorts of weird behaviour. This was because the wedge I was using was sending it as a control character, Ctrl+I, which is a tab in notepad, but is for example, italics in word. I had to delve into the manual to find a barcode I could scan to disable control characters. But of course the firmware on this old wedge didn't support it, so I tried it on a newer wedge and it worked.

Hope this helps somebody and best of luck,

Dave