Skip to Content
UI Web Dynpro Java

Tutorials & Samples for Web Dynpro Java

Tags:

This page is intended not only to provide tutorials on the basic Web Dynpro concepts, but to help you solving typical issues. To understand Web Dynpro Java, there is no need to have all tutorials done.

attentionSome samples are built for SAP NetWeaver 2004, so, if you are using NetWeaver 7.0 (2004s) and you get errors after importing a sample project, select your project in the Web Dynpro Explorer, open the context menu and choose Repair -> Project Structure and Classpath. This is also true for all tutorials you find here: Web Dynpro Java Tutorials and Samples NW 2004

Prerequisites
SAP NetWeaver Application Server 7.0 for Java is required to use these resources. In most cases, it is sufficient that you have installed Sneak Preview SAP NetWeaver Edition from SDN.

Disclaimer

SAP code or applications samples and tutorials are NOT FOR PRODUCTION USE. You may not demonstrate, test, examine, evaluate or otherwise use them in a live operating environment or with data that has not been sufficiently backed up. You may not rent, lease, lend, or resell SAP code or application samples and tutorials.


Basic & General

Creating a Hello World in Web Dynpro Java
This tutorial is a version of the popular “Hello World” program. You will write a very simple Web Dynpro application that places the text “Welcome to Web Dynpro” on the user’s browser.


Creating Your First Web Dynpro Application
 
This tutorial is more than a Hello World, it demonstrates some basic concepts. It gives you a starting point for handling navigation, mapping contexts and binding data.

The ready-to-use project is available here.

Componentization

Talking about componentization in the Web Dynpro environment, this term can stand for have two different things:
On the one hand developing in a team with Web Dynpro Development Components in the NWDI, on the other hand structuring your Web Dynpro project using Web Dynpro Components inside.

Component-based Development from Database Table to Web Dynpro using NWDI   
This tutorial shows how to create a complete application based on database persistence, EJB, Web service and Web Dynpro Java. You will define different types of Development Components (DC) in the SAP NetWeaver Development Infratructure (NWDI) such as Dictionary project, Library project or EJB module project. Finally you will use the Adaptive Web Service Model in a Web Dynpro Java DC to build the user interface.

Web Dynpro Componentization   
This tutorial provides a set of local Web Dynpro DCs illustrates how to design component-based Web Dynpro applications using separate Web Dynpro DCs. In a simple application we demonstrate how to embed the visual interface of a Web Dynpro component into a parent component within one single Web Dynpro DC. Another advanced application demonstrates how to apply the model-view-controller (MVC) paradigm on a DC level for logically structuring large-scale Web Dynpro applications. One root component embeds two separate user interface components, both of which use a single model component in referencing mode. The lifecycle of the UI and the model components are managed by the root component. This scenario is based on three separate Web Dynpro DCs.

The ready-to-use Web Dynpro Development Components can be downloaded here.


Note: This Readme describes how to import the local Web Dynpro DCs into the SAP NetWeaver Developer Studio.

Use components in bigger Web Dynpro projects (Wiki)
This section wants to give you some hints on how to migrate from a "one-component-only" application to an application that uses components.

Backend Access - Model

Accessing ABAP Functions using the Adaptive RFC Model  
This example demonstrates how to create, implement, deploy and run a basic Web Dynpro application that accesses persistent data from a remote SAP backend system. To read the business data, the application makes use of existing functions in the form of readable BAPIs. The Web Dynpro framework generates for each BAPI that is needed a corresponding Java proxy class. All generated classes define an adaptive RFC model and are treated as part of the Web Dynpro project.

Designing User Interfaces

Designing User Interfaces with Web Dynpro  
This tutorial helps you get familar with the different layout options you have to structure UI elements on a view. It explains some standards & guidelines.

The ready-to-use project is available here.

Working with Tables  
This tutorial explains the basic functions of the Table UI element, e. g. creating the necessary UI elements, binding the data and mapping the context. Additionally it provides some additional features like sorting, displaying details in a form, calculating the totals and deleting rows.

Creating Trees   
This Web Dynpro tutorial teaches you how to construct a recursive and loadable tree in Web Dynpro. It can also be used to understand how to implement a tree structure inside a table using the TreeByNestingTable UI element.

Uploading and Downloading Files  
In this tutorial you learn how to download and upload files within Web Dynpro applications running on SAP NetWeaver 7.0 (2004s) by utilizing the new dictionary type Resource and its related Web Dynpro APIs IWDResource and WDResourceFactory. In contrast to the dynamic type modification of a binary context attribute in SAP NetWeaver 04, the new dictionary simple type Resource yields a fully declarative, zero coding data transport of download and upload resources between Web Dynpro client and controller context on server side.

The ready-to-use project is available here.
Additionally there is an initial project (starting point) here.


How to Use Web Dynpro Popup Menus   
You learn how to add a popup menu to a Tray UI element, how to declare menu item events and how to disable or enable menu action items by programmatically disabling or enabling the associated action objects within action event handlers.

The ready-to-use Web Dynpro DCs are available here.

Note: This Readme describes how to import the local Web Dynpro DCs into the SAP NetWeaver Developer Studio.

Using Gantt/Network UI Element (Wiki) 
To run a JNet or a JGantt in a Web Dynpro for Java application, you have to follow the steps described below. This example does not describe how to build the xml file for a Gantt or for a Network, it focuses on the Web Dynpro part. This example explains how to bind a Gantt UI element and its data source to the context. This works exactly the same way for the Network UI element.

SAP Interactive Forms by Adobe

eLearning Series  
The 11-part series on SAP Interactive Forms by Adobe, produced by the SAP NetWeaver RIG team, provides an overview of forms technology, its integration points with SAP NetWeaver Application Server, technical components and architecture, use cases, how to design and run a form, and much more.

Relevant parts for Web Dynpro Java are:


Specials

Exporting Table Data Using On-Demand Streams (Wiki)
How to download data from a table using the on-demand resource streaming technique in NetWeaver 7.0 combined with a ToolBarLinkToURL-UI-Element to open the Excel resource instantly. This technique does not require opening a Web Dynpro popup window with a LinkToURL-UI-element pointing to a cached Excel resource. This sample application is implemented in two separate components: a reusable service component for Excel export and a client component displaying table data.

Developing an International Web Dynpro Application  
In this tutorial, the task is to develop an international Web Dynpro application that is available in English and German. As an example, we will use a car rental application that displays different texts, depending on the booking. You will also learn to use Simple Types and Message Pool.

Former Member

No comments