Skip to Content

barcode scanning issue in sap.m.input( not scanning properly)

Feb 22, 2017 at 05:06 PM


avatar image

Hi Expert,

I have some issue in barcode scanner.


I have a table with 3 columns and initially I have to add empty row and make focus in one of the cell(lets say cell 2) and when I scanned the barcode, I have read the value and add new row to table and change the focus to cell2 in 2nd row and I have a condition to restrict the adding rows to table.


Lets say I have to restricted the table to 5 records and my Barcode value is 'TESTING'. Now when I scanned the barcode it was reading only one letter which is 'T' (basically it has to read the total value ) and i'm able to add the second row and change the focus to cell2 in second row(which is correct) and when I scanned the barcode again it was reading only one letter and added new row in table and changed focus to cell2 in 3rd row and so on. When I scanned the 5th row (which is last record )at the time it was scanning properly and I'm getting the total value in input.

I have written the logic in liveChange event.



var value = evt.getParameter("value");

var oContext = evt.getSource().getParent().getParent().getBindingContext();

var oMaterialIndex = oContext.getPath().split('/')[2]; var object = oContext.getObject(); if(object.Werks == '1' ){


// if (value && value.length <= 10) {

// this.timer = setTimeout(this.gotoNextLine(evt,oContext,oMaterialIndex,object), 250)

// } else if (value && value.length == 10) {

// if (this.timer) {

// clearTimeout(this.timer);

// }

// this.gotoNextLine(evt,oContext,oMaterialIndex,object);

// }




this.MaterialIndex = parseInt(oMaterialIndex);

var oItemIndex = parseInt(evt.getSource().getBindingContext().getPath().split('/')[4]); object.BatchData[oItemIndex].QtyPick=1;

object.BatchData[oItemIndex].Batch =evt.getParameter("newValue");

object.BatchData.push({ Lgort : object.MainLgort, Batch : "", QtyDisp : "?", QtyPick : 0, SAPStatus : "", SAP : false, Uecha : object.Posnr });

var oTable = this.getView().byId('idList');

var oItem = oTable.getItems()[olength];



10 |10000 characters needed characters left characters exceeded

How to add new row and change focus to next row after barcode scanning.

* Please Login or Register to Answer, Follow or Comment.

0 Answers