cancel
Showing results for 
Search instead for 
Did you mean: 

Back to back barcode scan functionality in SAPUI5-Fiori

former_member699822
Discoverer
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

WouterLemaire
Active Contributor
0 Kudos