In this lesson, you make your Flight Reservation application easier to use by creating an entry list for selecting a country in the Request Flights input form. The entry list displays a list of countries and their codes, and uses the country code value required as input for the Bapi_sflight_getlist data service.
· You have created the model as described in Adding a Second Data Service and it is open in Storyboard.
· The following data service is available from the system:
For more information about configuring access to data services, see Defining Destinations.
1. In the Request Flights input form, change the To country and From country input fields to Combo Box controls:
a. On the Layout board, right-click the From country input field and from the context menu choose Change Control Type ® Combo Box.
b. Repeat this process for the To country input field.
a. Right-click the From country dropdown list and choose Entry List from the context menu.
b. In the Name field, enter a name for the list, for example, Countries.
c. Select the Dynamic option and click Next. A dynamic list automatically displays the values from the selected data service field at runtime (whereas a static list displays values that you define manually).
3. Locate the data service that you require:
a. From the Search in dropdown list, choose the IDES system (the source of the data that we need), such as IDES_R3.
b. From the Search for dropdown list, enter the name of the data service ISA_GET_COUNTRY_LIST.
c. Click Search and then choose the ISA_GET_COUNTRY_LIST data service from the Results list.
d. Click Next.
4. Configure the input parameters:
a. Drag from the Request Flights item on the left to the Input item on the right, to map the data flow between the elements.
b. Select the mapping line, and in the Assigned Value column, enter the value EN then click elsewhere in the dialog box. This indicates that the value EN is the input to the data service so that the entry list items are the English values.
c. Click Next.
a. From the Output port dropdown list, choose COUNTRYLIST.
b. In the Assigned Value column, select the following values from the fx dropdown list:
§ VALUE: Land1
§ TEXT: Landx
These values indicate that the field values for the dropdown list items are taken from the Land1 data service field, while the display names are taken from the Landx data service field.
c. Click Finish.
6. Repeat steps 2 to 5 to create the same dynamic entry list for the To country dropdown list.
7. Save the model.
8. Deploy the application:
a. Click the Deploy button in the task-panel toolbar.
b. Click the Deploy button in the Deploy task panel.
9. In the Results area of the Deploy task panel, expand the node of the development component you created, expand the Web Dynpronode, and click the Flights link under the Html or Flex node to run the application.
10. Verify that you can either enter a country code or choose a country from a list. Use the following values:
¡ From city: New York
¡ From country: United States
¡ To city: Frankfurt
○ To country: Germany
The Search Flight form in the runtime application enables you to enter a country code in the To country and From country fields, or to click the button to select a country value from a list. The form should look similar to this: