The following tutorial shows you how to design, implement, deploy, and run a basic Web Dynpro application that accesses persistent data from a remote SAP system. You will run this application on the SAP J2EE Engine.
In the Web Dynpro application, you will connect to the remote SAP system, the backend, using an adaptive RFC model. To access database tables, you can make use of existing functions in the form of RFC function modules. For each function module that you need, the system generates a corresponding Java proxy class. All the generated proxy classes and interface are bundled together in the RFC model and treated as part of your Web Dynpro project.
For the purposes of this tutorial, you design a simple, structured Web application, which will display flight connections between a given departure and destination airport. The user interface for this Web application will consist of only two views combined into one view set. In the first view, the user should be able to enter the departure and destination airports in the appropriate input fields and trigger display of the flight data using a Search button. As a result of this query, all the available flight data will be displayed as a table in the next view.
By the end of this tutorial, you will be able to:
! |
Create a model that is used to connect to the SAP backend from the Web Dynpro project |
! |
Generate Java proxies for function modules from a remote SAP system |
! |
Implement custom controllers for specific tasks that cannot be assigned to a single view |
! |
Create contexts for the custom controller and bind them to the model |
! |
Create view contexts and map them to the custom controller context |
! |
Bind UI controls to view context elements |
! |
Implement access to remote function modules in an SAP system |
● The SAP NetWeaver Developer Studio is installed on your computer.
● You have access to the SAP J2EE Engine.
● You have access to a remote SAP back-end system.
To test this example application successfully, you must also make sure that this SAP system contains the function module BAPI_FLIGHT_GETLIST and the appropriate data from the flight data model. To access functions within an SAP system, a user must provide this system with valid credentials by means of the logon process.
More information on the authorization profile:
○ SAP note 460089 - Minimum authorization profile for external RFC
○ SAP note 677732 - Authorization for MDI within framework of adaptive RFC
Since you are using the Web Dynpro Adaptive RFC Layer, the user ID defined in the Web Dynpro Content Administrator of your J2EE Engine will take care of the connection automatically.
● The SAP System Landscape Directory (SLD) and the SLD bridge are configured and running.
The SLD contains component information about all SAP software modules, the system landscape description and the name reservation service.
The SLD bridge is used to transform the system data to the SLD server compliant format.
For more information, see also the Post-Installation Guide for the SAP System Landscape Directory on SAP Web AS Java 6.40 or have a look at the documentation regarding SAP System Landscape Directory.
In order to connect the logical systems defined in the Adaptive RFC model with a physical SAP system you need to perform two configuration tasks:
To establish a connection to the SLD server you have to specify the HTTP connection parameters. You will carry out this task in the J2EE Engine Administrator while the J2EE Engine is running.
Proceed as follows:
Now you have defined the connection parameters for SLD server has to be used to run your application.
The logical system names used in the model declaration need to be associated with an actual SAP system defined in the SLD before this application can be executed. You will carry out this task after deploying your example application in the Web Dynpro Content Administrator.
If you do not perform this step, then you will only be able to build and deploy the application, but you will be unable to run it.
The procedure is described in the last step of this tutorial!
|
You have acquired some basic experience with Web Dynpro applications, for example by working through the Welcome tutorial (Creating Your First Web Dynpro Application). |
|
You have a basic knowledge of Java. |
|
Basic understanding of remote function modules and BAPIs would be an advantage. |