Adding a Data Service for Choosing Banks 
In this example, you add a second data service to the model, to serve as input for the iView. The user will be able to input a country in the input form and select from a list of banks in that country. You also add a sort operator to sort the results returned by the first data service.
You have created the model in Creating the Base Model and it is open in Storyboard.
Copy-and-paste the first iView. This will retain your original version for future modeling.
Go to the Design board and at the top level (SecondExample) of your model, select the BanksA icon and copy it (clicking the Copy button in the main toolbar or by right-clicking and choosing Copy from the context menu).
Paste the iView onto the workspace and rename it BanksB (using the context menu).
Open (drill down into) the BanksB iView and add a second data service:
Click the Find Data button in the task-panel toolbar and drag BAPI_BANK_GETLIST onto the Design board on the left. You may have to move the existing elements to the right first. In the Define Data Service dialog box, select the BANK_LIST output port and click OK.
You can test the functionality of the Bank Getlist data service (choosing Test Data Service from the context menu) using US, DE or GB as input to the Bank Ctry field and any number for the Max Rows field.
Define the input to the new data service by dragging out from the Input port of Bank Getlist and choosing Add Input Form. In the Select Input Fields dialog box, select both checkboxes. The fields of the form are mapped automatically to the data service.
Define the output from the data service:
Because the data from the Bank Getlist data service should serve as input to the existing Bank Getdetail data service, the Input Form connected to the Input port of Bank Getdetail is not needed. Select it and delete it.
Add a sort operator:
Drag your mouse out from the Bank List output port of Bank Getlist and from the context menu, choose Sort Data. The Sort operator is added to your model.
Double-click on the operator to display the Configure Element task panel.
At the bottom of the task panel, click the
(Add) button and from the drop-down list
in the Sort by column, select BANK_NAME,
to indicate that the list should be sorted alphabetically according to bank
name. In the Direction column, leave the up option
(meaning that the list will be sorted from A to Z).
Add the table view:
Drag out from the output port of the Sort operator and choose Add Table View from the context menu. In the Select Display Fields data box, click Select All at the top and click OK.
Rename the newly-added table view icon: Bank List Table.
All of the fields from the Bank List output port of the Bank Getlist data service will be channeled through the Sort operator to the input port (in) of the Bank List Table. The fields selected for display are listed in the table at the bottom of the Configure Element task panel.
Map the output table to the input of Bank Getdetail:
Drag out from the out port of Bank List Table to the Input port of Bank Getdetail.
Double-click the select line. A list of fields is displayed at the bottom of the Configure Element task panel. Click in the BANKCOUNTRY row, click the fx at the right of the Assigned Value column, and from the drop-down list, select the corresponding field name. This maps the input field of the data service ( InputField column) to the field that is output from the table (Assigned Value column). Do the same for the BANKKEY field.
Click the Input port of the Bank Getdetail data service and select the BANKKEY row. Clear the Required checkbox at the bottom. The data service will not require that field as input from the table.
Rearrange the iView layout by clicking the Layout tab and making the changes you require. You should move the new Input Form to the top left, the Bank Address Form to the top right and the Bank List Table up beneath the Input Form. You may want to change the field labels as well.
Save the iView. It should look similar to the following:
(Adding a Second Data Service to the Model)
Deploy the iView by clicking the
(Deploy Model) button in the toolbar.
Export the model (choose ), saving it on your hard disk for subsequent use in this example.