cancel
Showing results for 
Search instead for 
Did you mean: 

BarcodeReader:- onRead event is not getting invoked

former_member185029
Active Contributor
0 Kudos

Hello experts,

I am facing problem while using Barcode and associated Event onRead.

I have gone through the example that SAP has given.


public void onActionScan(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String scanData )

  {

    //@@begin onActionScan(ServerEvent)

      wdThis.wdGetContext().currentContextElement().setData(scanData);

    //@@end
 
  }
 

 

public static void wdDoModifyView(IPrivateBarCodeTestView wdThis, IPrivateBarCodeTestView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)

  {

    //@@begin wdDoModifyView


      if (firstTime) {

         IWDBarCodeReader barCodeReader = (IWDBarCodeReader) view.getElement("BarCodeReader");

        

         barCodeReader.mappingOfOnRead().addSourceMapping("barCode", "scanData");

   }

 

    //@@end
}

Trust me, I have been following each and every instruction mentioned in the example.

I have a symbol scanning so I have kept type=symbol in the BarcodeReader property.

But all this hardwork() did not prove fruitful to me.

I am unable to get desired output.

The event onRead is not getting fired even when I scan the data from handhelp device.

I am using NWDS SP-16.

I appreaciate any sugesstion/solution given to my query.

Regards,

Ashutosh

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ashutosh,

See OSS note below. You need special Symbol or Intermec browser loaded on your device to use Mobile controls like barcode reader/RFID reader and function key UI.

We also had to force client on URL to get mobile UI's to work.?sap-wd-client=PieClient. This was due to WD device recognition detecting PIE02 or PIE03 client and mobile UI's did not work under this...

Note 894627 - Browser for Web Dynpro applications on Barcode/RFID devices

Regards,

Keith

Former Member
0 Kudos

Hi Ashutosh,

my guess was wrong: You don't need to map the second parameter.

Next hint: Try using the PieClient (force through the URL parameter sap-wd-client=PieClient).

Kind Regards

Stefanie

former_member185029
Active Contributor
0 Kudos

Hello Stefanie,

I am already using PieClient for handheld.

Regards,

Ashutosh

Former Member
0 Kudos

Hi Ashutosh,

which example? Can you give me a link that I can check it?

It's just a guess:

The event onRead has two event parameters:

String barCode - Event parameter for scanned barcode.

String type - Event parameter for the type of barcode standards

Maybe you have to map the type parameter, too.

Kind Regards

Stefanie

former_member185029
Active Contributor
0 Kudos

Hello Stefanie,

Please see,

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/b7/3efd406b8af16fe10000000a1550b0/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/b7/3efd406b8af16fe10000000a1550b0/frameset.htm</a>

I had no idea about the second parameter, type.

I added that parameter in onRead event.

But it didn't work.

Just to updated you, I am using NWDS SP16.

Regards,

Ashutosh Moharir