Web Dynpro for ABAP: Tutorial 1- Create a simple Web Dynpro Application

Similar documents
How To Configure MDM to Work with Oracle ASM-Based Products

Sales Rush Sales Order Processing S01- Lean Baseline Package. SAP Lean Baseline Package Version: V1.500 Country: UK Language: EN Date: February 2006

Download and Install Crystal Reports for Eclipse via the Eclipse Software Update Manager

CREATING A PURCHASE ORDER STORE RECORD WEB SERVICE

How to Schedule Report Execution and Mailing

How to Configure and Trouble Shoot Notification for Process Control 2.5

Configuring Distribution List in Compliant User Provisioning

How to Set Up an Authorization for a Business Partner in Customer Relationship Management (CRM) Internet Sales: Sample Case

Implementing Outlook Integration for SAP Business One

Extract Archived Data from SAP ERP

How to Create Web Dynpro-Based iviews. Based on SAP NetWeaver 04 Stack 09. Jochen Guertler

SAP GRC Access Control: Background jobs for risk analysis and remediation (formerly Virsa Compliance Calibrator)

Backup & Restore with SAP BPC (MS SQL 2005)

How to configure BusinessObjects Enterprise with Citrix Presentation Server 4.0

How To... Integrate Custom Formulas into the Formula Builder

Developing Applications for Integration between PI and SAP ERP in Different Network Domains or Landscapes

Installation Guide Customized Installation of SQL Server 2008 for an SAP System with SQL4SAP.VBS

3 rd party Service Desk interface

Integration of SAP central user administration with Microsoft Active Directory

Posting Messages into XI

How to Configure Access Control for Exchange using PowerShell Cmdlets A Step-by-Step guide

How To... Call BEx Web Applications from SAP BusinessObjects Dashboards (Xcelsius) and vice versa

Ronald Bueck SBO Product Definition

Analyzing Sales Data for Choosing Forecast Strategies

SAP Master Data Governance- Hiding fields in the change request User Interface

Integrate Third Party Collaboration Tools in the SAP NetWeaver Portal. SAP NetWeaver Product Management

How To Balance In Sap Bw

UI Framework Simple Search in CRM WebClient based on NetWeaver Enterprise Search (ABAP) SAP Enhancement Package 1 for SAP CRM 7.0

SAP CCMS Monitors Microsoft Windows Eventlog

Utilities for downloading and uploading OO ABAP classes in XML format

Roster Configuration (Payroll) in SAP ECC 6.0 Tips & Tricks

Using SAP Logon Tickets for Single Sign on to Microsoft based web applications

prioritize XI messages on integration server

Performance Best Practices Guide for SAP NetWeaver Portal 7.3

Methodology to Implement SAP Process Integration

Integrating Easy Document Management System in SAP DMS

TM111. ERP Integration for Order Management (Shipper Specific) COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

Business One in Action - How can we post bank fees and charges while posting Incoming or Outgoing Payment transactions?

Data Archiving in CRM: a Brief Overview

Workflow extended notifications

UI Framework Logo exchange without skin copy. SAP Enhancement Package 1 for SAP CRM 7.0

Maintaining Different Addresses and Ids for a Business Partner via CRM Web UI

SAP NetWeaver MDM 5.5 SP3 SAP Portal iviews Installation & Configuration. Ron Hendrickx SAP NetWeaver RIG Americas Foundation Team

Global Transport Label - General Motors -

E-Recruiting Job Board Integration using XI

Process Archiving using NetWeaver Business Process Management

Enterprise Software - Applications, Technologies and Programming

Integration of SAP Netweaver User Management with LDAP

Table of Contents. How to Find Database Index usage per ABAP Report and Creating an Index

Collaboration Technology Support Center - Microsoft - Collaboration Brief

R/3 and J2EE Setup for Digital Signature on Form 16 in HR Systems

Integration of Universal Worklist into Microsoft Office SharePoint

SAPFIN. Overview of SAP ERP Financials COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

Problems with your Data Model in SAP NetWeaver MDM Do s and Don ts

Alert Notification in SAP Supply Network Collaboration. SNC Extension Guide

HR400 SAP ERP HCM Payroll Configuration

SAP NetWeaver 04 Security Guide. Security Guide for SAP Mobile Infrastructure

NetWeaver Business Client (NWBC) for Incentives and Commissions Management (ICM)

Debugging Portal Applications

Enabling Full-Text Search for Business Objects in mysap ERP

Single Sign-On between SAP Portal and SuccessFactors

How to Create a Support Message in SAP Service Marketplace

SAP SYSTEM MEASUREMENT GUIDE

Third Party Digital Asset Management Integration

BC407 Reporting: QuickViewer, InfoSet Query and SAP Query

How to Add an Attribute to a Case, Record and a Document in NW Folder Management (ex-records Management)

AC200. Basics of Customizing for Financial Accounting: General Ledger, Accounts Receivable, Accounts Payable COURSE OUTLINE

Understanding HR Schema and PCR with an Example

ARCHIVING OF IDOCS IN SAP

Log Analysis Tool for SAP NetWeaver AS Java

Monitoring and Management of Landscapes with SAP NetWeaver Administrator. Dieter Krieger, SAP AG

Budget Control by Cost Center

NWBC10 NetWeaver Business Client

Data Source Enhancement Using User Exit

UI Framework Task Based User Interface. SAP Enhancement Package 1 for SAP CRM 7.0

Consume an External Web Service in a Nutshell with good old ABAP

K in Identify the differences between the universe design tool and the information design tool

How To Use the ESR Eclipse Tool with the Enterprise Service Repository

How To... configure and execute Business Process Flows in SAP BusinessObjects Planning and Consolidation 7.5 version for SAP NetWeaver

Xcelsius Dashboards on SAP NetWaver BW Implementation Best Practices

Portfolio and Project Management 5.0: Excel Integration for Financial and Capacity Planning

Balance Sheet and Profit & Loss Statement in SAP BW

Variable Exit in Sap BI How to Start

Service Level Reporting for Business Process Monitoring

mysap ERP Talent Management Dr. Christian Acosta-Flamma

ERP Quotation and Sales Order in CRM WebClient UI Detailed View. SAP Enhancement Package 1 for SAP CRM 7.0 CRM Sales - SFA

BC481 SAP Interactive Forms by Adobe

Secure MobiLink Synchronization using Microsoft IIS and the MobiLink Redirector

SAP How-To Guide: Develop a Custom Master Data Object in SAP MDG (Master Data Governance)

SAP Best Practices Account and Contact Management (C66) Business Process Documentation

SAP Web SAP Logging & Tracing API. Jeff Gebo SAP Labs, LLC.

DATA ARCHIVING IN SAP R/3 ENTERPRISE. Georg Fischer PM Data Archiving SAP AG

SEM and Budget Preparation. David Reifschneider Sr. Consultant, SAP SI America

Business Requirements... 3 Analytics... 3 Typical Use Cases... 8 Related Content... 9 Copyright... 10

BC450 ABAP Performance: Analysis and Optimization

How To Use the BPC Mass User Management Tool in BPC 10.0 NW

Duet Enterprise Add SAP ERP Reports and SAP BI Queries/Workbooks to Duet Enterprise Configuration

Mass Maintenance of Procurement Data in SAP

Security Audit Log (BC-SEC)

Transcription:

Web Dynpro for ABAP: Tutorial 1- Create a simple Web Dynpro Application SAP NetWeaver 04s

Copyright Copyright 2005 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iseries, pseries, xseries, zseries, z/os, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mysap, mysap.com, xapps, xapp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 2

Icons in Body Text Icon Meaning Caution Example Note Recommendation Syntax Additional icons are used in SAP Library documentation to help you identify different types of information at a glance. For more information, see Help on Help General Information Classes and Information Classes for Business Information Warehouse on the first page of any version of SAP Library. Typographic Conventions Type Style Example text Example text EXAMPLE TEXT Example text Example text <Example text> EXAMPLE TEXT Description Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options. Cross-references to other documentation. Emphasized words or phrases in body text, graphic titles, and table titles. Technical names of system objects. These include report names, program names, transaction codes, table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE. Output on the screen. This includes file and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools. Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation. Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system. Keys on the keyboard, for example, F2 or ENTER. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 3

Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application... 5 Development Objectives... 5 Procedure... 5 Creating a Web Dynpro Component... 5 Creating a new View and Assigning the View to the Window... 8 Creating a View Context for MAINVIEW... 11 Creating a corresponding UI Element for the context node SFLIGHT_NODE... 14 Supply data from Table SFLIGHT at runtime... 19 Creating a Web Dynpro Application... 20 Activating and running your Application... 21 Result... 23 SAP Online Help... 23 Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 4

... 19.12.2005 Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application Development Objectives In this step-by-step tutorial you will create a simple Web Dynpro component, which consists of one view. For the view, you will create a view context, which is linked to a table element on the view layout and which contains the data from table SFLIGHT. This table will be displayed in the browser at runtime. Furthermore, you will create a Web Dynpro application for this simple Web Dynpro component, which can be run in the browser. Procedure Creating a Web Dynpro Component 1. Start ABAP Workbench (SE80) and select Web-Dynpro-Comp./Intf. from the available object list. 2. To create a new Web Dynpro component, enter the name ZZ_00_SFLIGHT for the new component in the selection dialog of the object list, and select Display. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 5

3. In the dialog box that appears, you can enter a description of the new object and select as type Web Dynpro Component. In this dialog you also have the chance to maintain the name of the default window. Assign the component ZZ_00_SFLIGHT to package $TMP. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 6

As a result, you can now see the newly created Web Dynpro component ZZ_00_SFLIGHT object tree, which contains the objects component controller, component interface (which contains the entries interface controller and interface views) and windows. You can access the objects using double-click. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 7

... 19.12.2005 Creating a new View and Assigning the View to the Window 1. Click on the Web Dynpro component ZZ_00_SFLIGHT in the object tree and open the context menu to create a new view. 2. Create a view MAINVIEW. The View Editor will be started on the right side of the Workbench window. In order to open the Layout tab and the View Designer, a popup appears asking for user and password for the SAP Web Application Server. Use the same user/password which you used for logon to the SAP system. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 8

3. Save the view MAINVIEW. After saving the view MAINVIEW, it appears in the object tree of the Web Dynpro component under entry Views. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 9

4. Now open window ZZ_00_SFLIGHT by clicking on Windows and double-clicking on ZZ_00_SFLIGHT. Switch to change mode. 5. Now open the view structure and move the view MAINVIEW inside the window structure on the right hand side by Drag and Drop. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 10

Select view MAINVIEW and switch to tab Context. Create a node in the View Controller by opening the context menu... 19.12.2005 Open the window structure on the right hand side and you will see the embedded MAINVIEW. 6. Save your changes. Creating a View Context for MAINVIEW 1. Open the View Editor for view MAINVIEW and switch to tab Context. Create a context node SFLIGHT_NODE in the View Controller by opening the corresponding context menu. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 11

Maintain the properties according to the screen shot below. Select SFLIGHT as Dictionary Structure and 0 n for the Cardinality. Select button Add Attribute from Structure and select all components of structure SFLIGHT. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 12

Press OK. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 13

... 19.12.2005 The result should look like this: You have now created a context node SFLIGHT_NODE which refers to the data structure of table SFLIGHT and which can contain 0 to n entries at runtime. The context node has been created in the view context, since no data exchange with other views is planned. Therefore, the component controller context usage is not necessary. 2. Save your changes of view MAINVIEW. Creating a corresponding UI Element for the context node SFLIGHT_NODE 1. Switch to tab Layout of view MAINVIEW. 2. Insert a new UI element of type table under ROOTUIELEMENTCONTAINER and assign the properties in the given table. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 14

The name of the table is SFLIGHT_TABLE. 3. Create the binding of SFLIGHT_TABLE with context node SFLIGHT_NODE, select Text View as Standard Cell Editors and activate bindings for all cells. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 15

Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 16

Select context node SFLIGHT_NODE and press Continue. Make sure that the binding for all context attributes is enabled (all checkboxes are activated) and press Confirm Entry (Enter). Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 17

The result should look like this: 4. Modify the property text of UI element Caption_1 to value Flights. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 18

5. Save your changes. Supply data from Table SFLIGHT at runtime Switch to tab Methods of view MAINVIEW and double-click method WDDOINIT. Enter the given coding... 1. Switch to tab Methods of view MAINVIEW and double-click method WDDOINIT. Enter the given coding. method WDDOINIT. * data declaration data: Node_sflight Itab_sflight type REF TO IF_WD_CONTEXT_NODE, type standard table of SFLIGHT. * get data from table SFLIGHT select * from SFLIGHT into table Itab_sflight. * navigate from <CONTEXT> to <SFLIGHT> via lead selection Node_sflight = wd_context->get_child_node( Name = `SFLIGHT_NODE` ). * bind internal table to context node <SFLIGHT> Node_sflight->Bind_Table( Itab_sflight ). endmethod. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 19

... 19.12.2005 On initialization of view MAINVIEW, the content of table SFLIGHT is loaded into an internal table and assigned to the data structure of context node SFLIGHT_NODE. In productive Web Dynpro applications, you should not access database tables directly from Web Dynpro methods, but use supply functions or BAPI calls for data access. Direct select statements as used above will lead to a usability warning during code check. 2. Save your changes. Creating a Web Dynpro Application 1. Click on the Web Dynpro component ZZ_00_SFLIGHT in the object tree and open the context menu to create a new application. 2. Enter a name (or accept the proposed name) and press Continue (Enter). 3. Save as local object. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 20

... 19.12.2005 Activating and running your Application 1. Activate all objects. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 21

2. Select all relevant objects and press Continue (Enter). 3. To start the application, right click on your Web Dynpro application entry and select context menu entry Test. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 22

A browser will be started to run the Web Dypro application. Log on using the same credentials as before. The result page should look like this: Result You have now created a Web Dynpro component which contains one view MAINVIEW. On view MAINVIEW a table element is displayed which is mapped to the view context node SFLIGHT_NODE. SFLIGHT_NODE represents the structure of database table SFLIGHT and is filled on initialization with data from SFLIGHT. Furthermore, you have created a Web Dynpro application (as handle for the Web Dynpro component) which can be started directly via URL. The result screen is a table which displays SFLIGHT data. SAP Online Help More information on Web Dynpro for ABAP can be found at the SAP Help Portal under the short link http://help.sap.com/saphelp_nw04s/helpdata/en/77/3545415ea6f523e10000000a155106/fram eset.htm or via path help.sap.com Documentation SAP NetWeaver SAP NetWeaver 2004s English SAP NetWeaver Library SAP NetWeaver by Key Capability Application Platform by Key Capability ABAP Technology UI Technology Web UI Technology Web Dynpro for ABAP. Web Dynpro for ABAP: Tutorial 1 - Create a simple Web Dynpro Application 23