Table of Contents
Table of Contents
Contact the Author 12
Introduction 13
How to Use This Book 14
Chapter 1: SAP System Overview 15
SAP System Architecture 15
Environment for Programs 18
Work Processes 19
The Dispatcher 19
The Database Interface 20
First look at the ABAP Workbench 22
First Look 23
ABAP Dictionary 27
ABAP Editor 27
Function Builder 27
Menu Painter 28
Screen Painter 28
Object Navigator 28
Chapter 2: Data Dictionary 29
Introduction 29
Creating a Table 29
Creating Fields 33
Data Elements 34
Data Domains 36
Technical Settings 45
Entering Records into a Table 48
v
Viewing the Data in a Table 51
Chapter 3 55
Creating a Program 55
Code Editor 57
Write Statements 62
Output Individual Fields 71
Chaining Statements Together 72
Copy Your Program 73
Declaring Variables 75
Constants 78
Chapter 4 79
Arithmetic
– Addition 79
Arithmetic
– Subtraction 80
Arithmetic
– Division 81
Arithmetic
– Multiplication 81
Conversion Rules 82
Division Variations 83
The standard form of division. 83
The integer form of division. 83
The remainder form of division. 84
Chapter 5
– Character Strings 85
Declaring C and N Fields 85
Data type C. 85
Data type N. 86
String Manipulation 87
Concatenate 87
vi
Condense 88
NO-GAPS 89
Find the Length of a String 89
Replace 90
Search 90
SEARCH Example 1 91
SEARCH Example 2 91
SEARCH Example 3 92
SEARCH Example 4 92
Shift 93
Split 94
SubFields 96
Chapter 6 – Debugging Programs 98
Fields mode 102
System Variables 103
Table Mode 103
Breakpoints 105
Static Breakpoints 107
Watchpoints 108
Ending a Debug Session 111
Chapter 7: Working with Database Tables 113
Making a Copy of a Table 113
Add New Fields 116
Foreign Keys 117
Append Structures 122
Include Structures 124
vii
Key Fields 127
Deleting Fields 130
Deleting Tables 133
Chapter 8 – Working with Other Data Types 136
Date and Time Fields 136
Date Fields in Calculations 138
Time Fields in Calculations 141
Quantity and Currency Fields in Calculations 142
Chapter 9 – Modifying Data in a Database Table 146
Authorisations 146
Fundamentals 146
Database Lock Objects 148
Using Open SQL Statements 149
Using Open SQL Statements – 5 Statements 150
Insert Statement 151
Clear Statement 155
Update Statement 157
Modify Statement 158
Delete Statement 160
Chapter 10 – Program Flow Control and Logical Expressions 164
Control Structures 164
If Statement 164
Linking Logical Expressions Together 169
Nested If Statements 169
Case Statement 170
Select Loops 171
viii
Do Loops 172
Nested Do Loops 175
While Loops 178
Nested While Loops 179
Loop Termination – CONTINUE 180
Loop Termination – CHECK 181
Loop Termination – EXIT 182
Chapter 11 – Selection Screens 184
Events 184
Intro to Selection Screens 185
Creating Selection Screens 186
At Selection Screen 187
Parameters 188
DEFAULT 189
OBLIGATORY 190
Automatic Generation of Drop-Down fields 190
LOWER CASE 191
Check Boxes and Radio Button Parameters 192
Select-Options 193
Select-Option Example 196
Select-Option Additions 200
Text Elements 200
Variants 203
Text Symbols 209
Text Messages 211
Skip Lines and Underline 216
ix
Comments 218
Format a Line and Position 219
Element Blocks 221
Chapter 12 – Internal Tables 223
Introduction 223
Types of Internal Tables 224
Standard Tables 224
Sorted Tables 225
Hashed Table 225
Internal Tables - Best Practice Guidelines 225
Creating Standard and Sorted Tables 226
Create an Internal Table with Separate Work Area 227
Filling an Internal Table with Header Line 228
Move-Corresponding 232
Filling Internal Tables with a Work Area 234
Using Internal Tables One Line at a Time 235
Modify 236
Describe and Insert 236
Read 238
Delete Records 239
Sort Records 240
Work Area Differences 241
Loops 241
Modify 242
Insert 242
Read 242
x
Delete 242
Delete a Table with a Header Line 243
CLEAR 243
REFRESH 243
FREE 243
Delete a Table with a Work Area 244
Chapter 13 – Modularizing Programs 245
Introduction 245
Includes 246
Procedures 249
Sub-Routines 250
Passing Tables 254
Passing Tables and Fields Together 255
Sub-Routines - External Programs 256
Function Modules 257
Function Modules – Components 258
Attributes Tab 262
Import Tab 262
Export Tab 263
Changing Tab 263
Tables Tab 263
Exceptions Tab 263
Source Code Tab 264
Function Module Testing 264
Function Modules - Coding 267
Comments
Post a Comment