‎2011 Oct 11 12:18 PM
Hi,
I have been looking for information about how to read bar codes using a scanner RF. I am not sure if I understood well how it works so could anyone confirm it to me?
I understood the bar code will be read by the scanner and it will be directly copied in the field where the cursor is in my Z screen program. It means that it will work exactly like if you press a key of your keyboard. It is like that?
If it is like that then it is very easy. I have to cut the code using the rules to substract the required information.
If I am wrong how it has to be done?
Regards,
Manel
‎2011 Oct 11 12:48 PM
Bar-code is a special character style in Smartform, and those character easily identified by the RF scanner.
You can create the barcode fonts into Smartstyle thru smartform and that style you can map with your sap field.
Hope this will helpful
‎2011 Oct 11 12:48 PM
Bar-code is a special character style in Smartform, and those character easily identified by the RF scanner.
You can create the barcode fonts into Smartstyle thru smartform and that style you can map with your sap field.
Hope this will helpful
‎2011 Oct 11 12:59 PM
I am not using smartforms.
I have some Z screens where I have to copy some information from the Bar code, so I need to know how to get the event from the scanner RF and how to get the bar code.
Ex: bar code 08123456; I need to copy in my Z screen the quantity which it is the last number of the bar code. In this example it would be 6. How I get the event and how I get the value of the bar code?
‎2011 Oct 11 1:17 PM
Hi
In this situation the barcode is not problem for you, because it's like the keyboard.
The result of reading will be placed in the i/o field of your screen where the cursor is, but the informations of the barcode will be placed translated to alphanumeric characters.
So you can get the data inserted in the i/o field as soon as the PAI is triggered.
That means you're right:
If it is like that then it is very easy. I have to cut the code using the rules to substract the required information.
Max
‎2011 Oct 11 1:40 PM
Thx Max!
Last question: what event will be executed? It has to be customized in the RF gun maybe?
Thx!
‎2011 Oct 11 2:11 PM
How your scanner works?
I mean it needs to know how the scanner is linked to the PC or you're speaking about a mobile device with interface for GUI?
Max
‎2011 Oct 11 3:30 PM
Hi Max,
The gun will be connected via USB. Can I assume that the ENTER function can be done/sent for the gun after read the bar code?
With that I could put the code inside FIELD storage unit MODULE f_read on chain-request and would be great.
Regards,
Manel
‎2011 Oct 11 3:39 PM
The gun will be connected via USB. Can I assume that the ENTER function can be done/sent for the gun after read the bar code?
With that I could put the code inside FIELD storage unit MODULE f_read on chain-request and would be great.Yes if the gun is connected by USB it's just like a keyboard, so you don't have to worry about it
That mean your screen has to have a field suitable for the barcode, you need to develop a MODULE in PAI in order to extract the part of barcode you need,
Max
‎2011 Oct 11 3:47 PM
Hi
Perhaps you can create popup to get the barcode i(nstead of to insert it directly in the main screen):
So you can elaborate the barcode after pressing enter, and place the part of barcode you need in the main screen
Max
‎2011 Oct 12 9:40 AM
Hi Max,
You are right because now I don't know how to get the part required from the bar code.
If my screen field is 2 characters length and I read the bar code (50 charr for example)... how I can get the entire bar code in order to copy into my screen field only the required information.
Ex:
screen field quantity (2chars)
Bar code 123456789 and last 2 characters is the quantity
If the bar code is read when the cursor is in the input/output screen field quantity, only 2 characters will be copied (12 in this case) so in PAI I will not be able to get the required data (89 in this case).
Do you know how to fix that problem?
‎2011 Oct 12 9:56 AM
Hi
Just as I said you should create a popup with i/o field suitable for the barcode, so if the barcode has max 50 char, this field has to be of 50 char.
In the PAI of the popup you can implement the logic to get the part of the barcode you need and then transfer this part to the i/o field of the main screen.
Or in the main screen you set the field for the barcode (so long 50 char) and another field to insert the part of code you need, this field should be OUTPUT only, because the information has to be from barcode and not changeble.
The barcode is place in the field above and after pressing enter you transfer the information to the other field.
Max