Show TOC Start of Content Area

Procedure documentation Using the FunctionKey  Locate the document in its SAP Library structure

Use

The FunctionKey allows you to trigger a Web Dynpro action using a specific key on the mobile device. In the following example, this UI element is used to navigate to another view via a specific key.

Prerequisites

     The SAP NetWeaver Developer Studio is installed on your computer, and you can use it to create your mobile Web Dynpro application

     You have access to a SAP NetWeaver Application Server, where you are running the Web Dynpro application

     You are using a Pocket PC with special scanning equipment manufactured by Intermec Technologies or Symbol Technologies

     You have created two views in a Web Dynpro project and called them StartingView and TargetView.

Procedure

...

       1.      Navigate to the StartingView and double-click the view or choose Edit from the context menu.

       2.      Insert the mobile UI element FunctionKey.

       3.      Switch to the Plugs tab, create an outbound plug with the name fromFunctionKey and define the navigation link to the TargetView.

       4.      Switch to the Actions tab page and define an action called NavigateToAnotherView.

       5.      Assign the value IBrowse_OnKey49 to the keyCode property of the FunctionKey.

       6.      Assign the NavigateToAnotherView action to the onAction event of UI element NavigateToAnotherView.

       7.      Switch to the Implementation tab and add the following source code to the implementation of the view controller. The read data is passed to the context and the relevant context attribute is set.

public void onActionNavigateToAnotherView(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

   //@@begin onActionNavigateToAnotherView(ServerEvent)

   wdThis.wdFirePlugFromFunctionKey();

   //@@end

}

Result

By pressing press key 1 on the mobile device, you navigate to the TargetView.

End of Content Area