cancel
Showing results for 
Search instead for 
Did you mean: 

Split bar code in several fields

Former Member
0 Kudos

Hi all,

My requirement is to split a 2d bar code in several fields in a selection screen.

For instance, my bar code is composed by material number, batch number and production order: AAABBBCCC.

- AAA: material number;

- BBB: batch number;

- CCC: production order.

The selection screen of the z transaction that will receive those three elements has 3 fields, a specific field for each one of them.

My question is how to split automaticly the input from the barcode into those 3 fields when it's read with the barcode reader. Do i have to concatenate a special character in the barcode string when printing it so that it'll divide into the fields?

I've searched the forum and i've found no comments about this.

Regards,

Roberto

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

silly question, but did you set up the auto-tab function? Is this SAPGUI or some other screen technology, like sapconsole?

In SAPGUI, you can tell the gui to tab to the next field when one fills up. You can then simply scan the bar code and as the fields fill up, they go to the next field. This only works well, though when the values are as long as the field.

Former Member
0 Kudos

Hey David,

How do i activate the auto tab function??

Regards,

Roberto

Former Member
0 Kudos

use the customize local layout icon (far right), then options, then interaction design, then keyboard settings, then click the checkbox "automatically move focus to next input field on reaching end of input field"

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for your replies!

Regards,

Roberto

Former Member
0 Kudos

You can use offset to achieve this.

Data: lw(10), l1(3), l2(3), l3(3).

lw = 'AAABBBCCC'.

l1 = lw(3).

l2 = lw+3(3).

l3 = lw+3(3).

- AAA: material number; l1

- BBB: batch number; l2

- CCC: production order. l3

*prerequisite, know all the length for each field.

Former Member
0 Kudos

No, it has to split automaticly when read with the bar code reading pistol.

Is there a way to do this? Like inserting a special character between field and field in the 2D barcode?

Regards,

Roberto

Former Member
0 Kudos

I did that once, but I can't remember the embedded charaters....'M' or 'C' or something like that. Sorry that I don't remember by my PP end user guru knew what had to be there at the time. It's essentially a horizontal tab for the bar code reader or target software, if I remember correctly...we imported into three side by side columns in a spreadsheet from one barcode. Perhaps someone else will know....I think the goal was to embed something that didn't print, but was still recognized by Excel, so you may need to consult the documentation for the software product you'll be putting the three fields into. You might find something on Google....