Beruflich Dokumente
Kultur Dokumente
ABAP Applications
Applies to:
WebDynpro ABAP For more information, visit the Web Dynpro ABAP homepage.
Summary
This document explains how to create popup dialog windows, external windows and confirmation boxes with
example in WebDynpro ABAP.
Author: Tulasi Palnati
Company: Yash Technologies
Created on: 21 September 2009
Author Bio
Tulasi Palnati is an Enterprise Portal Consultant at Yash Technologies, Hyderabad-India
The Task
The starting point is the application for sending an e-mail. This application contains an input form for the e-
mail addresses of the sender and the recipient, the subject, and the text.
The task of this tutorial is to assign functions to the To, Search (Google), and Send Email pushbuttons (see
figure).
If you choose to, a new Web Dynpro window containing a simple address book is displayed in a dialog box. If
you select an address in this dialog box, this is written to the input field for the recipient address.
If you choose Search (Google), an external window, which is assigned a URL address (for example,
http://www.google.com), opens.
If you choose Send Email, a confirmation dialog box containing two pushbuttons appears. Ok closes the
dialog box and new email closes the dialog box and deletes the content of the input form.
Procedure:
Create a WebDynpro Component
1. Create a new WebDynpro component by the name YDIALOGWINDOWS and view name is EMAILVIEW
2. Create Web Dynpro Application by the name Ydialogwindows
Create a Context to hold data in the component controller and define methods.
3. Double click on Component controller. Go to Context tab
4. Create Node Address book of cardinality 0..n with attributes Email and Name as of type String.
5. Create Node EMailSetting of Cardinality 1..1 with attributes
TOADDRESS,FROMADDRESS,MSGBODY,SUBJECT as of type String.
Design the Layout for EMAILVIEW and Bind the context to UI Elements
11. Drag and Drop the Context of controller to the EMAILVIEW Context. Design the layout as below.
12. Create an action ToAddress and bind to the To button. Create an action ToSearch and bind to Search
button. Create an action SendMail and bind it to Sendmail button.
13. Copy the below codes to the action TOADDRESS, TOSEARCH and
SENDMAIL.
14. Create two actions for the Confirmation Dialog Box i.e., OK and NEW_EMAIL.
Design the Layout for ADDRESSBOOKVIEW and Bind the context to UI Elements
16. Drag and Drop the Context of controller to the ADDRESSBOOKVIEW Context. Design the layout as
below.
19. Populate the static data to the Address book Table. Copy the below code into WDDOINIT() method of
ADDRESSBOOKVIEW.
Output:
Fill the data of the screen as required. When you choose To, a dialog box displaying the address book
appears.
If you complete the e-mail form and choose Send Email, the confirmation window appears.
When you choose Search (toGoogle), an external window displaying the Google homepage appears.
Related Content
Use POP UPs
WebDynpro ABAP HomePage
Sample Example in WebDynpro JAVA