This week we had a requirement from our client that they need a Fiori application, which is capable of barcode scanning. They would like to scan a barcode or QR code of an equipment and based on the scanned ID the application should retrieve the relevant information from SAP.

To achieve such functionality we have the camera of the phone, which is not accessible from the browser. SAP announced its own webcontainer application called Fiori Client (you can read more of the Client here). With this app we can access the camera, and scan barcodes with our phone.

Basically we had to build a custom Fiori application. It was quite fast and easy with the SAP WebIDE. In the application we have to use the Barcode Scanner plugin, which is contained in the Fiori Client (you can check the supported plugins here).

With this code you can call the barcode scanner, and scan any barcode or QR code. The scanned text will be entered into the search field of the application and the search event will be invoked.

Now we just have to deploy this application to the ABAP server, and configure the launchpad to enable the application, and access the launchpad via Fiori Client.

It’s as simple as that, follow us for more articles about the other plugins later.