
Official ABAP Programming Guidelines
SAP PRESS
1st Edition
Published on 26. October 2009
Book
Hardback
398 pages
978-1-59229-290-5 (ISBN)
Description
How do I select the appropriate program type in SAP programming? Where should the local declarations of a procedure be positioned? Am I supposed to immediately replace all obsolete language elements in existing code? Should I use procedural or object-oriented ABAP (ABAP Objects)? The official ABAP programming guidelines provide clarity and security by answering these questions, and many more that may arise in your daily work!
1. General Rules
Learn the general principles that you should take into account when you create new programs and classes.
2. Structure and Style
Find the answers to your questions on style, including naming, commentation, and structure
of programs and procedures.
3. Architecture
Explore guidelines on individual aspects of architecture, such as object orientation, error handling, user interfaces, data storage, and much more.
4. Secure and Robust ABAP
Ensure your ABAP programs run predictably with no surprises by gaining in-depth knowledge on data types and data objects, calculations and accesses, internal tables, and more.
5. Tips and Hints
Explore tips and hints throughout the book, as well as examples of good and bad ABAP programming, to help you adopt effective working techniques and principles.
Highlights:
Basic Rules: Separation of Concerns, Correctness and Quality, Program Type and Attributes, Modern ABAP, Checks for Correctness
Structure and Style: Code Formatting and Organization, Naming, Comments, Alternative Notations
Architecture: Object Orientation, Error Handling, User Interfaces, Data Storage
Secure and Robust ABAP: Data Types and Objects, Calculations and Accesses, System Fields, Internal Tables, Modularization, Dynamic Programming
1. General Rules
Learn the general principles that you should take into account when you create new programs and classes.
2. Structure and Style
Find the answers to your questions on style, including naming, commentation, and structure
of programs and procedures.
3. Architecture
Explore guidelines on individual aspects of architecture, such as object orientation, error handling, user interfaces, data storage, and much more.
4. Secure and Robust ABAP
Ensure your ABAP programs run predictably with no surprises by gaining in-depth knowledge on data types and data objects, calculations and accesses, internal tables, and more.
5. Tips and Hints
Explore tips and hints throughout the book, as well as examples of good and bad ABAP programming, to help you adopt effective working techniques and principles.
Highlights:
Basic Rules: Separation of Concerns, Correctness and Quality, Program Type and Attributes, Modern ABAP, Checks for Correctness
Structure and Style: Code Formatting and Organization, Naming, Comments, Alternative Notations
Architecture: Object Orientation, Error Handling, User Interfaces, Data Storage
Secure and Robust ABAP: Data Types and Objects, Calculations and Accesses, System Fields, Internal Tables, Modularization, Dynamic Programming
More details
Series
Language
English
Place of publication
Bonn
Germany
Target group
Professional and scholarly
Edition type
New edition
Dimensions
Height: 22.9 cm
Width: 17.5 cm
Thickness: 27 mm
ISBN-13
978-1-59229-290-5 (9781592292905)
Schweitzer Classification
Persons
Author
Dr. Horst Keller works in the NetWeaver Developer Tools ABAP group at SAP. As Knowledge Architect he is responsible for documentation and roll-out relating to ABAP and ABAP Objects. He also oversees the programs for preparing and presenting the ABAP documentation including the relating search algorithms.
Wolf Hagen Thümmel studied physics at the Karlsruhe University, Germany, and received his doctorate in experimental particle physics. In 2001, he joined SAP AG. He is currently a member of the TD Core AS&DM ABAP group and there focuses on language-related tools in the ABAP environment as well as in the area of mass checks for quality assurance. He assumes responsibility for ABAP checkpoint statements and the related tools, memory analyses, and parts of the ABAP Debugger. Wolf Hagen Thümmel also deals with topics regarding the complexity of ABAP programs. He is author of several ABAP-related publications in trade journals and handbooks on programming languages.
Content
... Foreword ... 13
... Acknowledgments ... 15
1 ... Introduction ... 17
... 1.1 ... What Are Programming Guidelines ... 17
... 1.2 ... Why Programming Guidelines ... 18
... 1.3 ... Which Guidelines Are Involved Here ... 18
... 1.4 ... Target Audience ... 19
... 1.5 ... How to Use This Book ... 20
2 ... General Basic Rules ... 23
... 2.1 ... Separation of Concerns ... 23
... 2.2 ... KISS Principle ... 32
... 2.3 ... Correctness and Quality ... 34
3 ... ABAP-Specific Basic Rules ... 41
... 3.1 ... ABAP Objects as a Programming Model ... 41
... 3.2 ... Program Type and Program Attributes ... 50
... 3.3 ... Modern ABAP ... 62
... 3.4 ... Checks for Correctness ... 65
4 ... Structure and Style ... 79
... 4.1 ... Source Code Formatting ... 80
... 4.2 ... Naming ... 91
... 4.3 ... Comments ... 115
... 4.4 ... Program and Procedure Structure ... 123
... 4.5 ... Source Code Organization ... 130
... 4.6 ... Alternative Notations ... 135
... 4.7 ... Complexity ... 146
5 ... Architecture ... 155
... 5.1 ... Object-Oriented Programming ... 155
... 5.2 ... Error Handling ... 172
... 5.3 ... User Interfaces ... 195
... 5.4 ... Data Storage ... 208
6 ... Secure and Robust ABAP ... 217
... 6.1 ... Data Types and Data Objects ... 217
... 6.2 ... Assignments, Calculations, and Other Accesses to Data ... 241
... 6.3 ... System Fields ... 262
... 6.4 ... Internal Tables ... 273
... 6.5 ... Modularization Units ... 287
... 6.6 ... Dynamic Programming Techniques ... 309
... 6.7 ... Internationalization ... 329
A ... Obsolete Language Constructs ... 341
... A.1 ... Procedures ... 342
... A.2 ... Declarations ... 343
... A.3 ... Object Generation ... 347
... A.4 ... Calls and Exits ... 347
... A.5 ... Program Flow Control ... 349
... A.6 ... Assignments ... 350
... A.7 ... Calculation Statements ... 352
... A.8 ... Processing Character and Byte Strings ... 353
... A.9 ... Internal Tables ... 355
... A.10 ... Dynpro Flow Logic ... 357
... A.11 ... Classical List Processing ... 358
... A.12 ... Data Storage ... 360
... A.13 ... Contexts ... 362
... A.14 ... External Interfaces ... 363
B ... Automatic Check of Naming Conventions ... 365
... B.1 ... Naming Conventions in the Code Inspector ... 365
... B.2 ... Type-Specific Prefix Components ... 366
... B.3 ... Prefixes for Procedure-Local Declarations ... 367
... B.4 ... Structured Programming ... 369
... B.5 ... Object-Oriented Programming ... 370
... B.6 ... Assessment of the Naming Conventions ... 371
C ... Table of Rules ... 373
D ... Recommended Reading ... 377
E ... The Authors ... 379
... Index ... 381