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

Identifying bar code scanner data against keyboard input data in editable classic alv.

Former Member
0 Likes
1,581

Hi all,

We have implemented bar code scanning and able to capture the bar code data printed on the product in SAP Z table using ABAP code (editable classic alv).

To accept the bar code data, we have introduced character input field of length 60. While scanning the bar code, we place the cursor in this input field if alv and scan the bar code using Motorola bar code scanner.

This input field accepts the data from Keyboard as well from bar code scanner. Now for security and integrity of input data, we want to restrict the input from bar code scanner only.

We want to identify whether the data received in input field has come from bar code scanner or from keyboard input.

It seems there is no way to identify whether the data captured in the input field is typed from keyboard or scanned using bar code scanner.

Please provide us the solution to identify the input method whether bar code scanner or keyboard or restrict the input method of input field to bar code scanner only.

Thanks,

Kalpesh

4 REPLIES 4
Read only

naimesh_patel
Active Contributor
0 Likes
1,068

I think there isn't any attribute on the ALV which can tell if the keyboard was used to input this value or not.

There are different softwares which can lock up the keyboard https://www.raymond.cc/blog/how-to-restrict-or-disable-keyboard-mouse-and-even-power-button/. The idea is to install one of such program on the machine, call this program using EXECUTE method after displaying the ALV. Call the same program again to unfreeze the keyboard. You may need to find such program which has these type of function where you can do it by calling the shortcut from the EXECUTE method.

Regards,
Naimesh Patel

Read only

0 Likes
1,068

Hello Naimesh,

Thanks for the solution.

I guess this solution won't help much as there are multiple input fields and some are expecting data from bar code scanner and some are from keyboard manual input.

Also, the data capturing program runs on multiple machines so, practically it won't help much.

Regards,

Kalpesh

Read only

Arun_Prabhu_K
Active Contributor
0 Likes
1,068

Hello Kalpesh.

     May I know why you want to restrict to barcode scan alone?

Regards.

Read only

0 Likes
1,068

Hello Arun,

The bar code is scanned from the 2D matrix printed on the product. The person can manipulate this data by entering manually using keyboard. So, we want to maintain the data integrity between data printed on product and the scanned data in SAP.

Hope this helps.

Thanks,

Kalpesh