Show TOC Start of Content Area

Procedure documentation Creating Actions and Declaring Methods  Locate the document in its SAP Library structure

 

To trigger display of the flight data from the SAP system, in the SearchView, you need to create an action that can be bound to a UI element, such as a button. You can then implement the event handler, which reacts to this action.

Prerequisites

This graphic is explained in the accompanying textThis graphic is explained in the accompanying text

The structure of your project TutWD_FlightList_Init is currently displayed in the Web Dynpro Explorer.

 

Procedure

Creating the Search action

...

       1.      Open the View Designer for the SearchView.

       2.      Choose the Actions tab.

       3.      Choose the New pushbutton.

You can create a new action in the wizard that appears.

       4.      Enter the name Search for this new action, leave the other settings unchanged, and choose Finish.

An event handler, onActionSearch, is automatically created for this new action.

 

This graphic is explained in the accompanying text

 

Declaring the executeBapi_Flight_Getlist_Input() method

 

       1.      Open the editor for the custom controller FlightListCust again.

       2.      Choose the Methods tab.

       3.      Choose New.

       4.      Select the Method option and choose Next.

       5.      In the wizard screen that appears, enter the name executeBapi_Flight_Getlist_Input for this new method and assign it the return type void. Choose Finish.

The method executeBapi_Flight_Getlist_Input is added to the custom controller.

 

This graphic is explained in the accompanying text

       6.      Save the new metadata by choosing the icon This graphic is explained in the accompanying text (Save All Metadata) from the toolbar.

 

Result

You have created the Search action for the SearchView. In the next step, you will bind it to the appropriate button using the Source property.

You have also declared a new method executeBapi_Flight_Getlist_Input for the custom controller. Later, you will use this method to implement the adaptive RFC to the SAP system.

Next step:

Editing the UI Elements

 

End of Content Area