Hi Patrick,
In case you still haven't solved the issue, it is quite simple. To begin with, any scanner you should see it as just a regular keyboard: another tool to input values, characters.
bellow an example using a selection-screen report. there 2 things to have in mind:
1- make sure the cursor sets on the right input field you want the scanner to capture the order number to.This is handy because the users won’t have to do that themselves by dragging and clicking the mouse.
2- if you want the report to fire right away after scanning, program the scanner in a way that it sends the Enter keystroke automatically after inputting the value. programming the scanner is also quite simple: google on your scanner name how to add Enter and you will get a documentation where you can only need to scan a barcode and voila!
Please take a look on the link bellow, in my case it is motorola scanner. you can even add prefixes and suffixes to your scanner. alter sound and tone ;-)
REPORT zscan_order. PARAMETERS p_field TYPE char10. "this field added to show the use of the SET CURSOR FIELD PARAMETERS p_aufnr TYPE aufnr. *Here you make sure that your cursor sets on the input field you want at start INITIALIZATION. SET CURSOR FIELD 'P_AUFNR'. *This screen-event is triggered by the validation (pressing of the Enter) of the input in order number field AT SELECTION-SCREEN ON p_aufnr. lcl_scan_order=>do_something_with_order( IMPORTING i_order_number = p_aufnr ). * OR PERFORM do_something_with_order USING p_aufnr.
Regards,
Kamal.