Official ABAP Programming Guidelines

Similar documents
Preface Introduction... 23

Official ABAP Programming Guidelines

The Official ABAP" Reference

COURSE LISTING. Courses Listed. Training for Database & Technology with Development in ABAP Dialog Programming. Beginner. Intermediate.

COURSE LISTING. Courses Listed. with ABAP Dialog Programming. 25 December 2017 (08:57 GMT) NW001 - SAP NetWeaver - Overview

SAP' ABAP. Handbook. Kogent Learning Solutions, Inc. Sudbury, Massachusetts JONES AND BARTLETT PUBLISHERS BOSTON TORONTO LONDON SINUAPORI:


CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours

Introduction to Programming Using Java (98-388)

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Reading Sample. ABAP Programming Concepts Object-Oriented ABAP. Contents. Index. The Author. First-hand knowledge.

HA400 ABAP Programming for SAP HANA

SAP ABAP WORKBENCH CONCEPTS PART 1 AND 2. INd_rasN. 1 P a g e. KIDS Information Center

Foundations of object orientation

SAP ABAP ONLINE TRAINING COURSE

COURSE LISTING. Courses Listed. with HANA Programming. 13 February 2018 (04:51 GMT) HA100 - SAP HANA


Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

Oracle Database: Introduction to SQL/PLSQL Accelerated

0. Overview of this standard Design entities and configurations... 5

Runtime Environments I. Basilio B. Fraguela

Oracle PLSQL. Course Summary. Duration. Objectives

BC401. ABAP Objects COURSE OUTLINE. Course Version: 18 Course Duration:

Oracle Database 11g: SQL and PL/SQL Fundamentals

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS

Function Modules Objective The following section is intended to explain: What function modules are Components of function modules

KLiC C++ Programming. (KLiC Certificate in C++ Programming)

Exam 1 Prep. Dr. Demetrios Glinos University of Central Florida. COP3330 Object Oriented Programming

SAP ABAP Training Course Content :

CISQ Weakness Descriptions

EDIABAS BEST/2 LANGUAGE DESCRIPTION. VERSION 6b. Electronic Diagnostic Basic System EDIABAS - BEST/2 LANGUAGE DESCRIPTION

Introduction to SQL/PLSQL Accelerated Ed 2

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

SAP- ABAP/4 ADVANCED COURSE CONTENT

Oracle Database: SQL and PL/SQL Fundamentals NEW

Standard. Number of Correlations

Examining the Code. [Reading assignment: Chapter 6, pp ]

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

SDN Community Contribution

A Short Summary of Javali

Objects First with Java


Introduction to Programming Microsoft.NET Applications with Visual Studio 2008 (C#)

C_TAW12_740

WA1278 Introduction to Java Using Eclipse

MPI: A Message-Passing Interface Standard

Absolute C++ Walter Savitch

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

Java Fundamentals p. 1 The Origins of Java p. 2 How Java Relates to C and C++ p. 3 How Java Relates to C# p. 4 Java's Contribution to the Internet p.

FUNCTION MODULE. BAPI are RFC enabled function modules. Might Be Remote Enabled or May not be Remote Enabled

Index. object lifetimes, and ownership, use after change by an alias errors, use after drop errors, BTreeMap, 309

Teradata SQL Features Overview Version

UNIT 3 ARRAYS, RECURSION, AND COMPLEXITY CHAPTER 11 CLASSES CONTINUED

A- Core Java Audience Prerequisites Approach Objectives 1. Introduction

HA400 ABAP Programming for SAP HANA

Curriculum Map Grade(s): Subject: AP Computer Science

UNIT 3

«Computer Science» Requirements for applicants by Innopolis University

Oracle Database 11g: Program with PL/SQL Release 2

CSE P 501 Compilers. Static Semantics Hal Perkins Winter /22/ Hal Perkins & UW CSE I-1

Oracle Database 12c: Program with PL/SQL Duration: 5 Days Method: Instructor-Led

GnuCOBOL Quick Reference

Object Oriented Programming. Solved MCQs - Part 2

Chapter 11 Object and Object- Relational Databases

Computer Science (330)

Padasalai.Net s Model Question Paper

HIGHER SECONDARY COMPUTER SCIENCE

C# Programming in the.net Framework

Introduction to Programming Microsoft.NET Framework Applications with Microsoft Visual Studio 2005 (C#)

Programming Languages Third Edition. Chapter 7 Basic Semantics

Java Programming Course Overview. Duration: 35 hours. Price: $900


CHAPTER 1 Introduction to Computers and Programming CHAPTER 2 Introduction to C++ ( Hexadecimal 0xF4 and Octal literals 031) cout Object

SAP ABAP. Hands-On Test Projects with Business Scenarios. Sushil Markandeya. Kaushik Roy

Software Development & Education Center. Java Platform, Standard Edition 7 (JSE 7)

Oracle Database: Program with PL/SQL

Interview Questions of C++

Certification In Java Language Course Course Content

3. Java - Language Constructs I

Oracle Database: Program with PL/SQL Ed 2

Computer Programming C++ (wg) CCOs

XII- COMPUTER SCIENCE VOL-II MODEL TEST I

CS 2604 Minor Project 1 Summer 2000

PROGRAMMING IN C++ (Regulation 2008) Answer ALL questions PART A (10 2 = 20 Marks) PART B (5 16 = 80 Marks) function? (8)

STRUCTURE AND SYLLABUS APPROVED IN THE BOARD OF STUDIES MEETING ON 2001 TO BE EFFECTIVE FROM THE ACADEMIC YEAR

The course is supplemented by numerous hands-on labs that help attendees reinforce their theoretical knowledge of the learned material.

Reserved Words and Identifiers

Extending SystemVerilog Data Types to Nets

CSCI-GA Scripting Languages

Oracle Database 12c R2: Program with PL/SQL Ed 2 Duration: 5 Days

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

IEEE LANGUAGE REFERENCE MANUAL Std P1076a /D3

SAP-ABAP Training Program. Topics Covered. ABAP Dictionary Concepts

Conditionally control code flow (loops, control structures). Create stored procedures and functions.

Sprite an animation manipulation language Language Reference Manual

C & Data Structures syllabus

Not Yet Using ABAP Objects? Eight Reasons Why Every ABAP Developer Should Give It a Second Look

! Those values must be stored somewhere! Therefore, variables must somehow be bound. ! How?

Oracle Database: SQL and PL/SQL Fundamentals

Transcription:

Horst Keller, Wolf Hagen Thummel Official ABAP Programming Guidelines. Galileo Press Bonn

Contents Foreword Acknowledgments ^ ^ 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 m 2.1 Separation of Concerns 23 2.2 KISS Principle 32 2.3 Correctness and Quality 34 lttj 3.1 ABAP Objects as a Programming Model 41 3.2 Program Type and Program Attributes 50 3.2.1 Program Type 51 3.2.2 Program Attributes 55 3.2.3 Original Language 60 3.3 Modern ABAP 62 3.4 Checks for Correctness 65 3.4.1 Syntax Check 65 3.4.2 Extended Program Check 69 3.4.3 Code Inspector 72 3.4.4 ABAP Test Cockpit 76

4.1 Source Code Formatting 4.1.1 Case Sensitivity 4.1.2 Statements per Program Line 4.1.3 Using the Pretty Printer 4.1.4 Line Width 4.2 Naming 4.2.1 Selecting the Language 4.2.2 Descriptive Names 80 80 83 86 89 91 4.2.3 Names of Repository Objects 101 4.2.4 Program-Internal Names 106 4.3 Comments 115 4.3.1 Selecting the Language 115 4.3.2 Content 117 4.3.3 Arrangement in the Source Code 120 4.4 Program and Procedure Structure 123 4.4.1 Global Declarations of a Program 124 4.4.2 Local Declarations 127 4.5 Source Code Organization 130 4.5.1 Source Code Modularization 130 4.5.2 Multiple Use of Include Programs 132 4.6 Alternative Notations 135 4.6.1 Alternative Language Constructs in Statements 135 4.6.2 Chained Statements 137 4.6.3 Method Calls 141 4.6.4 Assignments and Calculations 143 4.6.5 Calculation Expressions 145 4.7 Complexity 146 4.7.1 Expressions 147 4.7.2 Nesting Depth 149 4.7.3 Procedure Volume 150 4.7.4 Class Size 151 4.7.5 Dead Code 153 5.1 Object-Oriented Programming 155 5.1.1 Encapsulation 156

5.1.2 Modularization 5.1.3 Static Classes and Singletons 5.1.4 Inheritance 5.1.5 Class References and Interface References 5.1.6 Local Types for Global Classes 5.1.7 Instance Constructor 5.2 Error Handling 5.2.1 Reaction to Error Situations 5.2.2 Classical and Class-Based Exceptions 5.2.3 Exception Categories 5.2.4 Exception Texts 5.2.5 Using Exception Classes 5.2.6 Handling and Propagating Exceptions 185 5.2.7 Cleanup After Exceptions 186 5.2.8 Catchable Runtime Errors 188 5.2.9 Assertions 190 5.2.10 Messages 191 5.3 User Interfaces 195 5.3.1 Selecting the User Interface Technology 195 5.3.2 Encapsulating Classical User Interfaces 199 5.3.3 Lists 204 5.3.4 Accessibility 207 5.4 Datastorage 208 5.4.1 Persistent Data Storage 208 5.4.2 Database Accesses 210 5.4.3 Client Handling 211 5.4.4 Using the Shared Memory 213 6.1 Data Types and Data Objects 217 6.1.1 Bound and Standalone Data Types 218 6.1.2 Declaration of Data Types and Constants 220 6.1.3 Declaration of Variables 224 6.1.4 Including Structures 226 6.1.5 Using Types 228 6.1.6 Referring to Data Types or Data Objects 230 6.1.7 Table Work Areas 232 6.1.8 Literals 233

6.1.9 Strings 236 6.1.10 Start Values 238 6.1.11 Data Objects for Truth Values 239 6.2 Assignments, Calculations, and Other Accesses to Data 241 6.2.1 Assignments Between Different Types 241 6.2.2 Avoiding Invalid Values 243 6.2.3 Using Conversion Rules 245 6.2.4 Specification of Numbers 247 6.2.5 Selecting the Numeric Type 249 6.2.6 Rounding Errors 253 6.2.7 Division by Zero 255 6.2.8 Casting 255 6.2.9 Runtime Errors When Accessing Data Objects 257 6.2.10 Anonymous Containers 259 6.2.11 Passing Global Data by Reference 260 6.3 System Fields 262 6.3.1 Access 262 6.3.2 Obsolete and Internal System Fields 264 6.3.3 Evaluation 265 6.3.4 Return Value 267 6.3.5 Using System Fields as Actual Parameters 268 6.3.6 Using System Fields on the User Interface 270 6.3.7 Using System Fields in Operand Positions 272 6.4 Internal Tables 273 6.4.1 Selecting the Table Category 274 6.4.2 Secondary Keys 276 6.4.3 Initial Memory Allocation 280 6.4.4 Sorted Filling 281 6.4.5 Aggregated Filling 283 6.4.6 Output Behavior 284 6.4.7 Loop Processing 286 6.5 Modularization Units 287 6.5.1 Function Modules and Subroutines 288 6.5.2 Type of the Formal Parameters of Procedures 289 6.5.3 Transfer Type of Formal Parameters 292 6.5.4 Passing Output Parameters by Reference 294 6.5.5 Typing of Formal Parameters 296 6.5.6 Internal and External Procedure Calls 298 6.5.7 Exiting Procedures 302

6.5.8 Dialog Modules and Event Blocks 304 6.5.9 Macros 306 6.6 Dynamic Programming Techniques 309 6.6.1 Using Dynamic Programming Techniques 309 6.6.2 Runtime Errors During Dynamic Processing 311 6.6.3 Using Dynamic Data Objects 313 6.6.4 Memory Consumption of Dynamic Memory Objects 315 6.6.5 Administration Costs of Dynamic Memory Objects 318 6.6.6 Accessing Data Objects Dynamically 321 6.6.7 Generic Programming 324 6.7 Internationalization 329 6.7.1 Storing System Texts 329 6.7.2 Translation-Friendly Message Texts 331 6.7.3 Text Environment 333 6.7.4 Character Set of Source Code 335 6.7.5 Splitting Texts 336 6.7.6 Codepages for Files 337 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 Datastorage 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