Developer’s Guide Release SAP NetWeaver 2004s
Being able to use ABAP effectively requires more than just knowledge of the keywords. As a programmer, you need to have a basic understanding of the architecture of the SAP NetWeaver Application Server ABAP and how specific fundamental concepts are implemented in ABAP and its infrastructure.
The aim of this guide is to enable you to use the possibilities of ABAP and the NW Application Server ABAP as effectively as possible. It is to provide you with guidelines on how best to solve certain standard tasks, which are part of any business programming.
Determining the best method to solve a problem in ABAP also means finding the most useful of the various possibilities this language provides. In ABAP, there are often a number of different ways of achieving the same goal. This is the price that has to be paid for evolutionary development and downward compatibility. If old constructs are still required in a new release, because they appear in important application programs, they remain part of the language. Programmers can continue to use them, but should be aware in which cases there are now more effective ways of solving a specific task.
Not only does the ABAP Developer Guider provide programmers with an overview of working with ABAP, but also show the best solution to standard problems of business programming. In any cases where there are multiple, equally useful solutions, this guide is to provide information on their advantages and disadvantages.
1 USING ABAP..................................................................................................................... 1
2 GETTING INVOLVED........................................................................................................ 2
2.1 The Origins of ABAP – an Overview......................................................................... 2
2.2 ABAP and Its Infrastructure....................................................................................... 3
2.3 ABAP and the SAP NW Application Server .............................................................. 4
3 GO AND CREATE ............................................................................................................. 5
3.1 Creating a Database Table and Data Elements ....................................................... 6
3.2 Creating a Database Table – Part 1 ......................................................................... 6
3.3 Creating Data Elements............................................................................................ 7
3.4 Creating a Database Table – Part 2 ......................................................................... 8
3.5 Defining the Basic Attributes of a Global Class ...................................................... 10
3.6 Methods, Types, and Attributes of a Global Class.................................................. 11
4 CORE DEVELOPMENT TASKS ..................................................................................... 16
4.1 UI Technology ......................................................................................................... 17
4.2 Advantages of ABAP Objects ................................................................................. 18
4.2.1 Why You Should Use ABAP Objects ........................................................... 18
4.2.2 Using ABAP Objects - Best Practices .......................................................... 20
4.3 Sharing Data ........................................................................................................... 20
4.3.1 Shared Objects - Basic Features ................................................................. 21
4.3.2 Shared Objects - Advanced Features .......................................................... 22
4.3.3 Best Practices............................................................................................... 23
4.4 Exception Handling ................................................................................................. 24
4.4.1 Class-Based Exceptions in ABAP ................................................................ 24
4.4.2 Basic Features.............................................................................................. 24
4.4.3 Planning Exception Handling and Delegating Exceptions ........................... 25
4.4.4 The Three Exception Classes in ABAP........................................................ 27
4.4.5 Defining an Exception Class ........................................................................ 29
4.4.6 New Exceptions and Former Concepts of Error Handling ........................... 30
4.5 Developing Persistence .......................................................................................... 30
4.5.1 The Standard Path to Persistence ............................................................... 31
4.5.2 Other Persistence Options ........................................................................... 33
4.5.3 All or Nothing – Database and SAP Transactions ....................................... 34
4.5.4 Exclusive Database Access - Lock Concept of the SAP NW AS................. 35
4.5.5 Restricting Access - Authorization Concept of the SAP NW AS.................. 36
4.6 Using Connectivity and Interoperability................................................................... 37
4.6.1 The Integration Strategy of SAP and Web Services .................................... 38
4.6.2 How Web Services Function ........................................................................ 38
4.6.3 Generating Interfaces and Proxies – The Outside-In Approach .................. 40
4.6.4 XML-Based Process Integration with the Exchange Infrastructure.............. 41
4.7 Making Enhancements............................................................................................ 42
4.7.1 How Do Modification-Free Enhancements Work? ....................................... 42
4.7.2 Enhancement Framework Details Based on an Example............................ 44
4.7.3 New BAdIs.................................................................................................... 47
4.7.4 The Switch Framework................................................................................. 49
5 ENSURING QUALITY...................................................................................................... 53
5.1 ABAP Unit Tests ..................................................................................................... 53
5.2 Effective Testing with ABAP Unit ............................................................................ 56
5.3 The Philosophy of Unit Tests .................................................................................. 57
5.4 Unit Tests and Transports....................................................................................... 59
5.5 Advantages of ABAP Unit Tests ............................................................................. 59
Download attached file: You must be Loged in to download file