You use a model to specify where the data for your Web Dynpro application is to come from. Since you are using a remote SAP system to retrieve the flight data, you can make use of an existing model. You will import an adaptive RFC model into your project for this purpose. This step also includes in particular generating Java proxies, which represent the corresponding RFC function modules in your Web Dynpro project.
You can log on to the SAP system.
You have also made sure that the function module BAPI_FLIGHT_GETLIST exists in this SAP system and returns the appropriate flight data.
The structure of your project TutWD_FlightList_Init is currently displayed in the Web Dynpro Explorer.
1. In the project structure, expand the node Web Dynpro ® Models.
2. From the context menu, choose Create Model.
The appropriate wizard appears.
3. Choose the Import Adaptive RFC Model option, followed by Next.
4. Enter the model name FlightModel and the package name com.sap.tut.wd.flightlist.model.
When importing an adaptive RFC Model you have to specify the logical system names for model instances and RFC metadata:
· Default logical system name for model instances: WD_MODELDATA_DEST
change it to WD_FLIGHTLIST_MODELDATA_DEST
· Default logical system name for RFC metadata: WD_RFC_METADATA_DEST change it to WD_FLIGHTLIST_RFC_METADATA_DEST
The logical systems will later be separately configured using the JCO Connections screen of the J2EE Engine Web Dynpro Content Administrator (see section Building, Deploying, Configuring, and Running Your Application).
5. Accept the suggested values and choose Next.
6. Enter the appropriate data for logging on to the SAP system and choose Next.
When logging on, you can choose one of two options:
Either choose a single application server or address the system and log on using Load Balancing.
7. Enter either the complete name of the function module BAPI_FLIGHT_GETLIST in the appropriate field or enter the start of the name followed by an asterisk (*). Then choose Search.
8. Select the function module BAPI_FLIGHT_GETLIST from the list that appears.
9. Choose Next.
By doing so, you automatically trigger the generation process. The import process is logged by a detailed description, which you can see in the next dialogue.
10. Choose Finish.
The java proxies are generated and a new model node FlightModel is inserted into project structure.
The new created adaptive RFC model FlightModel can be used now in any component in the current project.