sappress web dynpro for abap

Download Sappress Web Dynpro for Abap

Post on 14-Dec-2014

354 views

Category:

Documents

6 download

Embed Size (px)

TRANSCRIPT

Ulli Hoffmann

Web Dynpro for ABAP

Contents at a GlanceIntroduction ....................................................................... 1 2 3 4 5 6 7 A B C On the Development of Web-Based Applications ............ WD4A Framework ............................................................. Developing WD4A Applications ........................................ 13 23 37 95

Multi-Component Applications ......................................... 185 Dynamic Component Applications .................................... 225 Reusing WD4A Components ............................................. 261 Integrating WD4A Applications ........................................ 293 Classes and Interfaces ....................................................... 317 Bibliography ....................................................................... 353 The Author ......................................................................... 354 Index .................................................................................. 355

ContentsIntroduction ........................................................................................... 13

1

On the Development of Web-Based Applications ............1.1 1.2 1.3 1.4 Mainframe and Client Server Systems .................................... Business Server Pages ............................................................ Web Dynpro Framework ....................................................... Web Dynpro for ABAP for Future Use ....................................

2324 27 29 35

2

WD4A Framework ..............................................................2.1 Web Dynpro Explorer ............................................................ 2.1.1 View Elements .......................................................... 2.1.2 View Designer ........................................................... 2.1.3 Hello World ........................................................... Relationships Between Application and Component .............. Visual Parts ............................................................................ 2.3.1 Interface Views and Plugs ......................................... 2.3.2 View Layout .............................................................. 2.3.3 Windows .................................................................. View Controller and View Context ......................................... 2.4.1 Context Property Cardinality ..................................... 2.4.2 Singleton and Lead Selection Context Properties ....... 2.4.3 Supply Function Method ........................................... 2.4.4 Sample Applications .................................................. Controllers and Controller Methods ....................................... 2.5.1 Hook Methods .......................................................... 2.5.2 Instance Methods ..................................................... 2.5.3 Event Handler Methods ............................................ 2.5.4 Fire Methods ............................................................ 2.5.5 Additional Information About Context ...................... Navigation, Inbound Plugs, and Outbound Plugs ................... Phase Model .........................................................................

3737 39 41 43 51 53 53 56 60 61 63 66 70 71 78 80 82 82 83 84 87 91

2.2 2.3

2.4

2.5

2.6 2.7

3

Developing WD4A Applications ........................................3.1 Transferring Parameters from a URI ....................................... 3.1.1 Reading and Displaying Parameters ........................... 3.1.2 Controlling the Navigation Via Parameters ................

9595 96 98

7

Contents

3.2

3.3

3.4

3.5

3.6

3.7

3.8 3.9

3.10

Influencing the Request/Response Cycle ................................ 3.2.1 Automatic Triggering of Requests .............................. 3.2.2 Automatic Triggering of Requests with User Interaction ........................................................ 3.2.3 Automatic Forwarding .............................................. Implementation of Selection Options ..................................... 3.3.1 Using Dropdown Lists ............................................... 3.3.2 Using Radio Buttons .................................................. Presentation of Tree Structures .............................................. 3.4.1 Sequential Building of Tree Structures ....................... 3.4.2 Recursive Tree Structures .......................................... User Guidance per RoadMap and Messages ........................... 3.5.1 Structure of the RoadMap Application ...................... 3.5.2 Message Handling ..................................................... Presenting Tables ................................................................... 3.6.1 Table Output and Row Selection ............................... 3.6.2 Selection of Single or Multiple Rows ......................... 3.6.3 Changing Single Cells Using Variants ......................... Calling Popup Windows ......................................................... 3.7.1 Message Popups ....................................................... 3.7.2 Query Popups ........................................................... 3.7.3 Popups with Navigation ............................................ Using Input Helps .................................................................. Internationalization ............................................................... 3.9.1 Online Text Repository .............................................. 3.9.2 Assistance Class ......................................................... Customization, Configuration, Personalization ....................... 3.10.1 Implicit and Explicit Configurations ........................... 3.10.2 Configuring Components and Applications ................

103 104 106 109 111 112 121 125 126 131 137 138 148 152 152 157 159 163 164 166 168 171 172 173 175 176 177 177

4

Multi-Component Applications .........................................4.1 A Model of Layer Separation ................................................. 4.1.1 Strict Separation ........................................................ 4.1.2 Light Separation ........................................................ 4.1.3 Strict versus Light Separation .................................... 4.1.4 MVC Concepts in the WD4A Framework .................. Defining WD4A Component Usages ...................................... 4.2.1 Embedding Windows of Used Components ............... 4.2.2 Calling Methods of Used Components ...................... 4.2.3 Triggering Cross-Component Events .......................... 4.2.4 External Context Access Using Direct Mapping ......... 4.2.5 External Context Access Using Reverse Mapping .......

185185 187 188 189 190 192 194 195 196 197 198

4.2

8

Contents

4.3

Componentizing an Application ............................................. 4.3.1 Structure of the Sample Application .......................... 4.3.2 Implementing the Components ................................. 4.3.3 Result of Componentization ...................................... 4.3.4 Redesigning the Sample Application ......................... 4.3.5 Overview of Used Components and Sample Applications ..................................................

200 201 202 218 218 224

5

Dynamic Component Applications ....................................5.1 Types of Dynamic Changes .................................................... 5.1.1 Dynamic Modification of the Properties .................... 5.1.2 Dynamic Modification of the UI Hierarchy ................ 5.1.3 Dynamic Binding of Properties .................................. 5.1.4 Dynamic Modification of the Context ........................ 5.1.5 Dynamic Modification of Action Assignments ........... Dynamic ProgrammingA Sample Application ...................... 5.2.1 Dynamic Display of Address Data .............................. 5.2.2 Creating Business Partners ........................................ 5.2.3 Metadata for the Address Formats ............................ 5.2.4 Implementation and Layout of the Component .........

225225 226 229 234 235 236 237 237 241 242 246

5.2

6

Reusing WD4A Components .............................................6.1 6.2 Comparing Classes and Components ...................................... ALV Component SALV_WD_TABLE ....................................... 6.2.1 Using the ALV Component ........................................ 6.2.2 Accessing the ALV Configuration Model ................... OVS Component WDR_OVS .................................................. SO Component WDR_SELECT_OPTIONS ............................... Developing Input-Help Components ...................................... 6.5.1 Implementation of the Input-Help Component ......... 6.5.2 Using the Input-Help Component ............................. Enhancements of Components ...............................................

261261 263 264 267 270 275 282 283 286 288

6.3 6.4 6.5

6.6

7

Integrating WD4A Applications ........................................7.1 Integration into the SAP NetWeaver Portal ............................ 7.1.1 Triggering Portal Events ............................................ 7.1.2 Registration to Portal Events ..................................... Graphical Display of Data ...................................................... 7.2.1 Using the BusinessGraphics View Element ................. 7.2.2 Connecting the Data Source ......................................

293293 294 295 297 299 303

7.2

9