net311 advanced abap web dynpro

Download NET311 Advanced ABAP Web Dynpro

Post on 28-Oct-2014

131 views

Category:

Documents

6 download

Embed Size (px)

TRANSCRIPT

NET311Advanced ABAP Web DynproSAP NetWeaver

Date Training Center Instructors Education Website

Participant HandbookCourse Version: 2006 Q2 Course Duration: 2 Day(s) Material Number: 50084905

An SAP course - use it to learn, reference it for work

CopyrightCopyright 2007 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.

Trademarks Microsoft, WINDOWS, NT, EXCEL, Word, PowerPoint and SQL Server are registered trademarks of Microsoft Corporation. IBM, DB2, OS/2, DB2/6000, Parallel Sysplex, MVS/ESA, RS/6000, AIX, S/390, AS/400, OS/390, and OS/400 are registered trademarks of IBM Corporation. ORACLE is a registered trademark of ORACLE Corporation. INFORMIX-OnLine for SAP and INFORMIX Dynamic ServerTM are registered trademarks of Informix Software Incorporated. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, the Citrix logo, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, MultiWin and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc. HTML, DHTML, XML, XHTML 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. SAP, SAP Logo, R/2, RIVA, R/3, SAP ArchiveLink, SAP Business Workflow, WebFlow, SAP EarlyWatch, BAPI, SAPPHIRE, Management Cockpit, mySAP.com Logo and mySAP.com are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other products mentioned are trademarks or registered trademarks of their respective companies.

DisclaimerTHESE MATERIALS ARE PROVIDED BY SAP ON AN "AS IS" BASIS, AND SAP EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR APPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THESE MATERIALS AND THE SERVICE, INFORMATION, TEXT, GRAPHICS, LINKS, OR ANY OTHER MATERIALS AND PRODUCTS CONTAINED HEREIN. IN NO EVENT SHALL SAP BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES OF ANY KIND WHATSOEVER, INCLUDING WITHOUT LIMITATION LOST REVENUES OR LOST PROFITS, WHICH MAY RESULT FROM THE USE OF THESE MATERIALS OR INCLUDED SOFTWARE COMPONENTS.

g2007526112259

About This HandbookThis handbook is intended to complement the instructor-led presentation of this course, and serve as a source of reference. It is not suitable for self-study.

Typographic ConventionsAmerican English is the standard used in this handbook. The following typographic conventions are also used. Type Style Example text Description Words or characters that appear on the screen. These include field names, screen titles, pushbuttons as well as menu names, paths, and options. Also used for cross-references to other documentation both internal (in this documentation) and external (in other locations, such as SAPNet). Example text EXAMPLE TEXT Emphasized words or phrases in body text, titles of graphics, and tables Names of elements in the system. These include report names, program names, transaction codes, table names, and individual key words of a programming language, when surrounded by body text, for example SELECT and INCLUDE. Screen output. This includes file and directory names and their paths, messages, names of variables and parameters, and passages of the source text of a program. Exact user entry. These are words and characters that you enter in the system exactly as they appear in the documentation. Variable user entry. Pointed brackets indicate that you replace these words and characters with appropriate entries.

Example text

Example text

2007/Q3

2007 SAP AG. All rights reserved.

iii

About This Handbook

NET311

Icons in Body TextThe following icons are used in this handbook. Icon Meaning For more information, tips, or background Note or further explanation of previous point Exception or caution Procedures

Indicates that the item is displayed in the instructor's presentation.

iv

2007 SAP AG. All rights reserved.

2007/Q3

ContentsCourse Overview ......................................................... viiCourse Goals ...........................................................vii Course Objectives .....................................................vii

Unit 1: Introduction........................................................ 1Web Dynpro Basics.....................................................2

Unit 2: Web Dynpro Programming ................................... 31The ABAP Web Dynpro API in Detail .............................. 33 Dialog Boxes .......................................................... 58 Advanced Component Usage ....................................... 86 Personalization .......................................................135

Unit 3: Enhancements ................................................. 177Enhancements for ABAP Web Dynpro............................178

Appendix 1: Tips & Tricks for efficient Programming

....... 205

Index ....................................................................... 217

2007/Q3

2007 SAP AG. All rights reserved.

v

Contents

NET311

vi

2007 SAP AG. All rights reserved.

2007/Q3

Course OverviewThis course is the successor of NET310 - ABAP Web Dynpro. It contains advanced topics related to controller programming, which are not covered by the introduction course. This includes a detailed discussion of important interfaces that are provided by the Web Dynpro framework and an overview of how to enhance Web Dynpro applications.

Target AudienceThis course is intended for the following audiences: Developers and consultants who would like to create or change complex applications based on the ABAP Web Dynpro programming model.

Course PrerequisitesRequired Knowledge NET310 - ABAP Web Dynpro It is inalienable that you have created some basic ABAP Web Dynpro applications by your own before attending this course.

Course GoalsThis course will prepare you to: Create complex ABAP Web Dynpro applications.

Course ObjectivesAfter completing this course, you will be able to: Understand, how a controller's interface is generated from its meta data. Explain, what parts of a controller interface are visible to other controllers in the same component or another component. Access the functionality provided statically by the Web Dynpro framework. Create all kinds of pop-ups. Use Web Dynpro component interfaces, clone used components and use components dynamically. Define and use configuration, customizing and personalization of Web Dynpro applications. Enhance existing Web Dynpro components.

2007/Q3

2007 SAP AG. All rights reserved.

vii

Course Overview

NET311

SAP Software Component InformationThe information in this course pertains to the following SAP Software Components and releases:

viii

2007 SAP AG. All rights reserved.

2007/Q3

Unit 1IntroductionUnit OverviewThis unit summarizes the basics of ABAP Web Dynpro which are explained in detail in the course NET310.

Unit ObjectivesAfter completing this unit, you will be able to: Explain the Web Dynpro architecture and concepts Know how to use the Web Dynpro controller entities

Unit ContentsLesson: Web Dynpro Basics .....................................................2 Exercise 1: Create a simple Web Dynpro application .................. 21

2007/Q3

2007 SAP AG. All rights reserved.

1

Unit 1: Introduction

NET311

Lesson: Web Dynpro BasicsLesson OverviewThis lessons summarizes the content of course NET310 in short. This includes the Web Dynpro architecture, Web Dynpro controllers and their constituents and the basics about Web Dynpro component reuse.

Lesson ObjectivesAfter completing this lesson, you will be able to: Explain the Web Dynpro architecture and concepts Know how to use the Web Dynpro controller entities

Business ExampleYou are a project lead. You would like to ensure, that all of your project members understand the basic concepts and terms related to ABAP Web Dynpro.

Web Dynpro ArchitectureA Web Dynpro application refers to a Web Dynpro component, which serves as a container for entities which are related to the user interface or which are related to the control flow. The component entities and their dependencies are summed up in the following section.

Internally visible Component EntitiesViews are the basic entities from which the user interface (UI) is derived. Views allow to define a rectangular part of the UI (Layout tab) by means of pre-defined UI elements. UI element properties can be defined statically or they can be bound to the view's context. This allows to influence the element properties from the source code of the view's controller (data binding). In addition, the view controller methods encapsulate the code for checking the user input, to trigger the navigation via firing outbound plugs and to handle a navigation request via inbound plugs. Changing the UI element hierarchy is also possible at runtime. Views are embedded in windows. Windows allow to define which views may be visible for a certain application connec