ABAP_BCABA.pdf
(
7028 KB
)
Pobierz
198116520 UNPDF
BC ABAP Programming
Release 4.6B
BC - ABAP Programming
SAP AG
Copyright
© Copyright 2001 SAP AG. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose
without the express permission of SAP AG. The information contained herein may be
changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary
software components of other software vendors.
Microsoft
®
, WINDOWS
®
, NT
®
, EXCEL
®
, Word
®
, PowerPoint
®
and SQL Server
®
are
registered trademarks of
Microsoft Corporation.
IBM
®
, DB2
®
, OS/2
®
, DB2/6000
®
, Parallel Sysplex
®
, MVS/ESA
®
, RS/6000
®
, AIX
®
, S/390
®
,
AS/400
®
, OS/390
®
, and OS/400
®
are registered trademarks of IBM Corporation.
ORACLE
®
is a registered trademark of ORACLE Corporation.
INFORMIX
®
-OnLine for SAP and Informix
®
Dynamic Server
TM
are registered trademarks of
Informix Software Incorporated.
UNIX
®
, X/Open
®
, OSF/1
®
, and Motif
®
are registered trademarks of the Open Group.
HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C
®
, World
Wide Web Consortium,
Massachusetts Institute of Technology.
JAVA
®
is a registered trademark of Sun Microsystems, Inc.
JAVASCRIPT
®
is a registered trademark of Sun Microsystems, Inc., used under license for
technology invented and implemented by Netscape.
SAP, SAP Logo, R/2, RIVA, R/3, ABAP, SAP ArchiveLink, SAP Business Workflow,
WebFlow, SAP EarlyWatch, BAPI, SAPPHIRE, Management Cockpit, mySAP.com Logo
and mySAP.com are trademarks or registered trademarks of SAP AG in Germany and in
several other countries all over the world. All other products mentioned are trademarks or
registered trademarks of their respective companies.
2
December 1999
SAP AG
BC - ABAP Programming
Icons
Icon
Meaning
Caution
Example
Note
Recommendation
Syntax
Tip
December 1999
3
BC - ABAP Programming
SAP AG
Contents
B
C - ABAP Programming ............................................................................17
Introduction to ABAP ............................................................................................................19
The R/3 Basis System: Overview ......................................................................................... 20
Position of the Basis System Within the R/3 System ......................................................... 21
Application Servers.............................................................................................................27
Work Processes ................................................................................................................. 32
Overview of the Components of Application Programs.................................................... 37
Structure of an Application Program .................................................................................. 38
Screens............................................................................................................................... 40
Structure of ABAP Programs.............................................................................................. 44
Processing Blocks in ABAP Programs ............................................................................... 49
ABAP Statements............................................................................................................... 56
Logical Databases and Contexts........................................................................................ 60
Memory Structures of an ABAP Program........................................................................... 66
Creating and Changing ABAP Programs ............................................................................ 68
Opening a Program from the Repository Browser ............................................................. 70
Opening Programs in the ABAP Editor .............................................................................. 73
Opening Programs Using Forward Navigation................................................................... 74
Maintaining Program Attributes .......................................................................................... 75
Editing Programs ................................................................................................................79
The ABAP Programming Language..................................................................................... 82
ABAP Syntax .......................................................................................................................... 83
Types and Objects................................................................................................................. 87
Basic Statements................................................................................................................... 90
Data Types and Data Objects ............................................................................................ 91
Data Types .................................................................................................................... 92
Defining Data Types................................................................................................. 96
Predefined ABAP Types ..................................................................................... 97
Local Data Types in Programs ......................................................................... 100
Data Types in the ABAP Dictionary .................................................................. 105
The TYPE Addition................................................................................................. 113
The LIKE Addition .................................................................................................. 117
Data Objects................................................................................................................ 119
Literals.................................................................................................................... 120
Text Symbols ......................................................................................................... 122
Variables ................................................................................................................ 124
Constants ............................................................................................................... 130
Interface Work Areas ............................................................................................. 131
Predefined Data Objects ........................................................................................ 133
Compatibility................................................................................................................ 134
Determining the Attributes of Data Objects................................................................. 136
Examples of Data Types and Objects......................................................................... 141
Processing Data ............................................................................................................... 144
Assigning Values......................................................................................................... 145
4
December 1999
SAP AG
BC - ABAP Programming
Assigning Values with MOVE ................................................................................ 146
Assigning Values with WRITE TO ......................................................................... 149
Resetting Values to Their Initial Value ................................................................... 151
Numerical Operations.................................................................................................. 152
Arithmetic Calculations........................................................................................... 153
Mathematical Functions ......................................................................................... 157
Business Calculations ............................................................................................ 159
Date and Time Calculations ................................................................................... 160
Processing Character Strings ..................................................................................... 162
Shifting Field Contents ........................................................................................... 163
Replacing Field Contents ....................................................................................... 166
Converting to Upper or Lower Case or Replacing Characters .............................. 168
Converting into a Sortable Format ......................................................................... 169
Overlaying Character Fields .................................................................................. 170
Finding Character Strings ...................................................................................... 171
Finding the Length of a Character String ............................................................... 174
Condensing Field Contents.................................................................................... 175
Concatenating Character Strings........................................................................... 176
Splitting Character Strings ..................................................................................... 177
Assigning Parts of Character Strings ..................................................................... 178
Single Bit Processing in Hexadecimal Fields .............................................................. 179
Setting and Reading Bits ....................................................................................... 180
Bit Operations ........................................................................................................ 182
Set Operations Using Bit Sequences..................................................................... 184
Type Conversions ....................................................................................................... 187
Conversion Rules for Elementary Data Types....................................................... 188
Conversion Rules for References .......................................................................... 192
Conversion Rules for Structures ............................................................................ 193
Conversion Rules for Internal Tables..................................................................... 195
Alignment of Data Objects ..................................................................................... 196
Processing Sections of Strings ................................................................................... 197
Field Symbols and Data References................................................................................ 201
Field Symbols.............................................................................................................. 202
Defining Field Symbols .......................................................................................... 204
Assigning Data Objects to Field Symbols .............................................................. 208
Basic Form of the ASSIGN Statement.............................................................. 209
Assigning Components of Structures to a Field Symbol .................................. 214
Defining the Data Type of a Field Symbol ........................................................ 216
Data Areas for Field Symbols ........................................................................... 218
Data References ......................................................................................................... 220
Reference Variables............................................................................................... 221
Creating Data Objects Dynamically ....................................................................... 222
Getting References to Data Objects ...................................................................... 223
Dereferencing Data References ............................................................................ 224
Data References: Example .................................................................................... 225
December 1999
5
Plik z chomika:
sliwak
Inne pliki z tego folderu:
userexit.pdf
(2320 KB)
sysflds.pdf
(38 KB)
spmp.pdf
(4741 KB)
sappress_enhancing_quality_abap-5.pdf
(520 KB)
inttabl.pdf
(61 KB)
Inne foldery tego chomika:
ABAP Tutorials
Bazy Danych
Crystal Reports
film_ytd
instrukcje SAP ERP
Zgłoś jeśli
naruszono regulamin