P. 1
Course TOC ABAP Web Dynpro

Course TOC ABAP Web Dynpro

|Views: 74|Likes:
Publicado porsn99520

More info:

Published by: sn99520 on Oct 20, 2011
Direitos Autorais:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

07/24/2013

pdf

text

original

Mastering ABAP Web Dynpro ECC 6.0 Rev.

08/08/08 1
final ABAP Web Dynpro Master.doc
Mastering ABAP Web Dynpro
Contents
Introduction .......................................................................................................... 7
Unit 1 – Overview ................................................................................................. 9
Course Overview ............................................................................................. 9
Unit Overview .................................................................................................. 9
Evolution to SAP NetWeaver ........................................................................ 10
What Is SAP NetWeaver? ............................................................................. 11
Communication Interfaces............................................................................. 12
What Is ABAP Web Dynpro?......................................................................... 13
Development Considerations .................................................................. 14
Building Blocks........................................................................................ 14
How the Pieces Work Together .............................................................. 16
Scenario 1 – Creating First Web Dynpro Application .................................... 17
Creating a Package and a Change Request .......................................... 18
Create a Web Dynpro Component ......................................................... 20
Created Component Elements ............................................................... 22
Main Window (Window Controller) ......................................................... 25
The Web Dynpro Application......................................................................... 26
The Internet Component Framework Web Dynpro Relationship ............ 27
ABAP OO – Foundation Overview ................................................................ 28
ABAP Classes and Objects .................................................................... 29
Basic Syntax: Using Classes in Programs ............................................ 30
Local Classes.......................................................................................... 32
Global Classes ........................................................................................ 34
Class Components ................................................................................. 35
Class Definition ....................................................................................... 35
Static versus Instance ............................................................................. 37
Using Classes in Programs .................................................................... 37
Instantiation Process .............................................................................. 38
Functional Methods ................................................................................ 39
Inheritance/Sub Classes ......................................................................... 41
Interfaces ................................................................................................ 41
Working with Interfaces .......................................................................... 43
Introduction Klee Associates, Inc.

2 Rev. 08/08/08 Mastering ABAP Web Dynpro ECC 6.0

Events ..................................................................................................... 44
Exceptions ............................................................................................... 45
Handling Exceptions in Programs ........................................................... 47
Summary of Unit ............................................................................................ 48
Exercises ....................................................................................................... 48
Unit 2 – Web Dynpro Controllers ...................................................................... 49
Unit Overview................................................................................................. 49
Controllers – What Are They? ....................................................................... 49
Controller Types............................................................................................. 50
Components of a Controller .................................................................... 51
Component Controllers ........................................................................... 53
Custom Controllers .................................................................................. 55
Window Controllers ................................................................................. 55
View Controllers ...................................................................................... 57
Lifetime of a Controller Instance ............................................................. 60
Controller Reference Overview ...................................................................... 61
Hook Methods Execution Order – Starting Application ........................... 62
Scenario 1: Hook Methods Execution Order – Client Side Event ........... 62
Scenario 2: Standard Navigation between Views ................................... 63
Summary of Unit ............................................................................................ 70
Exercises ....................................................................................................... 70
Unit 3 –Web Dynpro Contexts ........................................................................... 71
Unit Overview................................................................................................. 71
Contexts – What Are They? ........................................................................... 72
Context Building Blocks ................................................................................. 73
Context Nodes ......................................................................................... 73
Context Attributes .................................................................................... 73
Collections and Elements ........................................................................ 73
Contexts Design/Runtime Example ........................................................ 74
Context Properties ................................................................................... 76
Creating Context Nodes and Attributes................................................... 77
Creating Attribute .................................................................................... 79
Contexts as Classes and Objects in Memory ......................................... 80
Node Cardinality ............................................................................................ 81
Singleton Property with Lead Selection ......................................................... 83
Supply Methods ............................................................................................. 85
Context Mapping ............................................................................................ 86

Klee Associates, Inc. Introduction

Mastering ABAP Web Dynpro ECC 6.0 Rev. 08/08/08 3

Scenario 3 – Create Context via Service Call Wizard ............................ 86
Summary of Unit ............................................................................................ 98
Exercises ....................................................................................................... 98
Unit 4 – User Interface ....................................................................................... 99
Unit Overview ................................................................................................ 99
User Interface Overview ................................................................................ 99
Layout Builder ....................................................................................... 101
Layout Designer Areas ......................................................................... 103
Toolbox Area......................................................................................... 104
UI Elements and Properties ........................................................................ 105
Captions and Multi-Lingual Support ............................................................ 107
Data Dictionary Texts ........................................................................... 108
Object Text Repository ......................................................................... 109
Data Fields and Binding .............................................................................. 111
Review of Context Binding .................................................................... 112
View Context Additional Attributes........................................................ 113
Value-Help from ABAP Data Dictionary ...................................................... 114
Input Help Mode ................................................................................... 115
Incorporating MIME Objects ................................................................. 116
Layout Manager .......................................................................................... 117
Layout Manager – Flow Behavior ......................................................... 118
Layout Manager – Row Behavior ......................................................... 119
Layout Manager – Grid Behavior .......................................................... 121
Layout Manager – Matrix Behavior ....................................................... 123
Table UI Element ......................................................................................... 125
Adapting the Cell Editor for a Table Cell .............................................. 127
Tables and Lead Selection ................................................................... 129
Advanced List Viewer Integration ................................................................ 131
ALV Configuration Model ...................................................................... 131
Scenario 4 – ALV Integration in Web Dynpro ............................................. 132
Summary of Unit .......................................................................................... 136
Exercises ..................................................................................................... 136
Unit 5 – Basic Programming Extensions ...................................................... 137
Unit Overview .............................................................................................. 137
Programming Extensions ............................................................................ 137
Controller Programming Extensions ..................................................... 138
Component Controller Additional Methods ........................................... 139
Introduction Klee Associates, Inc.

4 Rev. 08/08/08 Mastering ABAP Web Dynpro ECC 6.0

Controller Instance Methods ................................................................. 140
View Controllers .................................................................................... 141
Debugging – External Session .................................................................... 142
Coding Wizard ............................................................................................. 144
Attributes ............................................................................................... 146
Accessing the Context Data ........................................................................ 147
Accessing the Context Attributes .......................................................... 148
Updating Context Attributes .................................................................. 150
Creating/Deleting Context Data ............................................................ 151
Creating New Nodes in a Context ......................................................... 152
Creating New Attributes ........................................................................ 153
Summary of Methods Used for Context Management .......................... 154
Message Window ........................................................................................ 156
Generating Messages ........................................................................... 157
Relating Messages to UI Elements ....................................................... 158
Texts from the OTR ..................................................................................... 159
Texts from an Assistance Class .................................................................. 160
Programmed Value Help ............................................................................. 161
Value Selectors – Index Binding ........................................................... 161
Value Selectors Key – Binding .............................................................. 162
Freely Programmed Value Help ............................................................ 163
Object Value Selector .................................................................................. 163
Setting up the OVS ................................................................................ 164
Phase Overview – Phase 0 ................................................................... 165
Phase Overview – Phase 1 ................................................................... 165
Phase Overview – Phase 2 ................................................................... 166
Phase Overview – Phase 3 ................................................................... 166
Summary of Unit .......................................................................................... 167
Exercises ..................................................................................................... 167
Unit 6 – Advanced Programming Techniques............................................... 169
Unit Overview............................................................................................... 169
Dynamic Modifications at Runtime .............................................................. 169
Changing the UI Elements Dynamically ................................................ 169
Developing Shared Components ................................................................. 172
Component Reuse Scenarios ............................................................... 173
Declaring Use of a Shared Component ....................................................... 174
Methods for Managing Used Components ........................................... 176

Klee Associates, Inc. Introduction

Mastering ABAP Web Dynpro ECC 6.0 Rev. 08/08/08 5

Building a Shared Component Context ................................................ 177
Mapping Shared Component Contexts ................................................ 178
Dynamic Window Creation and Management ............................................. 179
Working with the Window Manager ...................................................... 179
The Window Interface ........................................................................... 180
Amodal Windows Basic Concept .......................................................... 181
Working with Amodal Window Calls ..................................................... 181
Modal Windows Basic Concept ............................................................ 182
Working with Modal Windows ............................................................... 183
Modal Window Buttons ......................................................................... 183
Working with Modal Windows ............................................................... 184
Window Plugs/Suspend and Resume ......................................................... 188
Summary of Unit .......................................................................................... 190
Exercises ..................................................................................................... 190
Unit 7 – Specialized Topics ............................................................................. 191
Unit Overview .............................................................................................. 191
Adobe Forms Integration ............................................................................. 191
Interactive Forms UI Element ............................................................... 192
Displaying Adobe Forms ....................................................................... 193
Interactive Forms ......................................................................................... 195
Interactive Form Implementation .......................................................... 196
Portal Integration ......................................................................................... 199
Portal Integration Steps ........................................................................ 200
Portal Overview..................................................................................... 200
Portal Event Integration in Web Dynpro Applications ........................... 201
Customizing and Personalization ................................................................ 202
Implicit Configuration ............................................................................ 202
Explicit Configuration ............................................................................ 203
Navigation to Customizing and Personalization ................................... 204
Enabling Customizing/Personalization View ........................................ 204
Web Dynpro Enhancements ....................................................................... 205
Web Dynpro Enhancements Summary ................................................ 205
General Development Considerations ........................................................ 207
General Context Recommendations .................................................... 207
Dynamic Programming Recommendations .......................................... 208
Summary of Unit .......................................................................................... 209
Exercises ..................................................................................................... 209
Introduction Klee Associates, Inc.

6 Rev. 08/08/08 Mastering ABAP Web Dynpro ECC 6.0

Appendix – ABAP Web Dynpro Exercises..................................................... 211
Unit 1 – Introduction to ABAP Web Dynpro ................................................. 211
Business Requirement .......................................................................... 211
Objective ............................................................................................... 211
Exercise 1 – Creating an ABAP Web Dynpro Application .................... 212
Unit 2 – Web Dynpro Controllers ................................................................. 215
Business Requirement .......................................................................... 215
Objective ............................................................................................... 215
Exercise 1 – Define Navigation between Two Views of Your ABAP Web
Dynpro Application ................................................................................ 216
Unit 3 – Web Dynpro Contexts .................................................................... 218
Business Requirement .......................................................................... 218
Objective ............................................................................................... 218
Exercise 1 – Create a Basic Application Using the Service Call Wizard219
Unit 4 – Web Dynpro UI Elements ............................................................... 223
Business Requirement .......................................................................... 223
Objective ............................................................................................... 223
Exercise 1 – Add UI Elements to Layout............................................... 224
Exercise 2 – Use OTR Texts ................................................................. 228
Exercise 3 – Use ALV Table ................................................................. 229
Unit 5 – Web Dynpro Programming ............................................................. 231
Business Requirement .......................................................................... 231
Objective ............................................................................................... 231
Exercise 1 – Create a Web Dynpro Application and Contexts without the
Service Call Wizard ............................................................................... 232
Exercise 2 – Add Error Handling for the Entry Screen .......................... 240
Exercise 3 – Add Drop Down Selection for CARRID ............................ 245
Exercise 4 – Use Object View Selector ................................................. 247
Unit 6 – Web Dynpro Advanced Programming Techniques ........................ 255
Business Requirement .......................................................................... 255
Objective ............................................................................................... 255
Exercise 1 – Modify UI Elements Dynamically ...................................... 256
Exercise 2 – Creating Shared Components .......................................... 259
Exercise 3 – Creating Popup Window Calls ......................................... 263

................................... 62 Scenario 2: Standard Navigation between Views ....... 70 Exercises ................................................................................................................... 51 Component Controllers .......................................................................................................................................................................... 81 Singleton Property with Lead Selection .............. 50 Components of a Controller ............................................................................... 70 Unit 3 –Web Dynpro Contexts ...................................................................................................................... 73 Context Nodes ................................. 49 Controller Types....................................................................................... 08/08/08 Mastering ABAP Web Dynpro ECC 6..................... 61 Hook Methods Execution Order – Starting Application .... 83 Supply Methods ...................... 72 Context Building Blocks ......................................................................... 48 Exercises ............................................................................................................................................................................................................................ 49 Unit Overview. 48 Unit 2 – Web Dynpro Controllers ............................................................................................................ 45 Handling Exceptions in Programs ...... 57 Lifetime of a Controller Instance ..................................... 55 Window Controllers ................................................................................................................................................................ 80 Node Cardinality ................................................................................................................ 73 Collections and Elements .............................. 77 Creating Attribute ....................................................................................................................................... 86 2 Rev..................................................... 85 Context Mapping ...........Introduction Klee Associates.............. 44 Exceptions ......................... 53 Custom Controllers...........................................................0 .................... 79 Contexts as Classes and Objects in Memory .................................................................................................................... Inc............. 74 Context Properties... 73 Context Attributes ...... 71 Unit Overview.......................................................................................................................... 49 Controllers – What Are They? ......... 71 Contexts – What Are They? ................. 60 Controller Reference Overview............................................................................................................................................................................................................... 63 Summary of Unit ................................................................................................................................ 55 View Controllers ................................................................... 73 Contexts Design/Runtime Example ................................................. Events ................................................................................. 76 Creating Context Nodes and Attributes.................................................................................................................. 47 Summary of Unit .......................................................................... 62 Scenario 1: Hook Methods Execution Order – Client Side Event ........................

You're Reading a Free Preview

Descarregar
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->