Skip to Content
avatar image
Former Member

Using Barcode Scanner to read maintenance order number

Hi experts!

I have a question regarding Barcode Scanner and integration of it into a Z-Report. I have found a lot of threads but none of them is really helpful to me due to the fact that I am totally new in this field of application.

The requirement is as follows:

Our customer wants to start SAP in production hall/garage or whatever. In there, the employee scans the barcode of a maintenance order which he has to process. Simplest scenario to proceed:

--> The Maintenance order number should be stored in a ZTable with the time stamp, when the order was scanned by the reader. My questions now are:

1.) How can I use the information read by the barcode reader?

     1.1) Is it possible to trigger an event when the barcode is read or is it better to solve this with a Z-Report/Z-Transaction?

2.) Are there any configurations which have to be done in order to use this functionality?

3.) Which Interface (Classes or FM) are provided by SAP to handle this kind of requirements?

4.) Do you have any sample programs or step by step examples to read barcode and use it in report?

Any helpful answer will be rewarded. Thanks in advance,

Best Regards,

Patrick

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 23, 2016 at 11:21 AM

    Hi Patrick,

    In case you still haven't solved the issue, it is quite simple: a scanner is just a regular keyboard, another tool to input values.

    Bellow an example using a selection-screen report. There are 2 important things to keep 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 need to scan a specific 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 ;-)

    http://www.thebarcodewarehouse.co.uk/Assets/Documents/Motorola/Manuals/Motorola-LS1203-Quick-Start-Guide.pdf

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Kamal,

      I haven't implemented this topic yet. But thanks for the detailed description, sounds very good to me. I will let you know as soon as I have implemented the topic on our customers system.

      Regards,

      Patrick

  • Nov 03, 2015 at 08:29 AM

    The easiest way would be to use a wedge scanner which plugs directly into the keyboard.  The user then just places the cursor in the appropriate field on the screen and scans the barcode.

    For what you are  proposing I wouldn't consider anything more complicated.

    Rich

    Add comment
    10|10000 characters needed characters exceeded