Chapter 14. Web Dynpro for ABAP

In this chapter, we will see recipes involving Web Dynpro for ABAP. We will look at:

  • Creating trees
  • Creating navigation lists
  • Creating tabstrips
  • Displaying error messages
  • Calling dialog boxes of the same component
  • Displaying Adobe forms in Web Dynpros

Introduction

This chapter explores useful recipes related to Web Dynpro for ABAP. The Web Dynpro Development framework may be accessed using the transaction code SE80. Then, from the listbox on the left pane, select Web Dynpro. We will start with a discussion of the interfaces generated in Web Dynpro components.

Within a Web Dynpro component, a number of controllers exist, such as the component controller, the window controller, and the view controller. We may add our own attributes and methods to the various controllers. Each controller has a private interface (local interface) generated during design time. From the transaction code SE80 and Web Dynpro selected, you may use the menu path Goto | Controller Interface to see the details of this interface.

Introduction

For the component controller the name of the interface is IF_COMPONENTCONTROLLER. For the view controller, the name of this interface is of the format IF_<VIEWNAME>, and for the window controller it is IF_<WINDOWNAME>.

The attribute WD_THIS contained within the controller is a reference to the local interface in question. A wd_get_api() method is defined within the interface and provides a set of APIs (controller-specific functions) related to the controller in question.

The type of interface reference returned by the WD_GET_API method depends on the controller for which it is used. For the component controller, the interface is IF_WD_COMPONENT. In case of the view and window controllers, the IF_WD_VIEW_CONTROLLER interface is returned.

Both the interfaces, IF_WD_VIEW_CONTROLLER and IF_WD_COMPONENT include the interface IF_WD_CONTROLLER.

Introduction

The API provides useful methods for Web Dynpro programming. The interfaces provided contain a number of useful methods including generation of messages and creation of dialog boxes possible through providing access to the Message Manager and Window Manager (this will be discussed in the recipes in this chapter). The IF_WD_CONTROLLER method provides the GET_MESSAGE_MANAGER method required for generating messages, such as error messages that appear on the user screen where an incorrect input is provided. The GET_WINDOW_MANAGER method is the method provided by the IF_WD_COMPONENT interface for generating dialog boxes.

Though the window and view controllers use the interface, some methods such as GET_CURRENT_ACTION can only be called from a view controller (from the WDDOBEFOREACTION method).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.38.253