This blog is a continuation of my (un)expected journey in some way. However, here I’m going to provide a practical step by step guide on how to enable barcode scanner via custom pane. I’ll try to make it shorter, I promise. And hopefully more enjoyable to read.
The topic I chose is something important nowadays in my opinion. Chatting about IoT, ML, C/4HANA, UX and all those CX things we’re still typing in some digits and characters which make no sense. Especially, it makes no sense when you’re on the go and using mobile apps.
There is already speech-to-text available for anyone in any field. But it’s a native feature of a device.
Barcodes are there to simplify and encode information. And there should be an “easy to build” way to utilize those capabilities and scan and decode barcodes in your customer needs. In other words, in your custom development.
SAP did inbuild barcode scanner for some scenarios in C4C extended app. For example, “Add product” dialog or ticket search based on ticket id scanned from a barcode.
Obviously, it’s impossible to cover all customers’ needs with out-of-the-box features. And there will be always some extraordinary scenarios where partners or customers need to go and build the same, but different.
The barcode scanner in C4C as a topic has been raised many times across SAP Community and Influence SAP areas.
Scan barcode for spare parts
Make barcode scanner more flexible
Automated barcode/number/text reading for an input field from camera of a device
Bar code / QR code scan BADI
Scan into any field / Define own scan logic
Discussions on SAP Community
C4C barcode / qr scanner for products in tickets
Using the scanner in the C4C extended APP for IPAD
How to import barcode scanning functionality in C4C ABSL
C4C: Barcode Scanner for Custom Screens
To name a few.
To answer those questions and address some ideas in full or partially, I will take quite a simple scenario and show step by step how to achieve it.
The scenario is:
We need barcode scanner embedded in Service Ticket TI.
Scanned barcode value should be parsed in a way to extract first two characters.
That’s all and we’re ready to test our barcode scanner embedded via custom development.
PS: usually, you might need to calculate visibility of the control with some calculation rule for Visible property. Something like this:
if($data.$System.DeviceType != "desktop" ) result = true else result = false end