Tutorial - Creating Pop Up Window Using New Features in WebDynpro Java CE 7.1 Ehp1



Similar documents
Web Dynpro ABAP: ALV and Table in Popup Window

Table of Contents. Passing Data across Components through Component Controller between Two Value Nodes

Configuration of Enterprise Services using SICF and SOA Manager

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

Web Dynpro: Multiple ALV Grids and Layouts in ALV

Reverse Transport Mechanism in SAP BI

Step by Step Guide for Language Translation Tool

SAP NetWeaver Developer Studio 7.30 Installation Guide

Creating Transaction and Screen Variants

Deploying Crystal Reports on Top of a SAP BI Query

Step by Step Guide How to Copy Flat File from Other Application Server to BI and Load through Info Package

Standard SAP Configuration of SMS through HTTP with Third Party SMS Gateway

Creating New Unit of Measure in SAP BW

Deleting the User Personalization done on Enterprise Portal

SAP CRM Campaign Automation

Creating Web Service from Function Modules/BAPIs & Integrating with SAP Interactive Forms

ABAP Debugging Tips and Tricks

Restricting Search Operators in any Search View

SAP FI - Automatic Payment Program (Configuration and Run)

Display Options in Transaction SE16

Deleting the Requests from the PSA and Change Log Tables in Business Intelligence

Quick Viewer: SAP Report Generating Tool

BW Performance Monitoring

SAP CRM System 6.0/7.0. For more information, visit the Customer Relationship Management homepage

How to Generate Stack Xml for Ehp4 and Above Upgrade

Understanding BEx Query Designer: Part-2 Structures, Selections and Formulas

SAP BW - Excel Pivot Chart and Pivot Table report (Excel)

Step by Step guide of Report-to- Report Interface in BW Reporting

Mandatory Field Check in Web Dynpro- ABAP

ALE Settings, for Communication between a BW System and an SAP System

Multi Provider Creation Based on Sales and Planning Info Cubes

How to Create an ecatt?

Step by Step Procedure to Create Broadcasters, to Schedule and to Enhance of SAP- BI Queries from Query Designer

Step by Step Procedures to Load Master Data (Attribute and Text) from FlatFile in BI 7.0

Salesforce Integration Using PI: How to Perform Query and Other DML Operations Using the Enterprise WSDL

Creation and Configuration of Business Partners in SAP CRM

XSLT Mapping in SAP PI 7.1

Forgot or Lock "Administrator or J2EE_ADMIN" Password

SAP CRM 7.0 for Newbies: (Part 1) Simple BOL Object Creation for CRM Webclient UI

Using PI to Exchange PGP Encrypted Files in a B2B Scenario

Message handling in SAP CRM Web UI

Step by Step Procedure to Block and Debug a CIF Queue Flowing from R/3 to APO System

How to Assign Transport Request for Language Translation?

Merge PDF files in ABAP

How to Integrate CRM 2007 WebClient UI with SAP NetWeaver Portal

Working with SAP BI 7.0 Data Transfer Process (DTP)

SAP BW 7.3: Exploring Semantic Partitioning

Business Scenario Using GP/Web Dynpro with Back and Forth 3 Level Process and Dynamic Approvers in a Loop

Process Controlled Workflow SRM 7.0 (Using BRF)

Embedding Crystal Reports inside ECC ALV Reports

Configuring HTTPs Connection in SAP PI 7.10

Adobe Document Service Configuration and Troubleshooting Guide

ABAP How To on SQL Trace Analysis

SDN Community Contribution

A Step-by-Step guide on SMTP Configuration and File to Mail Scenario Using Process Integration Scenario in PI 7.1

SPDD & SPAU Adjustments Handbook

Upload Data in Web Dynpro Table from a Text File with Delimiters

Splitting the Custom Container & Display more than one ALV

ABAP Proxy Interfacing

Table of Content. SAP Query creation and transport Procedure in ECC6

Understanding DSO (DataStore Object) Part 1: Standard DSO

Creating Content Using SO10 Objects and Text Symbols

Salesforce.com Integration Using SAP PI: A Case Study

This document applies to SAP ECC 6.0, SAP Netweaver 2004s. For more information, visit the Web Dynpro ABAP homepage.

SAP CRM 7.0 E2C Setup: CRM via Toolset

Consuming Services in SOA Manager

Order Split Usage in Production Orders

LSMW: Upload Master Data using Batch Input Recording

SAP Workflow in Plain English

Transfer of GL Master from Source SAP System to a Target SAP System through IDOCS

Integration of SAP R/3 with BO Universe Using Data Federator Connector

SAP NetWeaver Portal Development Kits for.net and Java

Create Automatic Mail Notification/ Alert for Process Chain Monitoring

Extractor in R/3 and Delta Queue

ALV List with Radio Buttons

Direct Subcontracting Process (SAP SD & MM)

Connecting to SAP BW with Microsoft Excel PivotTables and ODBO

Deploying JDBC drivers in PI 7.1x Systems

Step by Step Guide to Archiving and Deleting of XML Messages in SAP NetWeaver PI

Implementing TinyMCE JavaScript HTML Editor for Web Page Composer (WPC) within the SAP Portal

Invoice Collaboration: Self Billing Invoice

Credit Management in Sales and Distribution

Data Extraction and Retraction in BPC-BI

Compounding in Infoobject and Analyzing the Infoobject in a Query

Step by Step Guide to Extract Batch Master Data via Generic and Classification Datasource to BW

Workflow Troubleshooting and Monitoring in SAP ECC 6.0

StreamServe Persuasion SP5 Ad Hoc Correspondence and Correspondence Reviewer

... Introduction... 17

Sales Commission Calculation & Settlement Handling through Order Processing

Download and Installation Instructions. Android SDK and Android Development Tools (ADT) Microsoft Windows

First step to Understand a Payroll Schema

Hands-On: Introduction to Object-Oriented Programming in LabVIEW

Creating and Scheduling Publications for Dynamic Recipients on SAP Business Objects Enterprise

How to Modify, Create and Delete Table Entries from SE16

SAP CRM-BW Adapter an Overview

Different Types of Alerts for Process Chains. Table of Content

Query OLAP Cache Optimization in SAP BW

Currency Conversion using Variables in SAP BI -Reporting

Sample- for evaluation purposes only. Advanced Crystal Reports. TeachUcomp, Inc.

POINT OF SALES SYSTEM (POSS) USER MANUAL

Transcription:

Tutorial - Creating Pop Up Window Using New Features in WebDynpro Java CE 7.1 Ehp1 Applies to: SAP Net Weaver CE 7.11. For more information visit the User Interface Home Page. For more information visit the Web Dynpro Java Home Page. Summary This article deals with creating different types of windows and how to add buttons and link the user defined action handlers to the window events dynamically below the waveline of a view with an example. Author: Gayathri Kavi Company: HCL Technologies Ltd. Created on: 2 June 2009 Author Bio Gayathri Kavi is working as a Java developer in HCL Technologies Ltd on SAP Net Weaver Technology(WebDynpro Java, CAF and BPM). 2009 SAP AG 1

Table of Contents Introduction:... 3 Create WebDynpro Component:... 3 Creating the Confirmation Dialog Popup Window:... 6 Creating the Popup Window of Window Type ERROR:... 7 Creating the Popup Window of Window Type WARNING:... 10 Output:... 12 Related Content... 15 Disclaimer and Liability Notice... 16 2009 SAP AG 2

Introduction: In this article let us see how to add buttons and link the user defined action handlers to the window events dynamically below the waveline of a view with an example. In the example user has to enter the mandatory fields E Code, First Name, if the user doesn t enter any of these then a pop up window showing the error message will be displayed. If he doesn t enter the Last Name then a pop up window showing the warning message will be displayed. If he enters all the details then confirmation message will be displayed. WDWindowType is the new API introduced in CE 7.11. Window types are SUCCESS, INFORMATION, NONE, WARNING and ERROR. Create WebDynpro Component: Create the WebDynpro Component as shown below 2009 SAP AG 3

Open the controller editor of the ComponentController WindowTypeComp and create the nodes and attributes as shown below. Attribute Type Purpose popupinstance IWDWindow To store the instance of the PopUp window and later retrieve it to close the window. isinputnull boolean To check whether the user entered all the input parameters. textmessage String To display the error message in the pop up window. warningwindowinstance IWDWindow To store the instance of the window WindowTypeWarning and later retrieve it to close the window. Now the Component Controller-WindowTypeComp context will be as shown below. Create the following nodes and attributes in the WindowTypeCompView - View Controller Design the view WindowTypeCompView as shown below. 2009 SAP AG 4

Create the following Methods and Actions in the WindowTypeCompView Bind the Save action to the onaction property of Save button. The implementation of the Save action is as shown below. CheckInputValues() method will return false if the user enters the ECode and First Name. The implementation of this method is shown below. 2009 SAP AG 5

Creating the Confirmation Dialog Popup Window: createconfirmationdialog() method will display the confirmation message Employee Details saved successfully in a popupwindow. Using API IWDConfirmationDialog we can create both window and view. The implementation of the method createconfirmationdialog is as shown below. The method wdcomponentapi.getwindowmanager().createconfirmationwindow( String confirmationtext, IWDAction action, String label ) will display a window. Where confirmationtext is the text message action is the event handler for the button placed in the view and label is the name of the button. confirmationdialog.show() will make the confirmation pop up visible. In the confirmationdialog window on clicking OK button the event handler method is called. The methods destroy and destroyinstance in the API IWDConfirmationDialog are deprecated which means that the webdynpro framework will take care of destroying the instance we need not implement this. 2009 SAP AG 6

Creating the Popup Window of Window Type ERROR: Create a view say PopUpView and design it as shown below. Create the following attributes and nodes in the PopUpView The attribute text message is of type string. Design the layout of the PopUpView as shown below The PopUpView will look like this If you observe this, the view doesn t contain the waveline. We are going to create it in runtime using the domodify() method of the WindowController of PopUpWindow. Create another window say PopUpWindow. PopUpWindow will be as shown below. 2009 SAP AG 7

The context for the window should be as shown below. Attribute Type view IWDView title String Create the following event handler methods in the WindowController of the PopUpWindow. Open the java editor of the Window Controller PopUpWindow and write the following code in the domodifyview() method. 2009 SAP AG 8

In this method we will create the button OK and assign the actions to the button during runtime in the Java Editor of Window Controller PopUpWindow. This is the new feature introduced in CE 7.11. In addition to this we can set the title of the popupwindow during runtime. Let s see the implementation of the event handler method OK. We will get the PopUpWindowInstance which is saved previously from the component controller and destroy the instance. 2009 SAP AG 9

Creating the Popup Window of Window Type WARNING: Create the view WindowTypeWarningView. Create the context and nodes as shown below. Design the layout of the WindowTypeWarningView as shown below. Now the view WindowTypeWarningView will look like this. The waveline for this view will be created in the java editor of the window WindowTypeWarning. The attribute warningmessage is of type String. Add the following implementation code in the doinit() method of WindowTypeWarningView. Create the window WindowTypeWarning. Embed the view WindowTypeWarningView in this window. Create the following actions and methods in the window editor of WindowTypeWarning. Open the java editor of the window WindowTypeWarning. Write the following implementation code in the domodifyview. In this method we create the buttons and bind the actions created in the window WindowTypeWarning to the buttons dynamically and display it below the waveline of the view WindowTypeWarningView. 2009 SAP AG 10

On clicking OK a confirmation window will be displayed. The implementation for this will be as shown below. On clicking cancel the window instance will be destroyed. 2009 SAP AG 11

Output: Deploy and Run the application you will get the below shown output. Here ECode and First Name are mandatory. Don t enter input values and click Save. 2009 SAP AG 12

Now enter ECode and click Save. On clicking OK the popup window will get closed and it will go back to the Employee Details page. Now enter the First Name and click Save In the Warning Message Window click OK. 2009 SAP AG 13

Click OK. Now enter all the input parameters and click Save. 2009 SAP AG 14

Related Content WebDynpro New Features in CE 7.11 User Interface Home Page. For more information visit the Web Dynpro Java Home Page. 2009 SAP AG 15

Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document. 2009 SAP AG 16