Skip to Content
0
Dec 09, 2020 at 08:05 AM

Back to back barcode scan functionality in SAPUI5-Fiori

58 Views

Hello All,

I am trying to call barcode scan back to back without any user interaction using API sap.ndc.BarcodeScanner

jQuery.sap.require("sap.ndc.BarcodeScanner");

fnScan1:function(){
sap.ndc.BarcodeScanner.scan(function(oResult){
/ * process scan result * /
// POP UP NEXT SCAN2
this.fnScan2();
},function(oError){/ * handle scan error * /},function(oResult){/ * handle input dialog change * /});
},
fnScan2:function(){
sap.ndc.BarcodeScanner.scan(function(oResult){
/ * process scan result * /
// POP UP NEXT SCAN1
if(condition){
this.fnScan1();
}
},function(oError){/ * handle scan error * /},function(oResult){/ * handle input dialog change * /});
},

It is working for only 3 or 4 successive barcode scan.

Please suggest way to achieve back to back scan Or is it a limitation for this API?

Or suggest how to break scope of 1st barcode scan and give call for 2nd scan.

Regards,

Mahesh Lad