Show TOC Start of Content Area

Component documentation Creating a Web Dynpro Application Accessing ABAP Functions   Locate the document in its SAP Library structure

 

Task

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.

User Interface template:

 

This graphic is explained in the accompanying text

 

Objectives

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

 

Prerequisites

Systems, installed applications, and authorizations

      This graphic is explained in the accompanying textThe SAP NetWeaver Developer Studio is installed on your computer.

      This graphic is explained in the accompanying textYou have access to the SAP J2EE Engine.

      This graphic is explained in the accompanying textYou 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.

      This graphic is explained in the accompanying textThe 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.

This graphic is explained in the accompanying textThis graphic is explained in the accompanying text   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:

Setting Up the SLD Connection

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:

  1. Start the J2EE Engine if you have not already done so.
  2. Start the engine administrator console using the path <Drive>:\usr\sap\<System ID>\JC00\j2ee\admin\go.bat.
  3. Choose Connect and log on to the J2EE Engine. You need administrator rights for the login process.
  4. After login, choose the Cluster tab on the left, expand the node Server, Services, and choose SLD Data Supplier.
  5. Choose CIM Client Generation Settings and specify the necessary HTTP connection parameters to establish a connection to the SLD.
  6. Save the data by pressing the Save button
  7. Choose the CIM Client Test button to check the CIM client connectivity.
  8. If the test was successful, you can close the J2EE Engine Administrator Console. Otherwise correct your connection parameters.

Now you have defined the connection parameters for SLD server has to be used to run your application.

 

Maintaining the JCO Destinations in the Web Dynpro Content Administrator

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!

 

Knowledge

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

You have acquired some basic experience with Web Dynpro applications, for example by working through the Welcome tutorial (Creating Your First Web Dynpro Application).

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

You have a basic knowledge of Java.

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

Basic understanding of remote function modules and BAPIs would be an advantage.

 

Next step:

Importing a Project Template

 

 

 

End of Content Area