0% found this document useful (0 votes)
176 views

Sappress Abapreference 2edition PDF

Uploaded by

otracuentaaux9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
176 views

Sappress Abapreference 2edition PDF

Uploaded by

otracuentaaux9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

Horst Keller

The Official
®
ABAP Reference
Contents at a Glance

Volume I

Part 1 Syntax ........................................................ 33

Part 2 Program Structure ................................... 51

Part 3 Declarative Statements .......................... 113

Part 4 Generating Objects.................................. 207

Part 5 Calling and Exiting Program Units ........ 227

Part 6 Program Flow Control ............................. 309

Part 7 Assignments .............................................. 359

Part 8 Processing Internal Data ........................ 391

Volume II

Part 9 User Dialogs .............................................. 529

Part 10 Processing External Data........................ 741

Part 11 Program Parameters ............................... 893

Part 12 Program Processing ................................. 925

Part 13 External Programming Interfaces ......... 959


Part 14 Obsolete Statements .............................. 1015

Part 15 Appendix.................................................... 1089

Contents at a Glance 5
Contents
Preface to the second edition 17

Preface to the first edition 19

1 Introduction and Overview 21

1.1 Purpose and Objective .......................................................................... 21


1.2 Described Releases ............................................................................... 21
1.3 From SAP Basis to SAP Web Application Server ................................... 22
1.4 ABAP and Unicode ................................................................................ 23
1.5 Book Structure ...................................................................................... 25
1.6 Search Options ..................................................................................... 28
1.7 Syntax Diagrams ................................................................................... 29
1.8 Changes to the First Edition ................................................................. 30

Part 1 Syntax

2 ABAP Syntax 35

2.1 ABAP Statements .................................................................................. 35


2.2 ABAP Language Element ....................................................................... 35
2.2.1 Operators ................................................................................ 35
2.2.2 Operands ................................................................................. 36
2.2.3 Names for Operands ................................................................ 37
2.2.4 Specifying Operands Statically or Dynamically .......................... 43
2.2.5 Data Objects in Operand Positions ........................................... 43
2.3 Naming Conventions ............................................................................ 47
2.4 Chained Statements .............................................................................. 48
2.5 Comments ............................................................................................. 49

Part 2 Program Structure

3 Introductory Program Statements 53

3.1 Overview ............................................................................................... 53

Contents 7
3.2 Executable Programs ............................................................................ 54
3.2.1 Additions for the Basic List of the Program ............................... 55
3.2.2 Addition for the Message Class ................................................ 57
3.2.3 Addition for Defining a Logical Database ................................. 57
3.3 Module Pools and Subroutine Pools .................................................... 57
3.4 Function Groups ................................................................................... 58
3.5 Class Pools ............................................................................................ 59
3.6 Interface Pools ...................................................................................... 59
3.7 Type Groups ......................................................................................... 59

4 Modularization Statements 61

4.1 Overview .............................................................................................. 61


4.2 Procedures ............................................................................................ 62
4.2.1 Methods .................................................................................. 62
4.2.2 Function Modules .................................................................... 63
4.2.3 Subroutines ............................................................................. 65
4.3 Dialog Modules .................................................................................... 69
4.4 Event Blocks ......................................................................................... 70
4.4.1 Program Constructor ............................................................... 71
4.4.2 Reporting Events ..................................................................... 72
4.4.3 Selection Screen Events ........................................................... 77
4.4.4 List Events ............................................................................... 82
4.5 Source Code Modularization ................................................................ 88
4.5.1 Include Programs ..................................................................... 89
4.5.2 Macros .................................................................................... 90

5 Built-in Types, Data Objects, and Functions 93

5.1 Overview .............................................................................................. 93


5.2 Predefined Data Types .......................................................................... 93
5.2.1 Predefined ABAP Types ............................................................ 93
5.2.2 Generic ABAP Types ................................................................ 97
5.2.3 Predefined Types in the ABAP Dictionary ................................. 98
5.2.4 The Built-In Data Type “Cursor” ............................................... 102
5.3 Built-In Data Objects ........................................................................... 102
5.3.1 The Space Constant ................................................................. 102
5.3.2 The Self-Reference me ............................................................. 102
5.3.3 ABAP System Fields ................................................................. 102
5.3.4 The Screen Structure ................................................................ 108
5.4 Predefined Functions ............................................................................ 108
5.4.1 Mathematical Functions ........................................................... 108
5.4.2 Description Functions .............................................................. 111

8 Contents
Part 3 Declarative Statements

6 Declarative Statements for Data Types


and Data Objects 115

6.1 Overview ............................................................................................... 115


6.1.1 Validity and Visibility ................................................................ 115
6.1.2 Data Types ............................................................................... 116
6.1.3 Data Objects ............................................................................ 116
6.1.4 Absolute Type Names .............................................................. 118
6.1.5 Statements for Declaring Data Types and Data Objects ............ 120
6.2 Including Type Groups .......................................................................... 121
6.3 Defining Data Types ............................................................................. 122
6.3.1 Type Definitions with Built-In ABAP Types ............................... 123
6.3.2 Type Definition by Reference to Existing Types ......................... 124
6.3.3 Defining Reference Types ......................................................... 124
6.3.4 Defining Structured Types ........................................................ 126
6.3.5 Defining Table Types ................................................................ 127
6.3.6 Defining a Range Table Type .................................................... 130
6.4 Declaring Variables ............................................................................... 131
6.4.1 Additions for Data Objects ....................................................... 133
6.4.2 Elementary Data Objects of Built-In ABAP Types ...................... 134
6.4.3 Data Objects of Existing Types ................................................. 135
6.4.4 Declaring Reference Variables .................................................. 136
6.4.5 Declaring Structures ................................................................. 137
6.4.6 Declaring Internal Tables .......................................................... 138
6.4.7 Defining a Ranges Table ........................................................... 140
6.5 Declaring Static Attributes of Classes ................................................... 141
6.6 Declaring Constant Data Objects ......................................................... 142
6.7 Declaring Static Data Objects in Procedures ........................................ 143
6.8 Copying Structure Components ............................................................ 144
6.9 Declaring the Table Work Areas ........................................................... 146
6.9.1 Flat Table Work Area ............................................................... 146
6.9.2 Any Table Work Area ............................................................... 147
6.10 Declaring Field Symbols ........................................................................ 150
6.10.1 Typing Field Symbols ................................................................ 150
6.10.2 Casting a Structure ................................................................... 151
6.11 Declaring an Extract Dataset ................................................................. 152

7 Defining Classes and Interfaces 153

7.1 Overview ............................................................................................... 153


7.2 Defining Classes .................................................................................... 154
7.2.1 Declaration Section .................................................................. 154

Contents 9
7.2.2 Implementation Section ........................................................... 163
7.2.3 Declaring Classes ..................................................................... 165
7.3 Defining Interfaces ............................................................................... 166
7.3.1 Declaration .............................................................................. 167
7.3.2 Declaring Interfaces ................................................................. 168
7.4 Declaring Components in Classes and Interfaces ................................. 169
7.4.1 Methods .................................................................................. 169
7.4.2 Events ..................................................................................... 189
7.4.3 Implementing and Integrating Interfaces .................................. 192

8 Typing 199

8.1 Overview .............................................................................................. 199


8.2 Syntax of Typing ................................................................................... 199
8.2.1 Generic Typing ........................................................................ 200
8.2.2 Complete Typing ..................................................................... 200
8.3 Checking the Typing ............................................................................. 201
8.3.1 General Rules .......................................................................... 202
8.3.2 Literals as Actual Parameters .................................................... 202

Part 4 Generating Objects

9 Generating Objects and Data Objects 209

9.1 Overview .............................................................................................. 209


9.2 Generating Data Objects ...................................................................... 209
9.2.1 Defining the Data Type Implicitly ............................................. 210
9.2.2 Defining the Data Type Through Built-In ABAP Types .............. 211
9.2.3 Defining the Data Type Through an Existing Type .................... 213
9.2.4 Generating Reference Variables ............................................... 215
9.2.5 Generating Internal Tables ....................................................... 216
9.2.6 Defining The Data Type Through Type Objects ........................ 217
9.2.7 Treatable Exceptions When Generating Data Objects ............... 219
9.3 Generating Objects in ABAP Objects ................................................... 219
9.3.1 Defining the Class Implicitly ..................................................... 220
9.3.2 Defining the Class Explicitly ..................................................... 221
9.3.3 Static Parameter Transfer ......................................................... 222
9.3.4 Dynamic Parameter Passing ..................................................... 222
9.3.5 Setting Of Object In Shared Memory ....................................... 224
9.3.6 Treatable Exceptions When Generating Objects ....................... 225

10 Contents
Part 5 Calling and Exiting Program Units

10 Calling ABAP Programs 229

10.1 Overview ............................................................................................... 229


10.2 Calling Executable Programs ................................................................. 230
10.2.1 Flow of the Program Call .......................................................... 231
10.2.2 Additions for the Selection Screen ............................................ 233
10.2.3 Additions for the Basic List ....................................................... 241
10.2.4 Additions for Background Processing ........................................ 246
10.3 Calling Transactions .............................................................................. 248
10.3.1 Calling a Transaction and Returning to the Calling Program ...... 248
10.3.2 Calling a Transaction Without Returning to
the Calling Program .................................................................. 255

11 Calling Processing Blocks 259

11.1 Overview ............................................................................................... 259


11.2 Calling Procedures ................................................................................ 260
11.2.1 Overview ................................................................................. 260
11.2.2 Method Calls ........................................................................... 262
11.2.3 Calling Function Modules ......................................................... 274
11.2.4 Subroutine Call ........................................................................ 284
11.3 Calling Event Handlers .......................................................................... 290
11.3.1 Triggering Events ...................................................................... 290
11.3.2 Registering Event Handlers ....................................................... 291
11.4 Calling Event Blocks .............................................................................. 295
11.4.1 Triggering Events of a Logical Database .................................... 295
11.4.2 Triggering List Events ............................................................... 297

12 Exiting Program Units 299

12.1 Overview ............................................................................................... 299


12.2 Leaving Programs .................................................................................. 299
12.3 Exiting Processing Blocks ...................................................................... 300
12.3.1 Procedure for Exiting Processing Blocks .................................... 300
12.3.2 Exiting Processing Blocks with RETURN .................................... 301
12.3.3 Exiting Processing Blocks with EXIT .......................................... 302
12.3.4 Exiting Processing Blocks with CHECK ...................................... 302
12.3.5 Exiting GET Processing Blocks with REJECT .............................. 304
12.3.6 Exiting Processing Blocks of Executable Programs with STOP .... 305
12.4 Exiting Loops ........................................................................................ 306
12.4.1 Exiting Loops with EXIT ............................................................ 306

Contents 11
12.4.2 Exiting a Loop Pass with CONTINUE ........................................ 307
12.4.3 Exiting a Loop Pass with CHECK .............................................. 307

Part 6 Program Flow Control

13 Logical Expressions 311

13.1 Overview .............................................................................................. 311


13.2 Logical Expressions with Relational Operators ..................................... 311
13.2.1 Relational Operators for All Data Types .................................... 312
13.2.2 Comparison Operators for Character-Type Operands ............... 316
13.2.3 Relational Operators for Byte-Type Data Types ........................ 318
13.2.4 Relational Operators for Bit Patterns ........................................ 319
13.3 Determining the Interval Range ........................................................... 320
13.4 Checking States .................................................................................... 321
13.4.1 Checking the Assignment to a Field Symbol ............................. 321
13.4.2 Checking the Validity of a Reference ........................................ 321
13.4.3 Checking an Operand for the Initial Value ................................ 322
13.4.4 Checking Output Parameters for Actual Parameters ................. 323
13.4.5 Checking Formal Parameters for Actual Parameters .................. 324
13.5 Evaluating a Selection Table ................................................................. 325
13.6 Boolean Operators and Parenthetical Expressions ............................... 327
13.6.1 Linking Logical Expressions with AND ...................................... 328
13.6.2 Linking Logical Expressions with OR ........................................ 328
13.6.3 Negating a Logical Expression with NOT .................................. 328
13.6.4 Parenthetical Expressions ......................................................... 329

14 Control Structures 331

14.1 Overview .............................................................................................. 331


14.2 Branching ............................................................................................. 331
14.2.1 Branching with IF ..................................................................... 332
14.2.2 Branching with CASE ............................................................... 333
14.3 Loops .................................................................................................... 334
14.3.1 Unconditional Loops with DO ................................................. 334
14.3.2 Conditional Loops with WHILE ................................................ 337
14.4 Program Interruption ............................................................................ 338

15 Exception Handling 341

15.1 Overview .............................................................................................. 341


15.1.1 Treatable Exceptions Prior to Release 6.10 ............................... 341
15.1.2 Treatable Exceptions in Release 6.10 and Later ........................ 341

12 Contents
15.1.3 System Behavior After a Class-Based Exception ........................ 347
15.1.4 Interaction of Non-Class-Based and Class-Based Interactions .... 348
15.1.5 Statements for Exceptions ........................................................ 349
15.2 Class-Based Exceptions ......................................................................... 349
15.2.1 Triggering Class-Based Exceptions ............................................ 349
15.2.2 Handling Class-Based Exceptions .............................................. 350
15.3 Catchable Runtime Errors ..................................................................... 354
15.3.1 Defining and Triggering Catchable Runtime Errors .................... 354
15.3.2 Handling Catchable Runtime Errors .......................................... 354
15.4 Non-Class-Based Exceptions ................................................................. 356
15.4.1 Defining Non-Class-Based Exceptions ...................................... 356
15.4.2 Triggering Non-Class-Based Exceptions .................................... 357
15.4.3 Handling Non-Class-Based Exceptions ...................................... 358

Part 7 Assignments

16 Value Assignments 361

16.1 Overview ............................................................................................... 361


16.2 Assigning Data Objects ......................................................................... 362
16.2.1 Assignment with Keyword ........................................................ 362
16.2.2 Assignment with an Assignment Operator ................................ 362
16.2.3 Multiple Assignments ............................................................... 363
16.3 Assigning Structure Components .......................................................... 364
16.4 Formatted Assignment .......................................................................... 366
16.5 Converting A Packed Number ............................................................... 367

17 Setting References 369

17.1 Overview ............................................................................................... 369


17.2 Assigning Data Objects to Field Symbols ............................................. 369
17.2.1 Specifying a Memory Area ........................................................ 371
17.2.2 Specifying the Data Type .......................................................... 377
17.2.3 Specifying the Range Limits ...................................................... 380
17.3 Initializing Field Symbols ...................................................................... 383
17.4 Retrieving a Data Reference .................................................................. 384

18 Initializing Data Objects 387

18.1 Overview ............................................................................................... 387


18.2 Initializing Any Data Objects ................................................................ 387
18.2.1 Initializing with the Initial Value ............................................... 387
18.2.2 Initializing with Other Contents ................................................ 388

Contents 13
18.3 Initializing Internal Tables .................................................................... 389
18.4 Releasing Memory ................................................................................ 390

Part 8 Processing Internal Data

19 Calculation Expressions 393

19.1 Overview .............................................................................................. 393


19.2 The COMPUTE Statement .................................................................... 393
19.3 Arithmetic Expressions ......................................................................... 394
19.3.1 Arithmetic Operators ............................................................... 395
19.3.2 Compounding .......................................................................... 395
19.3.3 Priority of Functional Methods ................................................ 396
19.3.4 Calculation Type ...................................................................... 396
19.3.5 Treatable Exceptions in Arithmetic Expressions ........................ 398
19.4 Bit Expressions ..................................................................................... 398
19.4.1 Bit Operators ........................................................................... 399
19.4.2 Compounding .......................................................................... 400

20 Calculation Statements 401

20.1 Overview .............................................................................................. 401


20.2 Addition ............................................................................................... 401
20.3 Subtraction ........................................................................................... 402
20.4 Multiplication ....................................................................................... 402
20.5 Division ................................................................................................ 403

21 Processing Byte and Character Strings 405

21.1 Overview .............................................................................................. 405


21.1.1 Byte Strings and Character Strings ............................................ 405
21.1.2 Instructions for Byte and Character-String Processing ............... 405
21.1.3 Operands in Byte and Character-String Processing ................... 406
21.1.4 Handling Closing Blanks in Character-String Processing ............ 407
21.2 Concatenating Byte and Character Strings ........................................... 408
21.3 Searching Byte and Character Strings ................................................... 409
21.3.1 Searching with FIND ................................................................ 409
21.3.2 Searching with SEARCH ........................................................... 412
21.4 Replacing Byte and Character Strings ................................................... 416
21.4.1 Position-Based Replacement .................................................... 417
21.4.2 Pattern-Based Replacement ..................................................... 418

14 Contents
21.5 Shifting Byte and Character Strings ...................................................... 420
21.5.1 Number of Places ..................................................................... 421
21.5.2 Shifting Direction ..................................................................... 423
21.5.3 Shifting Certain Characters Out of the Field .............................. 423
21.6 Splitting Byte and Character Strings ..................................................... 424
21.7 Condensing Character Strings ............................................................... 426
21.8 Converting Character Strings ................................................................ 427
21.9 Overlaying Character Strings ................................................................ 429
21.10 Converting Character Strings ................................................................ 430
21.10.1 Converting Upper/Lowercase ................................................... 430
21.10.2 Pattern-Based Conversion ........................................................ 431
21.11 Setting and Reading Bits ....................................................................... 432
21.11.1 Setting a Single Bit in a Byte String ........................................... 432
21.11.2 Reading Single Bites from Byte Strings ...................................... 433

22 Processing Internal Tables 435

22.1 Overview ............................................................................................... 435


22.2 Reading Internal Tables ........................................................................ 436
22.2.1 Reading Single Lines ................................................................. 436
22.2.2 Loop Processing for Internal Tables .......................................... 446
22.2.3 Control-Level Processing .......................................................... 451
22.2.4 Summation in Control Levels .................................................... 453
22.3 Filling Internal Tables ............................................................................ 455
22.3.1 Inserting Lines .......................................................................... 455
22.3.2 Inserting Condensed Lines ....................................................... 459
22.3.3 Appending Lines ...................................................................... 461
22.4 Processing Table Lines .......................................................................... 465
22.4.1 Changing Lines ......................................................................... 465
22.4.2 Deleting Lines .......................................................................... 470
22.4.3 Sorting ..................................................................................... 476
22.5 Specifying Components ........................................................................ 479
22.6 Searching Internal Tables ...................................................................... 481
22.6.1 Search Options ........................................................................ 482
22.7 Processing Special Internal Tables ........................................................ 483

23 Processing Extract Datasets 489

23.1 Overview ............................................................................................... 489


23.2 Defining the Line Structure ................................................................... 489
23.3 Filling the Extract Dataset .................................................................... 491
23.4 Sorting the Extract Dataset ................................................................... 492

Contents 15
23.5 Reading the Extract Dataset ................................................................. 494
23.6 Control-Level Processing ...................................................................... 495

24 Attributes of Data Objects 499

24.1 Overview .............................................................................................. 499


24.2 Elementary Properties of Any Data Objects ......................................... 499
24.2.1 Data Type and Number of Components ................................... 500
24.2.2 Length Used by the Data Object .............................................. 502
24.2.3 Decimal Places ......................................................................... 503
24.2.4 Output Length ......................................................................... 503
24.2.5 Elementary Data Type in the ABAP Dictionary ......................... 504
24.2.6 Conversion Routines ................................................................ 505
24.3 Attributes of Internal Tables ................................................................. 506
24.3.1 Table Type ............................................................................... 506
24.3.2 Number of Lines ...................................................................... 507
24.3.3 Initial Memory Requirements ................................................... 507
24.4 Distance Between Data Objects ........................................................... 508

16 Contents
Preface to the second edition
Barely two years have passed since the appearance of the first edition of
the ABAP Reference. This new, second edition reflects the complete
scope of ABAP elements produced for the current Release 6.40 and cor-
rects and completely revises large sections of the previous text (see Sec-
tion 1.8).

The most important innovations of Release 6.40 are the evolution of RTTI
to RTTC and shared objects. In addition to the existing Run Time Type
Information (RTTI), the Run Time Type Services (RTTS) now contain Run
Time Type Creation (RTTC), which enables you to create and use any data
types during the program runtime. This means that many ABAP develop-
ers have finally got what they wanted: They can create dynamic struc-
tures. The example in Section 9.2.6 shows, how this works. Shared
objects are objects in the shared memory, which all programs of an appli-
cation server can access. The related language elements and concepts are
described in this book. Further important innovations in Release 6.40 are
the introduction of simple transformations to serialize ABAP data to XML
and vice versa, and the ABAP unit, which is a testing tool integrated in the
language.

The SAP Web Application Server and the ABAP language has been a com-
ponent of SAP NetWeaver since Release 6.30. SAP NetWeaver is an open
integration and application platform which replaces and expands the pre-
ceding mySAP technology. In addition to the familiar ABAP environment,
SAP Web Application Server—since Release 6.30—also contains an envi-
ronment for the application development in Java. As this is not directly
connected to ABAP language elements, this book will not explore the
Java component of the Web Application Server.

As Mr Joachim Jacobitz, my co-author for the first edition, has since


assumed different responsibilities within SAP, I am now the sole author of
this book. In spite of this, however, Mr Jacobitz proofread each chapter
with great enthusiasm and gave me many useful tips, for which I would
like to sincerely thank him.

As the sole author of these voluminous two books, it is important for me


to point out that this task would not have been possible without the
“NetWeaver Developer Tools ABAP” group whose outstanding work I
would like to emphasize at this point. As was the case in the first edition,
the second edition was made possible by the constructive criticism and
proofreading of many colleagues. In addition to the colleagues

Preface to the second edition 17


mentioned in the foreword to the first edition, the following people def-
initely deserve a mention in the second edition: Ulrich Brink, Christian
Hansen, Ulrich Koch, Jürgen Lehmann, Mathias Müller, Helmut Prestel,
Michael Redford, Christian Stork, Wolf Hagen Thümmel and Christoph
Wedler. I would like to express my sincere gratitude to all other col-
leagues, who have not been named here, but whom I also bothered with
queries or who gave me tips in one way or another.

On this occasion I would like to express my most sincere gratitude to my


student assistants, Ms Agnieszka Chelminska, Ms Beata Kouchnir and Mr
Christian Pretzsch, who enthusiastically and actively assisted me in creat-
ing and correcting the manuscript and the revision of the online docu-
mentation.

I would like to thank the involved people at Galileo Press and my editor
Mr Florian Zimniak, for the fact that they enabled the rapid publication of
the revised version of a book which I consider very important, and for
their continuous pleasant cooperation.

For the English edition I would especially like to thank John Parker from
UCG, Stefan Proksch from Galileo Press, as well as the students Kathrin
Sturmhöfel, Marc Langen, and Dariusz Chelminski for their commitment
during the technical editing of the text.

I owe special thanks to Ute for her patience and understanding for the
fact that even after the appearance of the first edition, I continued to
write this book.

Walldorf, Germany, May 2004


Horst Keller

18 Preface to the second edition


Preface to the first edition
The introduction of ABAP Objects in Release 4.6 represented a significant
step towards contemporary programming techniques for the ABAP pro-
gramming language. Still, the next major challenge in the language’s
future development was already looming: to meet the demands of an
international, Internet-driven programming environment, Web Applica-
tion Server—as successor to the SAP Basis Module—had to be made Uni-
code-capable, and with it the ABAP programming language. This require-
ment was met in Release 6.10.

However, implementing Release 6.10 or 6.20 does not mean that you will
be forced to modify your programs, as long as you do not convert the SAP
system to Unicode. Nonetheless, regardless of whether a program will be
used in a Unicode or non-Unicode system, the new features imple-
mented together with Unicode represent an important step towards
more stable, bug-free programming.

Accordingly, the introduction of Unicode was a particular impetus for


writing this book. The online ABAP keyword documentation in the sys-
tem grew with the language as new terms were added and existing terms
remained. It has a section on “ABAP Objects” and—since Release 6.10—
a section on “Unicode” as well, while the instructions for traditional
reporting are still written as if every ABAP program were a report that is
linked with a logical database. Because this type of documentation is
acceptable for context-sensitive help—but no longer sufficient for full,
integrated documentation—we resolved to write an ABAP Reference
work to follow our introduction to SAP programming.

The goals we defined were to completely revise and standardize the


ABAP documentation. This not only involved changing the outlines and
summaries of the individual statements, but also their content and style.
To this effect, we have introduced a new form of illustration, “pseudo
syntax,” to break down any statement from its basic form to its individual
components. This book also marks the first time that the requirements for
all operands that can appear in ABAP statements have been described
exhaustively and uniformly in one go. Our intent is to give you a compre-
hensive description of all the ABAP language elements that are active in
the current Release 6.20. This includes detailed descriptions of language
elements that have been flagged as obsolete, but which are only prohi-
bited in the context of ABAP Objects. This ABAP Reference will help you
to analyze any existing ABAP program, as well as write your own. While it
is not intended to be a “Best Practices” book, we hope that giving you

Preface to the first edition 19


precise descriptions of each statement will make their intent and purpose
clearer than was previously the case.

Documenting a language boasting some 500 major language elements—


while maintaining the same high quality and degree of detail through-
out—was certainly no easy task, particularly since ABAP has been contin-
ually enhanced over the past 20 years and no element, once introduced,
has ever been deleted (to ensure downward compatibility). This fact also
explains the repeated delays in publishing this book, and we would like to
thank all of you for waiting so patiently for its release. To compensate, the
book you now hold in your hands documents the latest release of the
ABAP language, and will remain valid for a long time to come. Despite
our careful scrutiny of each and every chapter, we cannot discount the
possibility that the book may still contain a few minor inconsistencies,
and would be grateful to you for pointing out anything you might find.
You can reach us at the SAP PRESS Web site under www.sap-press.com.

It would not have been possible to write this book in its current form
without the direct and indirect help we enjoyed from a number of people
during the authoring and proofreading processes. We would like to
expressly thank Masoud Aghadavoodi, Thomas Bareiss, Adrian Goerler,
Christian Jendel, Gerd Kluger, Björn Mielenhausen, Andreas Simon
Schmitt and Christoph Stöck for their help. We thank Erhardt Vortanz for
his assistance in writing the manuscript. We especially thank Andreas Blu-
menthal, Development Manager of the Business Programming Languages
Group, for making this project possible in the first place and for more or
less letting us decide what form it would take. We have the tireless
Michael Demuth to thank for the fact that this book comes with an SAP
system, this time as two CDs with SAP Web Application Server 6.10.
Lastly, we would like to thank the staff of Galileo Press—particularly Iris
Warkus and Florian Zimniak—for their help in proofreading the manu-
script and for never giving up hope that we really would be finished at
some point.

Horst Keller particularly thanks his wife Ute, who in the last few months
nearly always found him hunched over his laptop, for her patience and
willingness to sacrifice more of their already scarce free time together for
yet another book project.

We hope you enjoy reading this ABAP Reference.

Walldorf, Germany, July 2002


Horst Keller and Joachim Jacobitz

20 Preface to the first edition


Contents

Part 9 User Dialogs

25 Dynpros 531

25.1 Overview ............................................................................................... 531


25.1.1 User Interface .......................................................................... 531
25.1.2 Screen Layout .......................................................................... 532
25.1.3 Dynpro Fields .......................................................................... 533
25.1.4 Dynpro Flow and Dynpro Sequences ....................................... 534
25.2 Statements in the Dynpro Flow Logic ................................................... 535
25.2.1 Dynpro Flow Logic Event Blocks .............................................. 536
25.2.2 Calling Dialog Modules ............................................................ 537
25.2.3 Controlling Data Transfer and Flow Logic ................................. 541
25.2.4 Processing Chains ..................................................................... 547
25.2.5 Processing Table Controls ......................................................... 549
25.2.6 Calling Subscreens .................................................................... 553
25.3 ABAP Statements for Dynpros .............................................................. 556
25.3.1 Calling a Dynpro Sequence ...................................................... 557
25.3.2 Setting the GUI Status .............................................................. 558
25.3.3 Determining the GUI Status ..................................................... 560
25.3.4 Setting the GUI Title ................................................................. 561
25.3.5 Suppressing the Display ........................................................... 563
25.3.6 Determining Attributes of Screen Elements .............................. 564
25.3.7 Modifying Attributes of Screen Elements .................................. 566
25.3.8 Setting the Cursor .................................................................... 567
25.3.9 Evaluating the Cursor Position .................................................. 569
25.3.10 Declaring a Control .................................................................. 570
25.3.11 Initializing Table Control .......................................................... 576
25.3.12 Exiting Step-Loop Processing .................................................... 576
25.3.13 Holding Input Data .................................................................. 577
25.3.14 Setting the Next Dynpro .......................................................... 578
25.3.15 Leaving a Dynpro ..................................................................... 578

26 Selection Screens 581

26.1 Overview ............................................................................................... 581


26.1.1 Selection Screens as Dynpros ................................................... 581
26.1.2 Selection Screen Tasks .............................................................. 581
26.1.3 GUI Status of Selection Screens ................................................ 581
26.1.4 Selection Screen Events ............................................................ 582

Contents 517
26.1.5 Selection Screens and Logical Databases .................................. 582
26.1.6 Statements for Selection Screens .............................................. 582
26.2 Creating and Laying Out Selection Screens .......................................... 582
26.2.1 Creating Selection Screens ....................................................... 583
26.2.2 Laying Out Selection Screens ................................................... 586
26.2.3 Adopting Elements of Other Selection Screens ......................... 601
26.2.4 Variants and Additions for Selection Screens
of Logical Databases ................................................................ 606
26.3 Defining Parameters ............................................................................. 610
26.3.1 Data Type of the Parameter ..................................................... 611
26.3.2 Attributes of Screen Elements .................................................. 614
26.3.3 Attributes of the Value and the Passing of Values ..................... 620
26.3.4 Additions for Selection Screens of Logical Databases ................ 623
26.4 Defining Selection Criteria .................................................................... 626
26.4.1 Data Type of the LOW and HIGH Selection Table Columns ...... 629
26.4.2 Attributes of Screen Elements .................................................. 631
26.4.3 Attributes of the Value and Passing of Values ........................... 634
26.4.4 Additions for Selection Screens of Logical Databases ................ 636
26.5 Calling Selection Screens ...................................................................... 638
26.5.1 Call via SUBMIT ....................................................................... 638
26.5.2 Call via Report Transaction ....................................................... 638
26.5.3 Call via Dialog Transaction ....................................................... 639
26.5.4 Calling in the Program ............................................................. 639
26.5.5 Selection-Screen Processing ..................................................... 640

27 Lists 643

27.1 Overview .............................................................................................. 643


27.1.1 Lists as Screens ........................................................................ 643
27.1.2 Lists in ABAP Programs ............................................................ 643
27.1.3 Basic List .................................................................................. 643
27.1.4 Details Lists ............................................................................. 643
27.1.5 Structure of a List .................................................................... 644
27.1.6 Print Lists ................................................................................. 645
27.1.7 Lists and ABAP Objects ............................................................ 645
27.1.8 Lists and Unicode .................................................................... 645
27.1.9 Statements for List Processing .................................................. 646
27.2 Creating Lists ........................................................................................ 647
27.2.1 Writing Data in Lists ................................................................ 647
27.2.2 Creating Horizontal Lines ......................................................... 673
27.2.3 Formatting Lists Section by Section .......................................... 674
27.2.4 Displaying Blank Lines ............................................................. 681
27.2.5 Vertical Positioning of the List Cursor ....................................... 681
27.2.6 Horizontal Positioning of the List Cursor .................................. 686
27.2.7 Fixed Area When Scrolling Horizontally ................................... 687
27.2.8 Page Breaks and Print Lists ....................................................... 688
27.2.9 Conditional Page Break ............................................................ 696
27.2.10 Saving Variables with List Lines ................................................ 697

518 Contents
27.2.11 Print List Page Margins ............................................................. 698
27.2.12 Controlling Print Lists ............................................................... 699
27.3 Processing Lists in the List Buffer ......................................................... 703
27.3.1 Reading List Lines ..................................................................... 703
27.3.2 Modifying List Lines ................................................................. 705
27.3.3 Scrolling Lists ........................................................................... 708
27.3.4 Reading List Attributes ............................................................. 711
27.4 Evaluating the Displayed List at the Cursor Position ............................ 714
27.5 Display Attributes of Screen Lists ......................................................... 716
27.5.1 GUI Status of a Screen List ....................................................... 716
27.5.2 Title of a Screen List ................................................................. 718
27.5.3 Setting the Cursor .................................................................... 718
27.5.4 Lists in a Dialog Box ................................................................. 721
27.6 Calling and Exiting List Displays ........................................................... 722
27.6.1 Calling the Basic List Display .................................................... 723
27.6.2 Leaving the List Display ............................................................ 724

28 Messages 727

28.1 Overview ............................................................................................... 727


28.1.1 Storing Messages ...................................................................... 727
28.1.2 Message Types ......................................................................... 727
28.2 Sending Messages ................................................................................ 731
28.2.1 Specifying a Message ................................................................ 731
28.2.2 Specifying any Text .................................................................. 735
28.2.3 Additions to MESSAGE ............................................................ 736

Part 10 Processing External Data

29 Open SQL 743

29.1 Overview ............................................................................................... 743


29.1.1 Scope of Open SQL .................................................................. 743
29.1.2 Database Interface ................................................................... 743
29.1.3 Database Access ....................................................................... 743
29.1.4 Client Handling ........................................................................ 743
29.1.5 SAP Buffering ........................................................................... 743
29.1.6 LUW ........................................................................................ 744
29.1.7 Open SQL Statements .............................................................. 744
29.2 Reading Data from Database Tables ..................................................... 745
29.2.1 Determining the Structure of the Result Set ............................. 747
29.2.2 Specifying Database Tables to Be Read ..................................... 754
29.2.3 Specifying the Target Area ........................................................ 760
29.2.4 Restricting the Result Set .......................................................... 765
29.2.5 Combining Lines ...................................................................... 777
29.2.6 Restricting Combined Lines ...................................................... 778

Contents 519
29.2.7 Sorting Result Set Lines ............................................................ 779
29.3 Reading Data from Database Tables Using a Cursor ............................ 782
29.3.1 Opening a Cursor .................................................................... 782
29.3.2 Reading Data Using a Cursor .................................................... 783
29.3.3 Close Cursor ............................................................................ 784
29.4 Inserting Data into Database Tables .................................................... 786
29.4.1 Specifying the Database Table .................................................. 787
29.4.2 Specifying the Source ............................................................... 788
29.5 Changing Data in Database Tables ....................................................... 790
29.5.1 Specifying the Database Table .................................................. 790
29.5.2 Specifying Changes .................................................................. 791
29.6 Inserting or Changing Data in Database Tables .................................... 797
29.6.1 Specifying the Database Table .................................................. 797
29.6.2 Specifying the Source ............................................................... 798
29.7 Deleting Data in Database Tables ........................................................ 799
29.7.1 Specifying the Database Table .................................................. 800
29.7.2 Specifying the Lines ................................................................. 800
29.8 Work Areas in Open SQL Statements ................................................... 803
29.9 Treatable Exceptions in Open SQL Statements .................................... 804

30 Native SQL 805

30.1 Overview .............................................................................................. 805


30.2 Including Native SQL ............................................................................ 805
30.2.1 Host Variables .......................................................................... 807
30.2.2 Cursor Processing .................................................................... 808
30.2.3 Calling Database Procedures .................................................... 809
30.2.4 Defining the Database Connection ........................................... 811
30.2.5 Implicit Cursor Processing ........................................................ 814
30.3 Leaving Native SQL .............................................................................. 815
30.4 Treatable Exceptions in Native SQL ...................................................... 816

31 Data Clusters 817

31.1 Overview .............................................................................................. 817


31.2 Creating Data Clusters ......................................................................... 817
31.2.1 Defining the Data Cluster ........................................................ 818
31.2.2 Defining the Storage Medium .................................................. 819
31.2.3 Controlling Compression ......................................................... 824
31.2.4 Treatable Exceptions During the Export of Data Clusters .......... 824
31.3 Reading Data Clusters .......................................................................... 825
31.3.1 Specifying the Data Objects to Be Read ................................... 825
31.3.2 Defining the Storage Medium .................................................. 827
31.3.3 Conversion Additions ............................................................... 831

520 Contents
31.3.4 Text Language Rule .................................................................. 837
31.3.5 Treatable Exceptions During the Import from Data Clusters ...... 839
31.4 Reading the Table of Contents of a Data Cluster .................................. 839
31.5 Deleting a Data Cluster ........................................................................ 841
31.6 Deleting a Data Cluster in the ABAP Memory ...................................... 842

32 The ABAP File Interface 843

32.1 Overview ............................................................................................... 843


32.1.1 Addressing Files ....................................................................... 843
32.1.2 Authorizations for Accessing Files ............................................. 843
32.1.3 Locks ....................................................................................... 845
32.1.4 The File Interface in Unicode Programs .................................... 846
32.1.5 File Size ................................................................................... 847
32.1.6 File Interface Statements .......................................................... 847
32.2 Opening a File ....................................................................................... 847
32.2.1 Definition of the Access Type ................................................... 848
32.2.2 Defining the Storage Type ........................................................ 850
32.2.3 Specifying the Position ............................................................. 854
32.2.4 Operating System-Dependent Additions .................................. 855
32.2.5 Error Handling ......................................................................... 857
32.2.6 Treatable Exceptions When Opening Files ................................ 859
32.3 Writing a File ........................................................................................ 860
32.3.1 The Influence of the Access Type .............................................. 860
32.3.2 The Influence of the Storage Type ............................................ 861
32.3.3 Restricting the Number of Transferred Characters or Bytes ....... 862
32.3.4 Preventing the Appending of an End-of-Line Marking .............. 863
32.3.5 Treatable Exceptions When Writing in Files .............................. 863
32.4 Reading a File ....................................................................................... 864
32.4.1 The Influence of the Access Type .............................................. 864
32.4.2 The Influence of the Storage Type ............................................ 865
32.4.3 Restricting the Number of Imported Characters or Bytes .......... 866
32.4.4 Determining the Number of Imported Characters or Bytes ....... 868
32.4.5 Treatable Exceptions When Reading Files ................................. 868
32.5 Determining the Attributes of an Opened File ..................................... 869
32.5.1 Determining the Position of the File Pointer ............................. 869
32.5.2 Determining Other Attributes .................................................. 870
32.5.3 Treatable Exceptions When Determining File Attributes ........... 872
32.6 Changing the Attributes of an Opened File .......................................... 872
32.6.1 Defining the Position of the File Pointer ................................... 873
32.6.2 Changing Further Attributes ..................................................... 874
32.6.3 Treatable Exceptions When Changing File Attributes ................ 876
32.7 Changing the Size of a File .................................................................... 877
32.8 Closing a File ........................................................................................ 878
32.9 Deleting a File ....................................................................................... 879

Contents 521
33 Data Consistency 881

33.1 Overview .............................................................................................. 881


33.2 Database LUW ...................................................................................... 881
33.2.1 Database Commit .................................................................... 882
33.2.2 Database Rollback ................................................................... 883
33.3 SAP LUW .............................................................................................. 883
33.3.1 SAP Commit ............................................................................ 884
33.3.2 SAP Rollback ........................................................................... 886
33.3.3 Local Updating ........................................................................ 887
33.4 Database Locks ..................................................................................... 888
33.5 SAP Locks ............................................................................................. 888
33.5.1 Imposing SAP Locks ................................................................. 889
33.5.2 Lifting SAP Locks ..................................................................... 889
33.6 Authorization Check ............................................................................. 890

Part 11 Program Parameters

34 Parameters in the SAP Memory 895

34.1 Overview .............................................................................................. 895


34.1.1 SPA/GPA parameters ............................................................... 895
34.1.2 Administrating SPA/GPA parameters ........................................ 895
34.1.3 SPA/GPA parameters and dynpro fields .................................... 896
34.1.4 Statements for SPA/GPA Parameters ........................................ 896
34.2 Setting Parameters ............................................................................... 896
34.3 Reading Parameters .............................................................................. 898

35 Language Environment 901

35.1 Overview .............................................................................................. 901


35.1.1 Text Pools ................................................................................ 901
35.1.2 Text Environment .................................................................... 901
35.1.3 Country Identification for List Processing ................................. 903
35.1.4 Statements for the Language Environment ............................... 904
35.2 Setting the Text Pool of a Language ..................................................... 904
35.3 Setting the Text Environment ............................................................... 905
35.4 Determining the Text Environment ...................................................... 910
35.5 Setting Country Identification .............................................................. 911

522 Contents
36 Date and Time Information 913

36.1 Overview ............................................................................................... 913


36.1.1 System Fields for Date and Time .............................................. 913
36.1.2 Time Stamps ............................................................................ 914
36.1.3 Statements for Date and Time .................................................. 917
36.2 Supplying System Fields for Date and Time .......................................... 917
36.3 Creating Current Time Stamp ................................................................ 918
36.4 Converting Time Stamp Into Local Time ............................................... 919
36.5 Converting Local Time Into a Time Stamp ............................................ 921

Part 12 Program Processing

37 Testing and Checking Programs 927

37.1 Overview ............................................................................................... 927


37.2 Checkpoints .......................................................................................... 927
37.2.1 Defining Assertion .................................................................... 927
37.2.2 Setting Breakpoint .................................................................... 929
37.3 Runtime Measurement ......................................................................... 931
37.3.1 Relative Program Runtime ........................................................ 931
37.3.2 Setting Time Resolution ........................................................... 933
37.4 Measuring Section for Runtime Analysis .............................................. 934
37.5 Deactivating the Extended Program Check ........................................... 935

38 Dynamic Program Development 937

38.1 Overview ............................................................................................... 937


38.2 Dynamic Subroutine Pool ..................................................................... 937
38.2.1 Additions for Error Exceptions .................................................. 939
38.3 Reading an ABAP Program .................................................................... 943
38.4 Checking Syntax .................................................................................... 944
38.4.1 Determining the Attributes of the Syntax Check ....................... 945
38.4.2 Additions for Error Handling ..................................................... 946
38.5 Creating or Overwriting an ABAP Program ........................................... 948
38.5.1 Determine Program Attributes ................................................. 949
38.6 Reading a Text Pool .............................................................................. 953
38.7 Creating or Overwriting a Text Pool ..................................................... 954
38.8 Calling the ABAP Editor ........................................................................ 956

Contents 523
Part 13 External Programming Interfaces

39 Remote Function Call 961

39.1 Overview .............................................................................................. 961


39.1.1 RFC Interface ........................................................................... 961
39.1.2 RFC Destination ....................................................................... 962
39.1.3 RFC Context ............................................................................ 963
39.1.4 RFC Exceptions ........................................................................ 964
39.1.5 RFC System Fields .................................................................... 964
39.1.6 RFC—Authorization ................................................................. 965
39.1.7 RFC Restrictions ...................................................................... 965
39.1.8 Statements of the RFC Interface ............................................... 966
39.2 Calling Remote Functions ..................................................................... 966
39.2.1 Synchronous Remote Function Call .......................................... 967
39.2.2 Asynchronous Remote Function Call ........................................ 968
39.2.3 Transactional Remote Function Call ......................................... 973
39.2.4 Remote Function Call Example ................................................ 975

40 ABAP and XML 979

40.1 XSL Transformations ............................................................................. 979


40.1.1 XSL Transformations in the Repository ..................................... 979
40.2 Canonical XML Representation ............................................................ 980
40.2.1 General asXML Format ............................................................ 980
40.2.2 asXML Format for Named Data Objects with the Exception
of Reference Variables ............................................................. 981
40.2.3 asXML Format for Reference Variables and
Referenced Objects ................................................................. 983
40.3 Simple Transformations ........................................................................ 990
40.4 Calling an XSL or ST Transformation ..................................................... 990
40.4.1 Specifying the Transformation .................................................. 992
40.4.2 Transformation Source ............................................................. 992
40.4.3 Result of a Transformation ....................................................... 993
40.4.4 Parameters for an XSL Transformation ...................................... 995
40.4.5 Passing External Objects to an XSL Transformation ................... 996
40.4.6 Controlling the Transformation ................................................ 997
40.5 Example of an XSL Transformation ....................................................... 998
40.6 Simple Transformation Example ........................................................... 1001

41 OLE Interface 1005

41.1 Creating an Automation Object ............................................................ 1006


41.2 Calling an Automation Method ............................................................ 1007

524 Contents
41.3 Reading the Attributes of an Automation Object ................................. 1010
41.4 Setting the Attributes of an Automation Object ................................... 1011
41.5 Releasing an Automation Object .......................................................... 1012

Part 14 Obsolete Statements

42 Obsolete Statements 1017

42.1 Overview ............................................................................................... 1017


42.2 Obsolete Syntax .................................................................................... 1017
42.3 Obsolete Modularization ...................................................................... 1018
42.3.1 Obsolete Event Block ............................................................... 1018
42.4 Obsolete Declarations .......................................................................... 1018
42.4.1 Obsolete Interface Work Areas ................................................. 1018
42.4.2 Obsolete Declarations of Internal Standard Tables .................... 1021
42.4.3 Obsolete Declarations of Special Internal Tables ....................... 1023
42.4.4 Obsolete Note for the Extended Program Check ...................... 1025
42.5 Obsolete Object Creation ..................................................................... 1026
42.6 Obsolete Program Call .......................................................................... 1028
42.7 Obsolete Exiting of a Program .............................................................. 1030
42.8 Obsolete Program Flow Control ........................................................... 1031
42.8.1 Obsolete Relational Operators ................................................. 1031
42.8.2 Obsolete Branching .................................................................. 1031
42.9 Obsolete Assignments .......................................................................... 1033
42.9.1 Obsolete Assignment of a Percentage Subfield ......................... 1033
42.9.2 Obsolete Conversion ................................................................ 1034
42.9.3 Obsolete Temporary Storage of Data Objects ........................... 1035
42.10 Obsolete Calculation Statements .......................................................... 1036
42.10.1 Addition of Field Sequences in the Memory ............................. 1036
42.10.2 Adding Component by Component .......................................... 1038
42.10.3 Subtracting Component by Component ................................... 1039
42.10.4 Multiplying Component by Component ................................... 1040
42.10.5 Dividing Component by Component ........................................ 1041
42.10.6 Obsolete Calculations During List Creation ............................... 1041
42.11 Obsolete Character-String Processing .................................................. 1044
42.11.1 Obsolete Translation ................................................................ 1044
42.11.2 Obsolete Replacement ............................................................. 1046
42.11.3 Complement on Nine of a Date ............................................... 1048
42.12 Obsolete Processing of Internal Tables ................................................. 1049
42.12.1 Obsolete Key Specification When Reading Rows ...................... 1049
42.12.2 Obsolete Assignment to Table Lines ......................................... 1052
42.12.3 Obsolete Form of the PROVIDE Statement .............................. 1054
42.13 Contexts ................................................................................................ 1056
42.13.1 Overview ................................................................................. 1056

Contents 525
42.13.2 Creating Instances of Contexts ................................................. 1057
42.13.3 Providing Contexts with Key Values ......................................... 1058
42.13.4 Querying Contexts ................................................................... 1058
42.14 Obsolete Statements in the Flow Logic of Dynpros ............................. 1060
42.14.1 Checking Values in the Flow Logic ........................................... 1060
42.14.2 Processing Step Loops ............................................................. 1063
42.15 Obsolete Statements in List Processing ............................................... 1068
42.15.1 Obsolete Formatting Statements .............................................. 1068
42.15.2 Obsolete Print Parameters ....................................................... 1070
42.15.3 Obsolete Creation of a Spool Task ........................................... 1071
42.16 Obsolete Database Accesses ................................................................ 1072
42.16.1 Obsolete Reading of a Row ...................................................... 1072
42.16.2 Obsolete Sequential Reading of Several Rows .......................... 1074
42.16.3 Obsolete Reading of Several Rows into an Internal Table ......... 1075
42.16.4 Obsolete Short Forms in Open SQL ......................................... 1077
42.17 Obsolete External Programming Interface CPC-I .................................. 1078
42.17.1 Connection Steps .................................................................... 1079
42.17.2 Other Additions ....................................................................... 1082
42.18 Obsolete Call of a Text Editor ............................................................... 1086

Part 15 Appendix

A Conversion Rules for Assignments 1091

A.1 Overview .............................................................................................. 1091


A.2 Conversion Rules for Elementary Data Types ....................................... 1091
A.2.1 Presenting Numeric Values in Character-Like Fields ................. 1092
A.2.2 Conversion Table for Source-Field Type c ................................ 1093
A.2.3 Conversion Table for Source-Field Type d ................................ 1094
A.2.4 Conversion Table for Source-Field Type f ................................. 1096
A.2.5 Conversion Table for Source Field of Types i, b, or s ................ 1097
A.2.6 Conversion Table for Source-Field Type n ................................ 1098
A.2.7 Conversion Table for Source-Field Type p ................................ 1099
A.2.8 Conversion Table for Source-Field Type string .......................... 1100
A.2.9 Conversion Table for Source-Field Type t ................................. 1101
A.2.10 Conversion Table for Source-Field Type x ................................ 1102
A.2.11 Conversion Table for Source-Field Type xstring ........................ 1103
A.3 Conversion Rules for Structures ........................................................... 1104
A.3.1 Conversion Between Flat Structures ......................................... 1105
A.3.2 Conversion Between Flat Structures and Single Fields .............. 1108
A.4 Conversion Rules for Internal Tables .................................................... 1109
A.5 Assignments Between Reference Variables .......................................... 1110
A.5.1 Static and Dynamic Type .......................................................... 1110
A.5.2 Up Cast and Down Cast ........................................................... 1111
A.5.3 Assignments Between Data Reference Variables ....................... 1112
A.5.4 Assignments Between Object Reference Variables .................... 1113

526 Contents
B Language-like Classes and Interfaces 1115

B.1 Auxiliary Classes ................................................................................... 1115


B.1.1 Run Time Type Services (RTTS) Classes ..................................... 1115
B.1.2 Classes for Converting External Data Formats ........................... 1116
B.1.3 Class for Extreme Values of Data Objects ................................. 1117
B.1.4 Class for the Properties of Characters ....................................... 1117
B.1.5 Classes for Mathematical Operations ........................................ 1117
B.1.6 Class for Time Stamps .............................................................. 1118
B.1.7 Classes for Data Clusters .......................................................... 1118
B.1.8 Class for Transactions ............................................................... 1118
B.1.9 Class for Formatting Lists ......................................................... 1119
B.1.10 Classes for Compressing Data ................................................... 1119
B.1.11 Class for Runtime Measurements ............................................. 1119
B.1.12 Class for Weak References ........................................................ 1120
B.2 Interface for the Serialization of Objects .............................................. 1120
B.3 Shared Objects ...................................................................................... 1120
B.4 Object Services ..................................................................................... 1121
B.5 JavaScript Integration ........................................................................... 1121

C Language-like Function Modules 1123

C.1 Function Modules for Print Parameters ................................................ 1123


C.1.1 GET_PRINT_PARAMETERS ....................................................... 1123
C.1.2 SET_PRINT_PARAMETERS ........................................................ 1126
C.2 Function Modules for Files on the Presentation Server ........................ 1126
C.3 Function Modules for Calling Logical Databases .................................. 1127

D Predefined Treatable Exceptions 1129

D.1 Overview ............................................................................................... 1129


D.2 Predefined Exception Classes ................................................................ 1129
D.3 Catchable Runtime Errors ..................................................................... 1131
D.3.1 Exception Group for Arithmetic Errors ...................................... 1132
D.3.2 Exception Group for Conversion Errors .................................... 1133
D.3.3 Exception Group for Errors When Creating Data Objects .......... 1134
D.3.4 Exception Group for Errors When Creating Instances
of Classes ................................................................................. 1134
D.3.5 Exception Group for Errors When Accessing Data Objects ........ 1134
D.3.6 Exception Group for Errors in Dynamic Method Calls ............... 1135
D.3.7 Exception Group for Errors When Accessing Files ..................... 1136
D.3.8 Exception Group for Errors When Accessing Data Clusters ....... 1136
D.3.9 Exception Group for Errors in the Language Environment ......... 1137

Contents 527
D.3.10 Exception Group for Errors with Remote Function Calls ........... 1137
D.3.11 Catchable Runtime Errors That Are Not Assigned
to Any Group .......................................................................... 1137

E Glossary 1139

F Notes on the CD-ROMs 1195

Index 1197

528 Contents
40 ABAP and XML

With the CALL TRANSFORMATION statement (see Section 40.4), you can
convert ABAP data into the XML format and vice versa. Transformation
programs of the following types are called: XSL transformations or Simple
Transformations (as of Release 6.40).

40.1 XSL Transformations


An XSL transformation is a program in the repository that is written in
XSLT (Extensible Stylesheet Language Transformation program) and used
for the transformation of XML documents. When calling an XSL transfor-
mation using the CALL TRANSFORMATION statement, you can also directly
convert ABAP data into XML and vice versa. For this purpose, a serializa-
tion or de-serialization is carried out implicitly.

In the case of transformations that use ABAP data as a source, the ABAP
data is first serialized into a canonical XML representation (asXML, see
40.2), which then serves as the actual source for the XSL transformation.
In the case of transformations that expect ABAP data as a result, the result
of the XSL transformation is de-serialized into the ABAP data. As a pre-
requisite for de-serialization is the result must take the form of a canoni-
cal XML representation.

As of Release 6.10, the ABAP runtime environment contains an XSLT pro-


cessor for executing the transformations. It supports almost all XSLT
statements and provides enhancements (so-called extension instructions)
such as the possibility to call ABAP methods from XSLT programs.

40.1.1 XSL Transformations in the Repository

XSL transformations that can be called with a CALL TRANSFORMATION


statement must exist in the repository as XSLT programs. To create and
edit XSLT programs in the Object Navigator in the ABAP Workbench,
choose Edit Object • More ... • Transformation (or XSLT program before
Release 6.40 and XSL transformation before Release 6.20) and choose
XSLT program.

SAP delivers the identity transformation under the name ID. If you per-
form an identity transformation from XML to XML, the result is a copy of
the source document. If you perform an identity transformation from
ABAP to XML, this results in a canonical XML representation (asXML) of
the ABAP data (explicit serialization). An identity transformation from

XSL Transformations 979


XML to ABAP transforms a canonical XML representation to ABAP data
(explicit de-serialization).

40.2 Canonical XML Representation


The canonical XML representation is the format of an XML document that
results from a serialization of ABAP data or that is required for a de-seri-
alization. This format is also referred to as asXML (ABAP Serialization
XML). The canonical XML representation supports all ABAP data types.

The asXML format is significant in the following cases:

왘 If you have written any XSL transformations of ABAP data into an XML
format, the asXML format of the serialization result must be known.
왘 If you want to create external XML documents that can be de-serialized
into ABAP data, they must be in an asXML format.

Note
The asXML format of serialized ABAP data or objects can be created and
examined using the predefined identity transformation ID.

40.2.1 General asXML Format


The following lines show the general format of the canonical XML repre-
sentation1 without the XML header; line breaks and indents are included
for clarification purposes only. A detailed example can be found in Sec-
tion 40.5.

<asx:abap version = "1.0"


xmlns:asx = "http://www.sap.com/abapxml">
<asx:values>
<bn1>...</bn1>
...
<bnn>...</bnn>
</asx:values>
<asx:heap>
...
</asx:heap>
</asx:abap>

The root element of an asXML documents is abap in the namespace (XML


Namespace) http://www.sap.com/abapxml. The optional attribute ver-

1 The asXML format is a general format that cannot be completely defined with an
XML pattern. The reason for this is that various ABAP types are referred to.

980 ABAP and XML


sion currently always has the value "1.0" and is intended for future
enhancements of asXML. The root element abap must contain the sub-
element values of the same namespace. The sub-elements bni of values
represent the ABAP data objects that are specified as e1, e2, ... in the
source addition to the CALL TRANSFORMATION statement or as f1, f2, ... in
the result addition (see Section 40.4). The names of the elements bn1,
bn2, ... are the names specified there in uppercase. The text contents of
the elements <bn1>...</bn1> (or <bn1 ... />,), ... represent the con-
tents of all named data objects with the exception of reference variables.
The latter are represented by elements without text contents but with a
special attribute (see Section 40.2.3.1). The optional element heap con-
tains the contents of referenced anonymous data objects and objects (see
Sections 40.2.3.2 and 40.2.3.3).

With the exception of the special cases in Table 40.1, the names of the
element bn1, bn2, ... contain only capital letters. The names bn1, bn2, ...
(or components of structures or objects, see Sections 40.2.2.2 and
40.2.2.3) specified in the source and result additions to the CALL
TRANSFORMATION statement can only be used as (uppercase) names for
XML elements if they consist solely of the characters "a" to "z", "A" to "Z",
"0" to "9", or "_"; the first character must be a letter or "_". Other charac-
ters are replaced according to Table 40.1.

Character in the ABAP name Replacement character in the XML name

ASCII character other than "a" to "z," "_--hex(c)," where hex(c) is the two-digit
"A" to "Z," "0" to "9," or "_" and char- hexadecimal representation of the ASCII
acter "0" to "9" as first character. code of the character c.

"/" "_-"

"xml" as the first three characters in "x-ml" in a corresponding combination of


any combination of uppercase and uppercase and lowercase
lowercase

Table 40.1 Replacement Rules for Charaters in ABAP Names

40.2.2 asXML Format for Named Data Objects with the


Exception of Reference Variables
Named data objects, except for reference variables, are represented as
the text contents of the elements <bn1>...</bn1>, ... The representation
of named data objects in <bn1>...</bn1>, ... depends on the relevant
ABAP data type.

Canonical XML Representation 981


40.2.2.1 Elementary Data Types

The asXML representation of elementary data objects with predefined


ABAP types from Table 5.2 corresponds to the canonical representation
of XML pattern data types (http://www.w3.org/TR/xmlschema-2/#built-
in-datatypes, see Table 40.2), where date and time are represented
according to ISO-8601, and binary data is represented using Base 64
encoding.

ABAP type ABAP example XML pattern type XML example

c " Hi" string " Hi"

d "20020204" date "2002–02–04"

f –3.140...0E+02 double "-3.14E2"

i, b, s –123 int, unsignedByte, short "-123"

n "001234" string (pattern [0–9]+) "001234"

p –1.23 decimal "-1.23"

string " Hello " string " Hello "

t "201501" time "20:15:01"

x "ABCDEF" base64Binary "q83v"

xstring "456789AB" base64Binary "RweJqw=="

Table 40.2 Canonical XML Representation (asXML) of Predefined ABAP Types

40.2.2.2 Structures

In asXML, the components of an ABAP structure are represented as a


sequence of sub-elements of the structure element. The content of each
sub-element corresponds to the canonical representation of the compo-
nent value. The name of each sub-element is the name of the corre-
sponding component. In the case of serialization, the sub-elements are
represented in the order of the components in the structure. When the
asXML representation of a structure is de-serialized, the order of the sub-
elements is irrelevant and excess XML elements are ignored. Components
of the structure for which there is no sub-element remain initial.

40.2.2.3 Internal Tables

In asXML, the rows of an internal table are represented as a a sequence of


sub-elements of the table element. The content of each sub-element cor-
responds to the canonical representation of the row value. The name of a

982 ABAP and XML


sub-element is irrelevant. If the canonical XML representation is created
by serialization and the row type refers to the ABAP Dictionary, the name
there is used; otherwise, the name item is used. Any table kind is
allowed. During serialization, no information about the table kind is
transferred to the XML document. If the target field of an XSL transforma-
tion is a sorted table, the rows are sorted accordingly during de-serializa-
tion.

40.2.3 asXML Format for Reference Variables and


Referenced Objects
Anonymous data objects and instances of classes (objects) are addressed
in ABAP exclusively by means of references in reference variables. The
corresponding asXML format is made up of sub-elements of values for
named reference variables (see Section 40.2.3.1) and of sub-elements of
heap (see Sections 40.2.3.2 and 40.2.3.3) for the referenced objects. The
link between the reference elements and the object elements is set up by
means of an XML reference mechanism, whereby a referenced object in
the same XML document is identified with a key. The dynamic type of the
reference variables for the object elements under heap is specified when
serialization takes place, so that de-serialization is unambiguous.

40.2.3.1 Named Reference Variables

A named reference variable is the only attribute of the corresponding


sub-element of values that is displayed without textual content. An
attribute of a reference variable has the name href and the content
"#key", where key is the unique key of an object in the element heap. An
element of an initial reference does not have a href attribute or any other
content. During serialization, the ABAP runtime environment sets the key
key; any key is possible for de-serialization.

40.2.3.2 Anonymous Data Objects

An anonymous data object that is a sub-element of heap is displayed as


follows:

<asx:heap xmlns:nspace ...>


<type id = "key" attr="...">...</type>
</asx:heap>

The value of a sub-element of this kind is displayed in the asXML display


for named data objects (see Table 40.2) or for named reference variables
(see Section 40.2.3.1). If the anonymous data object itself is a non-initial

Canonical XML Representation 983


reference variable, it references a further element of heap according to
the rules above. The element name type is the data type of the data
object (or the dynamic type of the reference variables) specified as the
XML schema type name from the name range nspace (see Table 40.3).
Attributes attr may define technical characteristics of the type. The man-
datory attribute attri contains the unique key key of the element, which
is used to reference it from the display of the corresponding reference
variables in values or heap.

The XML schema type name is constructed according to the following


hierarchy:

1. If the data type of the data object is defined in the ABAP Dictionary, the
XML schema type name is the name of the data type from the ABAP
Dictionary in the corresponding name range (see Table 40.3).
2. If the data type is an elementary ABAP type, the XML schema type
name is specified in Table 40.4.
3. If the data type is defined as a component of a global or local class or
interface, the XML schema type name comprises the name of the class
or interface and the name of the data type separated by a period (.).
The corresponding name range (see Table 40.3) indicates whether the
data type is a component of a global or local class or of an interface.
4. If the data type is a generic reference type defined with REF TO data or
REF TO object, the XML schema type name is refData or refObject.
Both of these have the name range http://www.sap.com/abapxml/
types/built-in.
5. Otherwise, the XML schema type name is the name of a data type
defined with TYPES and the corresponding name range (see Table 40.3)
indicates where the data type is defined.

Before an XML schema type name can be constructed, the data type of
the data object must have a name that can be used statically. If the data
type only exists as a property of a data object and therefore only has a
technical name (compare Section 6.1.4), a treatable exception takes place
during serialization.

Table 40.3 indicates the name ranges for the XML schema type names;
types in the first column stand for http://www.sap.com/abapxml/
types. The name ranges indicate where a data type is defined. Characters
other than "a" to "z," "A" to "Z," "0" to "9," "_" or "-" are displayed as
"!hex(c)" in the names prg, cpool, fpool, tpool, meth, func, form and

984 ABAP and XML


class, where hex(c) is the two-character hexadecimal display of the
ASCII code for the character "c".

Name range Location of definition

types/dictionary ABAP Dictionary

types/program/prg ABAP program prg

types/class-pool/cpool Class pool cpool

types/type-pool/tpool Type group tpool

types/function-pool/fpool Function group fpool

types/function/func Function module func

types/program.form/prg/frm Subroutine frm in program prg

types/function-pool.form/fpool/frm Subroutine frm in function group fpool

types/method/class/meth Method meth of a global class class

types/program.method/prg/class/meth Method meth of a local class class in


program prg

types/class-pool.method/cpool/class/ Method meth of a local class class in a


meth class pool cpool

types/function-pool.method/fpool/ Method meth of a local class class in


class/meth function group fpool

Table 40.3 Name ranges for XML schema type names, whereby types in the first col-
umn stands for http://www.sap.com/abapxml/types

The following table lists the XML schema type names for elementary
ABAP types. These are slightly different from the canonical XML schema
data types from Table 40.2, since the data type of anonymous data
objects must be specified in full. The name ranges nspace for the elemen-
tary ABAP types for anonymous data objects are either xsd="http://
www.w3.org/2001/XMLSchema" for general schema types or abap=
"http://www.sap.com/abapxml/types/built-in" for special ABAP
schema types for which some technical attributes must be specified.

ABAP type XML schema type name Attributes

c abap:string maxLength

d abap:date –

f xsd:double –

Table 40.4 XML Schema Type Names for Elementary ABAP Types

Canonical XML Representation 985


ABAP type XML schema type name Attributes

i, b, s xsd:int, xsd:unsigned Byte, –


xsd:short

n abap:digits maxLength

p abap:decimal totalDigits, fractionDigits

string xsd:string –

t abap:time –

x abap:base64Binary maxLength

xstring xsd:base64Binary –

Table 40.4 XML Schema Type Names for Elementary ABAP Types (cont.)

The attribute maxLength defines the length for ABAP types with a generic
length. The XML schema type abap:digits restricts the value range for
an element to digits. The XML schema type abap:decimal specifies the
length and fractional portions via the attributes totalDigits and frac-
tionDigits. The length specification totalDigits defines the number of
places between 1 and 31. In ABAP programs, the length of data objects of
the type p is specified in bytes and the number of decimal places is calcu-
lated from 2×len-1 (see Table 5.2). This means that the value of total-
Digits is always odd in serialization. During de-serialization, an even
value of totalDigits is implicitly increased by one.

Instances of Classes

The instance of a class (object) as a sub-element of heap is displayed as


follows:

<asx:heap xmlns:nspace ...>


<class id = "key">
<part classVersion = "...">
<name>...</name>
</part>
...
</class>
</asx:heap>

The element name class is the XML schema type name of the class for
the object (or the dynamic type of the reference variables) from the name
range nspace (see Table 40.5) in block capitals. The mandatory attribute
id contains the unique key key of the element, which is used to reference
it when the corresponding reference variables are displayed in values.

986 ABAP and XML


The sub-elements <part>...</part> contain the values of the instance
attributes for individual object parts as sub-elements <name>...</name>.
The individual object parts are defined by the classes in the current inher-
itance hierarchy that can be serialized (see below).

The name range for the class name indicates where the class is defined.
Table 40.5 lists the possible name ranges; classes in the first column
stands for http://www.sap.com/apapxml/classes. The substitution rule
for the name ranges in Table 40.3 also applies to the names prg, cpool
and fpool.

Name range Location of definition

classes/global Class library

classes/program/prg Program prg

classes/class-pool/cpool Class pool cpool

classes/function-pool/fpool Function group fpool

Table 40.5 Name ranges for class names, whereby classes in the first column stands
for http://www.sap.com/abapxml/classes

The values of the values of a class instance that can be serialized (instance
attributes or output parameters for a special method, see below) are dis-
played as the content or as an attribute of <name>...</name> in the
asXML display for named data objects (see Table 40.2) or for reference
variables, wherein name is the name of an instance attribute or an output
parameter in block capitals. If the object is an interface attribute, the
name is preceded by the name of the interface separated by a period (.)
in order to distinguish it from another class attribute of the same name.
The substitution rules from Table 40.1 apply for the names.

The values of a class instance that can be serialized are defined by imple-
menting the system interface IF_SERIALIZABLE_OBJECT in the class (see
Section B.2). If the class does not implement the interface IF_
SERIALIZABLE_OBJECT, the element class does not contain any sub-ele-
ments. All the instance attributes of a class in which the interface IF_
SERIALIZABLE_OBJECT is implemented are serialized and de-serialized to
the interface by default. You can change this behavior by declaring special
utility methods (see below). Static attributes are neither taken into
account during serialization nor during de-serialization (with the excep-
tion of the special constant SERIALIZABLE_CLASS_VERSION, see below).

Canonical XML Representation 987


Standard Behavior

If the class implements the interface IF_SERIALIZABLE_OBJECT, the ele-


ment <class>...</class> contains at least one subelement
<part>...</part>. These sub-elements correspond to individual object
parts that can be serialized and contain the presentations of the instance
attributes for the corresponding object part in an asXML format. An
object part is defined by the class in which instance attributes are
declared or in which an interface containing instance attributes is inte-
grated. A object class that can be serialized contains an object part for
itself as well as object parts for all superclasses in the current path in the
inheritance tree, up to and including the class that implements the inter-
face IF_SERIALIZABLE_OBJECT. The name part is the name of the class in
question. If it is a local class, its name is preceded by the prefix local sep-
arated by a period (.) to distinguish it from a global class of the same
name. Object parts of superclasses in which the interface IF_
SERIALIZABLE_OBJECT is not implemented cannot be serialized and do
not have a corresponding sub-object part. This means that a class in
which the interface IF_SERIALIZABLE_OBJECT is not implemented (nei-
ther in the class itself nor in a superclass) creates a blank XML element
class during serialization.

During serialization, the XML elements part of the object parts are cre-
ated from the superclasses to the subclasses and the XML elements of the
instance attributes are created as standard in the order in which they are
declared in the class.

De-serialization creates an object in the corresponding class but the


instance constructor is not executed. All instance attributes have their ini-
tial values or the start values specified with the VALUE addition for the
DATA statement after the object creation. The values of the corresponding
XML elements are entered in the instance attributes by default; the order
of the object parts and attributes is irrelevant. Instance attributes without
a corresponding XML element retain their value. Excess XML elements
are ignored if they do not belong to a name range; otherwise, they create
a treatable exception. When an element without part sub-elements is
de-serialized, the system does not create an object but initializes the tar-
get reference variable.

If a class implements the interface IF_SERIALIZABLE_OBJECT, you can


declare the private constant SERIALIZABLE_CLASS_VERSION of the type
i in each object part; that is, each class involved in the inheritance tree.
During serialization, the value of the constant is assigned to the attribute

988 ABAP and XML


classVersion of the XML element part. A treatable exception is created
during de-serialization by default if the value of the attribute does not
match the value of the constant in the class specified. An object can only
be de-serialized if the values match or if there is neither an attribute nor
a constant. You can change this system behavior by declaring special util-
ity methods.

Modified Behavior

By default, all the instance attributes for an object part are serialized as
standard regardless of their visibility, and the version of the class is
checked. To change this behavior, you can declare and implement the
instance methods SERIALIZE_HELPER and DESERIALIZE_HELPER in the
relevant class for each object part. These methods can only be declared as
private instance methods in classes that implement the interface IF_
SERIALIZABLE_OBJECT. If you declare one of the methods, you must also
declare the other and the interface must be defined as follows for the
syntax check:

왘 The method SERIALIZE_HELPER can only have output parameters, and


the method DESERIALIZE_HELPER can only have input parameters
with non-generic typing.
왘 There must be an input parameter of the method DESERIALIZE_
HELPER with the same name for each output parameter of the method
SERIALIZE_HELPER with the same typing. Additional input parameters
for the method DESERIALIZE_HELPER must be optional.
왘 The method SERIALIZE_HELPER must not have an output parameter
with the name SERIALIZABLE_CLASS_VERSION, and the method
DESERIALIZE_HELPER can have an optional input parameter of this
name that is of type i. This parameter is supplied with the value of the
attribute classVersion of the element part during de-serialization,
and the standard check on the version (see above) is skipped.

If the methods SERIALIZE_HELPER and DESERIALIZE_HELPER are


declared in an object part, the instance attributes of the object part are
not serialized and de-serialized. Instead, the method SERIALIZE_HELPER
is executed during serialization and the values of all the output parame-
ters are written in the asXML format as sub-elements to the correspond-
ing element part in the specified order. Here, the name of a sub-element
is the name of the corresponding output parameter in block capitals. The
method DESERIALIZE_HELPER is called during de-serialization and the
values of the sub-elements for the corresponding element part are trans-

Canonical XML Representation 989


ferred to the input parameters of the method with the same names. The
order in which they appear is irrelevant and excess XML elements are
ignored.

40.3 Simple Transformations


Simple Transformations (ST) is an SAP programming language for describ-
ing transformations between ABAP data and XML formats. ST is restricted
to the two modes of serialization (ABAP to XML) and de-serialization
(XML to ABAP) of ABAP data, which are most important for data integra-
tion. Like in the more general XSLT, transformations from ABAP to ABAP
and XML to XML are not possible in ST.

In comparison with XSLT, the main advantages of ST programs are as fol-


lows:

왘 ST programs are declarative and thus easier to read.

왘 ST programs only have serial access to the XML data and are therefore
very efficient even with large data volumes.
왘 ST programs describe serialization and de-serialization simultaneously;
that is, ABAP data serialized in XML with ST can also be de-serialized
with the same ST program.

Simple Transformations that can be called using CALL TRANSFORMATION


must be in the repository. In the Object Navigator of the ABAP Work-
bench, you can create and edit ST programs by choosing Edit Object •
More • Transformation followed by Simple Transformation.

A detailed description of the language ST goes beyond the scope of this


ABAP reference. For more information, please turn to the corresponding
online help. You can find an introductory example in Section 40.6.

40.4 Calling an XSL or ST Transformation

CALL TRANSFORMATION

Calling an XSLT or ST program.

Syntax

CALL TRANSFORMATION transformation


[PARAMETERS parameters]
[OBJECTS objects]

990 ABAP and XML


[OPTIONS options]
SOURCE source
RESULT result.

This statement calls the specified XSL transformation (XSLT) or a simple


transformation (ST, as of Release 6.40). The source of the transformation
is specified after SOURCE, and the result is stored as specified after RESULT.
Use PARAMETERS and OBJECTS to pass parameters to the transformation.
Possible transformation types are:

왘 From XML to XML (only for XSLT)

왘 From XML to ABAP (for XSLT and ST)

왘 From ABAP to XML (for XSLT and ST)

왘 From ABAP to ABAP (only for XSLT)

The last two types are available only as of Release 6.20.

Treatable Exceptions

The common superclass of all exception classes for CALL TRANSFORMA-


TION is CX_TRANSFORMATION_ERROR (as of Release 6.40). The corre-
sponding runtime errors cannot be caught.

Exceptions with XSL-Transformations

All exception classes for XSL transformations are subclasses of CX_XSLT_


EXCEPTION.

If an error occurs when passing an XML document or if another error is


reported by the XSLT processor, an exception defined by the class CX_
XSLT_RUNTIME_ERROR is triggered. If the calling of an ABAP method
from the XSLT program leads to an error, an exception defined by the
class CX_XSLT_CALL_ERROR is triggered, whereby the attribute PREVI-
OUS points to the exception object of the original error.

If an XML document does not have the asXML format during the de-seri-
alization, an exception defined by the class CX_XSLT_FORMAT_ERROR is
triggered, where the attribute TREE_POSITION contains the error posi-
tion. If, during serialization or de-serialization, invalid values or data types
occur, exceptions defined by the classes CX_XSLT_SERIALIZATION_
ERROR or CX_XSLT_DESERIALIZATION_ERROR are triggered, where the
attribute PREVIOUS (if required) points to the exception object of the
original error. The attribute TREE_POSITION contains the error position
during de-serialization.

Calling an XSL or ST Transformation 991


Exceptions with Simple Transformations
All exception classes for simple transformations are subclasses of CX_ST_
ERROR.

40.4.1 Specifying the Transformation


Syntax of transformation

... trans | (name) ...

The name of the transformation can be specified either directly as trans


or as a content of a character-type data object name in brackets. The spec-
ified transformation must exist as a XSLT program or as a simple transfor-
mation in the repository.

40.4.2 Transformation Source


Syntax of source

... { XML sxml }


| {{bn1 = e1 bn2 = e2 ...}|(stab)} ...

40.4.2.1 Transformation of an XML Document

When you specify XML sxml, the XML document contained in xsml is
transformed in such a way that sxml can have one of the following forms:

왘 Data object of type string and xstring or as a standard table with flat
character-type row type
왘 Interface reference variable of type IF_IXML_ISTREAM which points to
an iXML input stream (only for XSLT)
왘 Interface reference variable of type IF_IXML_NODE which points to an
iXML nodeset (only for XSLT)
왘 Class reference variable of type CL_FX_READER, which points to an
XML reader (only for ST)

Note
The interfaces IF_IXML_ISTREAM and IF_IXML_NODE are components of
the "Stream" and "DOM" packages of the iXML Library delivered by SAP.

992 ABAP and XML


40.4.2.2 Transformation of ABAP Data

Use bn1 = e1, bn2 = e2, ... or (stab) to specify the ABAP data e1, e2, ... to
be transformed.

왘 When calling an XSLT program, the ABAP data are serialized into the
canonical XML representation, which is then used as source of the XSL
transformation. Use bn1, bn2, ... to specify the names of the XML ele-
ments meant to represent the ABAP data objects in the canonical XML
presentation.
왘 When calling a simple transformation, the names bn1, bn2, ... are used
in the transformation to access the ABAP data in a written way.

Instead of using a static parameter list, you also can pass the data objects
dynamically as value pairs in the columns of an internal table stab which
has the type ABAP_TRANS_SRCBIND_TAB from the ABAP type group.

The following data objects cannot be serialized and trigger a treatable


exception:

왘 Data objects of type n, whose current content does not exclusively


consist of numbers.
왘 Data objects of type p, whose current content does not represent a
valid packed number.
왘 Data objects of type d and t, whose current content contains leading
or trailing blanks and at the same time uses the separators ("-" or ":")
according to ISO-8601 for the presentation.
왘 Data reference variables pointing to data objects, whose data type has
only a technical name (see Section 40.2.3).

Data reference variables pointing to data objects that were not created
with CREATE DATA are treated as initial reference variables during the seri-
alization.

40.4.3 Result of a Transformation


Syntax of result

... { XML rxml }


| {{bn1 = f1 bn2 = f2 ...}|(rtab)} ...

Calling an XSL or ST Transformation 993


40.4.3.1 Transformation into an XML Document

When you specify XML rxml, a transformation into an XML is executed;


the document is then placed into rxml, where rxml can be one of the fol-
lowing:

왘 A data object of type string and xstring or a standard table with a


flat, character-type row type.
왘 An interface reference variable of type IF_IXML_OSTREAM which
points to an IXML output stream (only for XSLT).
왘 An interface reference variable of type IF_IXML_DOCUMENT which
points to an IXML document (only for XSLT),
왘 A class reference variable of type CL_FX_WRITER, which points to an
XML writer (only for ST).

Notes
왘 The interfaces IF_IXML_OSTREAM and IF_IXML_DOCUMENT are
components of the "Stream" and "DOM" packages of the iXML Library
delivered by SAP.
왘 If you use the data type xstring for rxml, then the result is stored in
the UTF-8 character representation. This is helpful, if the resulting
XML-document is to be stored in a file (see Chapter 32).

40.4.3.2 Transformation into ABAP Data

Use bn1 = f1, bn2 = f2, ... or (rtab) to specify the ABAP target fields f1,
f2, ... into which you want the XML data to be transformed.

왘 When calling an XSLT program, the result of the XSL transformation


into ABAP data objects is de-serialized, provided that it is a canonical
XML representation. You should use bn1, bn2, ... to specify the names
of the XML elements that represent the ABAP data objects in the ca-
nonical XML representation, and use f1, f2, ... to specify the ABAP data
objects of the appropriate data type into which you want to de-serial-
ize them.
왘 When calling a simple transformation, in the transformation, the
names bn1, bn2, ... are used for write access to the ABAP data.

Instead of using a static parameter list, the data objects can also be passed
dynamically as value pairs in the columns of the internal table rtab,
which has the type ABAP_TRANS_RESBIND_TAB of the ABAP type
group.

994 ABAP and XML


An XML element must be convertible into the respective ABAP data
objects, where instead of the usual conversion rules (see Appendix A) the
following restrictions apply:

왘 De-serialization into too short data objects of data types c or n must


never lead to a loss of data, except when for data type c only leading
and trailing blanks are concerned and for data type n only leading ze-
ros.
왘 Data must never be lost due to the de-serialization into a data object
of data type p with too few decimal places.
왘 Data must never be lost due to the de-serialization into a too short data
object of data type x.
왘 Structures cannot be converted into elementary data objects.

If an XML element cannot be converted into the ABAP data object, a


treatable exception is triggered.

When de-serializing into a reference variable, this variable must be the


same as or more general than the dynamic type of the object stored in the
XML document. The allocated ABAP objects or instances of a class are
created during the de-serialization.

40.4.4 Parameters for an XSL Transformation


Syntax of parameters

... {p1 = e1 p2 = e2 ...}|(ptab) ...

Use this addition to pass ABAP data objects e1, e2, ... as parameters p1,
p2, ... to an XSL transformation. In Release 6.10, the data objects e1, e2,
... must be character-type, as of Release 6.20 all elementary data objects
and object references are allowed.

Instead of using a static parameter list, you also can pass the parameters
dynamically as value pairs in the columns of the internal table ptab which
has the type ABAP_TRANS_PARMBIND_TAB from the ABAP type group.

The specified parameters must be defined in the XSL transformation as


input parameters as follows:

<xsl:param name="..." type="..."/>

For the attribute name, enter the parameter name in uppercase. For the
optional attribute type, specify one of the type indicators string, num-

Calling an XSL or ST Transformation 995


ber, boolean, xstring, nodeset or object(...), where you must enter
the name of a global ABAP class in the brackets after object.

If no type is specified in the XSL transformation, the data types of ele-


mentary parameters are mapped to XSL types according to Table 40.6.

ABAP Data Type XSL Parameter Type

c, d, n, string string

i, s, b, f, p number

x, xstring string, where the content is presented to the base of 64

Table 40.6 Mapping of ABAP Data Types on XSL Parameter Types

If during the XSL transformation the XSL types shown in Table 40.6 are
specified explicitly, you must enter the matching elementary ABAP
parameters which can be converted into the XSL type:

왘 The XSL type boolean expects ABAP parameters of the type c with the
length 1. A space is interpreted as "false" and a different character is in-
terpreted as "true."
왘 The XSL type xstring expects ABAP parameters of the type x or
xstring and the display of the content is hexadecimal.
왘 The XSL types nodeset and object expect an object reference variable
pointing to a class instance. The type nodeset expects appropriate ob-
ject properties.

If a parameter does not match the XSL type, an untreatable exception is


triggered. If a parameter defined in the XSL transformation is not passed,
it is set to the default value in the transformation. A specified parameter
that is not defined in the XSL transformation is ignored.

Note
The XSL types string, number, boolean and nodeset are XSL standard
types, whereas xstring and object are special SAP extensions. The type
xstring allows a hexadecimal display of byte chains instead of the pre-
sentation to the base of 64. The type object enables you to call ABAP
methods from the XSL program.

40.4.5 Passing External Objects to an XSL Transformation


Syntax of objects

... {o1 = e1 o2 = e2 ... }|(otab) ...

996 ABAP and XML


You can use this addition to pass object references e1, e2, ... as external
objects o1, o2, ... to an XSL transformation where you can call their meth-
ods.

Instead of using a static parameter list, you can also pass the objects
dynamically as value pairs in the columns of the internal table otab which
has the type ABAP_TRANS_OBJBIND_TAB from the ABAP type group.

Note
As of Release 6.20, the addition OBJECTS is obsolete and external objects
are treated as parameters. Therefore, object references should be passed
with the addition PARAMETERS (see Section 40.4.4).

40.4.6 Controlling the Transformation


Syntax of options

... a1 = e1 a2 = e2 ...

You can use this addition to specify the values e1, e2, ... for additional
control options a1, a2, ... of the transformation. The values e1, e2, ... must
be of the type c or string.

For a1, a2, ... you can specify the following values:

왘 XML_HEADER to control the output of the XML header in case of a trans-


formation to XML and in case of storage in a data object of the type c,
string or in an internal table.

Possible values Meaning

no No output of an XML header

without_encoding Output of an XML header without specification of the


encodings

full Default setting, output of an XML header with specifica-


tion of the encoding

왘 DATA_REFS to control the output of data references in case of a trans-


formation from ABAP to XML.

Possible values Meaning

no Default for ST, no output of data references

Calling an XSL or ST Transformation 997


Possible values Meaning

heap Default for XSLT and only possible there; output of refer-
enced data as sub-elements of the asXML elements
<asx:heap>.

embedded Output of referenced data with the reference

왘 INITIAL_COMPONENTS to control the output of initial structure compo-


nents in case of a transformation from ABAP to XML.

Possible values Meaning

include Default setting, output of initial components of structures

suppress No output of initial components of structures

40.5 Example of an XSL Transformation


This example shows the serialization of data objects in a string xmlstr
using the identical transformation ID. A date field date, a time field time,
and a data reference variable dref1 are serialized. The data reference vari-
able points to an anonymous object reference variable, which in turn
points to an object of the class c2. Objects serialized in this way can be
stored persistently, for example in a data cluster. After the objects are
imported from where they are stored, they are de-serialized into further
data objects. Following de-serialization, dref2 points to another anony-
mous reference variable, such as dref1. This anonymous data object and
the instance of the class c2 to which it points are generated during the
de-serialization.

PROGRAM xmltst.

CLASS c1 DEFINITION.
PUBLIC SECTION.
INTERFACES if_serializable_object.
PROTECTED SECTION.
DATA carriers TYPE TABLE OF scarr.
ENDCLASS.

CLASS c2 DEFINITION INHERITING FROM c1.


PUBLIC SECTION.
METHODS constructor.
PRIVATE SECTION.
DATA lines TYPE i.
METHODS: serialize_helper

998 ABAP and XML


EXPORTING count TYPE i,
deserialize_helper
IMPORTING count TYPE i.
ENDCLASS.

CLASS c2 IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
SELECT * UP TO 2 ROWS
FROM scarr
INTO TABLE carriers.
ENDMETHOD.
METHOD serialize_helper.
count = LINES( carriers ).
ENDMETHOD.
METHOD deserialize_helper.
lines = count.
ENDMETHOD.
ENDCLASS.

DATA: oref TYPE REF TO object,


dref1 LIKE REF TO oref,
xmlstr TYPE string,
date TYPE d,
time TYPE t,
dref2 LIKE dref1.

...

CREATE DATA dref1 LIKE oref.


CREATE OBJECT dref1->* TYPE c2.

CALL TRANSFORMATION id
SOURCE xmldat = sy-datum
xmltim = sy-uzeit
ref = dref1
RESULT XML xmlstr.

EXPORT obj = xmlstr TO DATABASE indx(hk)


ID 'OBJECT'.

...

IMPORT obj = xmlstr FROM DATABASE indx(hk) ID 'OBJECT'.

CALL TRANSFORMATION id
SOURCE XML xmlstr
RESULT xmldat = date

Example of an XSL Transformation 999


xmltim = time
ref = dref2.

The XML document generated in the serialization has the content


described below. In this description, line breaks and indents have been
added. The element values contains the asXML representations of the
three transferred data objects (see Section 40.2). In the names X-MLDAT
and X-MLTIM, "xml" has been replaced according to Table 40.1. The
attribute href of the element REF uses the key "d1" to refer to the repre-
sentation of the corresponding anonymous data object in the element
heap. This uses the key "o3" to refer to the representation of the instance
of the class c2, which is also in the element heap. This representation is
divided into the object parts for the classes c1 and c2. The object part for
c1 contains the representation of the double-line structured internal
table carriers. The object part for c2 contains the representation for the
output parameter count of the method SERIALIZE_HELPER.

<?xml version="1.0" encoding="iso-8859–1" ?>


<asx:abap xmlns:asx="http://www.sap.com/
abapxml" version="1.0">
<asx:values>
<X-MLDAT>2003–04–15</X-MLDAT>
<X-MLTIM>14:57:53</X-MLTIM>
<REF href="#d1" />
</asx:values>
<asx:heap
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:abap="http://www.sap.com/abapxml/types/built-in"
xmlns:cls="http://www.sap.com/abapxml/classes/global"
xmlns:dic="http://www.sap.com/abapxml/types/dictionary">
<abap:refObject href="#o3" id="d1" />
<prg:C2
xmlns:prg=http://www.sap.com/abapxml/classes/program/
XMLTST id="o3">
<local.C1>
<CARRIERS>
<SCARR>
<MANDT>000</MANDT>
<CARRID>AA</CARRID>
<CARRNAME>American Airlines</CARRNAME>
<CURRCODE>USD</CURRCODE>
<URL>http://www.aa.com</URL>
</SCARR>
<SCARR>

1000 ABAP and XML


<MANDT>000</MANDT>
<CARRID>AB</CARRID>
<CARRNAME>Air Berlin</CARRNAME>
<CURRCODE>DEM</CURRCODE>
<URL>http://www.airberlin.de</URL>
</SCARR>
</CARRIERS>
</local.C1>
<local.C2>
<COUNT>2</COUNT>
</local.C2>
</prg:C2>
</asx:heap>
</asx:abap>

40.6 Simple Transformation Example


Serialization of a nested structure. In the following ABAP program sec-
tion, a nested structure struc1 is serialized to xml_string with the Sim-
ple Transformation ST_TRAFO and de-serialized with the same transfor-
mation.

DATA: BEGIN OF struc1,


col1(10) TYPE c VALUE 'ABCDEFGHIJ',
col2 TYPE i VALUE 111,
BEGIN OF struc2,
col1 TYPE d VALUE '20040126',
col2 TYPE t VALUE '084000',
END OF struc2,
END OF struc1.

DATA: xml_string TYPE string,


result LIKE struc1.

TRY.

CALL TRANSFORMATION st_trafo


SOURCE para = struc1
RESULT XML xml_string.

...

CALL TRANSFORMATION st_trafo


SOURCE XML xml_string
RESULT para = result.

CATCH cx_st_error.

Simple Transformation Example 1001


...

ENDTRY.

The Simple Transformation ST_TRAFO has the following form:

<?sap.transform simple?>
<tt:transform template="temp"
xmlns:tt="http://www.sap.com/transformation-templates"
version="0.1">

<tt:root name="PARA"/>

<tt:template name="temp">
<X>
<X1>
<tt:value ref="PARA.COL1" />
</X1>
<X2>
<tt:value ref="PARA.COL2" />
</X2>
<X3>
<X1>
<tt:value ref="PARA.STRUC2.COL1" />
</X1>
<X2>
<tt:value ref="PARA.STRUC2.COL2" />
</X2>
</X3>
</X>
</tt:template>

</tt:transform>

The transformation consists of a template temp that defines the structure


of the XML document and establishes relationships between value nodes
and components of the structure. The result of the transformation is as
follows (line breaks and indentations were inserted for clarification pur-
poses):

<X>
<X1>ABCDEFGHIJ</X1>
<X2>111</X2>
<X3>
<X1>2004–01–26</X1>
<X2>08:40:00</X2>

1002 ABAP and XML


</X3>
</X>

The conversion of the elementary data types is the same as for asXML
(see Table 40.2). The reverse transformation generates the same content
in the structure result as in struc1.

Simple Transformation Example 1003


Index
#EC, pseudo comment 49 =, <>, <, >, <=, >=
&, literal operator 117 relational operators 36
', text field literal 117 WHERE 767
(, ) =>, class component selector 39
arithmetic expression 395 ->*, dereferencing operator 374
bit expression 400 ->, object component selector 38
CALL METHOD 263 ><, =<, =>, relational operators, obsolete
logical expression 329 1031
offset/length specification 45 ?=, MOVE 362
SELECT INTO 762 ?TO, MOVE 362
* [], table body 44
comment 49 `, string literal 118
SELECT 749 ~, interface component selector 40
TABLES, obsolete 1020
WRITE 653 A
**, WRITE 653 ABBREVIATED
*-INPUT, FIELD 544 SEARCH 415
+, -, *, /, **, arithmetic operators 395 SEARCH – internal table 482
+, -, prefixes 394 abs, predefined function 109
, ABSTRACT
chained statement 48 CLASS 158
SELECT INTO 762 METHODS 175
WHERE IN 769 ABSTRACT METHODS, INTERFACES 192
-, structure component selector 37 ACCEPT, COMMUNICATION 1080
., statement 35 ACCEPTING DUPLICATE KEYS, INSERT 789
/ ACCEPTING PADDING, IMPORT 832
namespace prefix 47 ACCEPTING TRUNCATION, IMPORT 833
SELECTION-SCREEN COMMENT 590 ACCORDING, ADD, obsolete 1036
SELECTION-SCREEN PUSHBUTTON 592 ACCP, data type 98
SELECTION-SCREEN ULINE 589 acos, predefined function 110
ULINE 673 ACTIVATION, SET HANDLER 293
WRITE 653 ACTUAL LENGTH, READ DATASET 868
:, chained statement 48 ADD
= statement 401
CALL FUNCTION 276 statement, obsolete 1036
CALL METHOD 264 ADD-CORRESPONDING, statement,
COMPUTE 393 obsolete 1038
conjunction operator 36 ADJACENT DUPLICATES, DELETE 475
EXPORT 818 AFTER INPUT, PROCESS 536
FORMAT 674 ALIASES, statement 195
IMPORT 825 ALL FIELDS
MOVE 362 DELETE 475
UPDATE 792 READ TABLE 442
WRITE 667 ALL INSTANCES, SET HANDLER 292

Index 1197
ALL METHODS ABSTRACT, INTERFACES READ TABLE 444
192 AT
ALL METHODS FINAL, INTERFACES 192 extract 495
ALL OCCURRENCES, REPLACE 418 internal table 451
ALL, subquery 775 TRUNCATE DATASET 877
ALLOCATE, COMMUNICATION 1080 ULINE 673
AND WRITE 653
Boolean operator 328 AT LINE-SELECTION, statement 85
WHERE 772 AT PF, statement, obsolete 1018
any table, generic data type 97 AT SELECTION-SCREEN, statement 77
ANY TABLE, TYPES 128 AT USER-COMMAND, statement 86
any, generic data type 97 atan, predefined function 110
ANY, subquery 775 ATTRIBUTES
APPEND, statement 461 GET DATASET 870
APPENDING SET DATASET 874
FETCH 783 AUTHORITY-CHECK, statement 890
OPEN DATASET 849 AVG, SELECT 750
SELECT INTO 763
ARCHIVE MODE, print parameter, obsolete B
1071 b, data type 93
ARCHIVE PARAMETERS BACK, statement 685
NEW-PAGE 694 BACKGROUND TASK, CALL FUNCTION
SUBMIT 244 973
AREA HANDLE, CREATE OBJECT 224 BACKUP INTO, EDITOR-CALL, obsolete
AREA, GET CURSOR 570 1086
AS BACKWARD, SCROLL LIST 709
INCLUDE STRUCTURE 145 BEFORE OUTPUT, PROCESS 536
INCLUDE TYPE 145 BEGIN OF
SELECT 749 CLASS-DATA 141
SELECT FROM 754 CONSTANTS 142
ASCENDING DATA 137
SELECT 780 DATA, obsolete 1022
SORT – extract 492 SELECTION-SCREEN 584
SORT – internal table 476 STATICS 144
SORT BY – extract 493 TYPES 126
SORT BY – internal table 478 BETWEEN
asin, predefined function 110 DESCRIBE DISTANCE 508
ASSERT, statement 927 logical expression 320
ASSIGN LOCAL COPY OF, statement, PROVIDE 484
obsolete 1026 PROVIDE, obsolete 1054
ASSIGN, statement 369 WHERE 768
ASSIGNED, logical expression 321 BIG ENDIAN, OPEN DATASET 852
ASSIGNING BINARY MODE, OPEN DATASET 850
APPEND 465 BINARY SEARCH, READ TABLE 439
COLLECT 461 BIT-AND, -NOT, -OR, -XOR, bit operators
INSERT 459 399
LOOP AT 448 BLOCK
MODIFY 469 AT SELECTION-SCREEN 79

1198 Index
SELECTION-SCREEN 596 CENTERED, WRITE 656
BLOCKS CHAIN, dynpro statement 547
SELECTION-SCREEN EXCLUDE 606 CHAIN-INPUT
SELECTION-SCREEN INCLUDE 605 FIELD MODULE 543
BOUND, logical expression 321 MODULE 540
BOUNDS, PROVIDE 484 CHAIN-REQUEST
BREAK-POINT, statement 929 FIELD MODULE 543
BYPASSING BUFFER, SELECT 760 MODULE 540
BYTE MODE, byte string processing 406 CHANGING
BYTE-CA, -CN, -CO, -CS, -NA, -NS, rela- CALL FUNCTION 276
tional operators 318 CALL FUNCTION DESTINATION 967
CALL METHOD 265
C CLASS-METHODS 185
c FORM 66
data type 93 METHODS 170
generic data type 97 PERFORM 288
CA, comparison operator 316 RECEIVE RESULTS 972
CALL CUSTOMER-FUNCTION, statement CHAR, data type 98
282 CHARACTER MODE, character-string
CALL DIALOG, statement, obsolete 1028 processing 406
CALL FUNCTION ... DESTINATION, charlen, predefined function 111
statement 966 CHAR-TO-HEX MODE, IMPORT 836
CALL FUNCTION ... IN UPDATE TASK, CHECK
statement 283 loop 307
CALL FUNCTION ... STARTING NEW TASK, processing block 303
statement 968 CHECKBOX
CALL FUNCTION … IN BACKGROUND PARAMETERS 616
TASK, statement 973 WRITE 668
CALL FUNCTION, statement 274 CIRCULAR, SHIFT 423
CALL METHOD OF, OLE, statement 1007 CLASS, statement 154
CALL METHOD, statement 262 class_constructor, static constructor 186
CALL SCREEN, statement 557 CLASS-DATA, statement 141
CALL SELECTION-SCREEN, statement 639 CLASS-EVENTS, statement 191
CALL SUBSCREEN, dynpro statement 554 CLASS-METHODS, statement 184
CALL TRANSACTION, statement 248 CLASS-POOL, statement 59
CALL TRANSFORMATION, statement 990 CLEANUP, statement 350
CALLING, CALL FUNCTION STARTING CLEAR, statement 387
NEW TASK 970 CLIENT
CASE DELETE 841
FIND 411 EXPORT 821
REPLACE 419 IMPORT 828
statement 333 IMPORT DIRECTORY 839
TRANSLATE 430 CLIENT SPECIFIED
CASTING, ASSIGN 377 DELETE 800
CATCH SYSTEM-EXCEPTIONS, statement INSERT 787
354 MODIFY 797
CATCH, statement 350 SELECT 760
ceil, predefined function 109 UPDATE 791

Index 1199
clike, generic data type 97 CONVERT DATE
CLNT, data type 98 statement 921
CLOSE CURSOR, statement 784 statement, obsolete 1048
CLOSE DATASET, statement 878 CONVERT TEXT, statement 427
CLOSE, EXEC SQL 809 CONVERT TIME STAMP, statement 919
CN, comparison operator 316 COPIES, print parameter, obsolete 1071
cnt, AT 497 CORRESPONDING FIELDS, SELECT 761
CO, comparison operator 316 cos, predefined function 110
CODE PAGE cosh, predefined function 110
OPEN DATASET 852 count(*), SELECT 751
TRANSLATE, obsolete 1045 COUNT, SELECT 751
CODEPAGE INTO, IMPORT 836 COUNTRY
COL_..., FORMAT 675 GET LOCALE 910
COLLECT, statement 459 SET LOCALE 905
COLOR COVER PAGE, print parameter, obsolete
FORMAT 675 1071
PRINT-CONTROL 700 COVER TEXT, print parameter, obsolete
WRITE 667 1071
COLUMN CP, comparison operator 317
SCROLL LIST 709 CPI, PRINT-CONTROL 700
SET LEFT SCROLL-BOUNDARY 687 CREATE DATA, statement 209
COMMENT CREATE OBJECT
SELECTION-SCREEN 590 OLE, statement 1006
SELECTION-SCREEN INCLUDE 603 statement 219
COMMIT WORK, statement 884 CREATE PRIVATE, CLASS 159
COMMON PART, DATA 1018 CREATE PROTECTED, CLASS 159
COMMUNICATION, statement, obsolete CREATE PUBLIC, CLASS 159
1078 CS, comparison operator 317
COMPARING csequence, generic data type 97
DELETE 475 CUKY, data type 99
READ TABLE 442 CURR, data type 99
COMPONENT, ASSIGN 375 CURRENCY, WRITE 659
COMPONENTS, DESCRIBE FIELD 500 CURRENT LINE
COMPRESSION, EXPORT 824 MODIFY LINE 706
COMPUTE, statement 393 READ LINE 703
CONCATENATE, statement 408 CURRENT PAGE
CONDENSE, statement 426 MODIFY LINE 706
CONDITION, ASSERT 928 READ LINE 703
CONNECT, EXEC SQL 811 CURRENT POSITION, TRUNCATE DATASET
CONSTANTS, statement 142 877
constructor, instance constructor 177 CURSOR
CONTEXT LOOP WITH CONTROL 552
DEMAND 1059 LOOP, obsolete 1064
SUPPLY 1058 cursor, data type 102
CONTEXTS, statement, obsolete 1057 CURSOR-SELECTION
CONTINUE, statement 307 FIELD MODULE 543
CONTROL, LOOP 550 MODULE 539
CONTROLS, statement 570

1200 Index
D SELECT-OPTIONS 634
d, data type 93 SET CONNECTION 812
DATA DEFAULT KEY, TYPES 129
statement 131 DEFERRED
statement, obsolete 1019 CLASS 165
DATA BUFFER INTERFACE 168
EXPORT 819 DEFINE, statement 90
IMPORT 827 DEFINING DATABASE, REPORT 57
DATA VALUES, INTERFACES 192 DEFINITION, CLASS 154
data, generic data type 97 DELETE
DATABASE database table 799
DELETE 841 database table, obsolete 1077
EXPORT 821 internal table 470
IMPORT 828 DELETE DATASET, statement 879
IMPORT DIRECTORY 839 DELETE FROM, statement 841
DATASET EXPIRATION, print parameter, DELETING LEADING, SHIFT 423
obsolete 1071 DELETING TRAILING, SHIFT 423
DATE DEMAND, statement, obsolete 1058
CONVERT 921 DEPARTMENT, print parameter, obsolete
CONVERT TIME STAMP 919 1071
CONVERT, obsolete 1048 DESCENDING
DATS, data type 99 SELECT 780
DAYLIGHT SAVING TIME SORT – extract 492
CONVERT DATE 921 SORT – internal table 476
CONVERT TIME STAMP 919 SORT BY – extract 493
dbmaxlen, predefined function 111 SORT BY – internal table 478
DDMMYY, WRITE 666 DESCRIBE DISTANCE, statement 508
DEALLOCATE, COMMUNICATION 1081 DESCRIBE FIELD, statement 499
DEC, data type 99 DESCRIBE LIST, statement 711
DECIMALS DESCRIBE TABLE, statement 506
ASSIGN CASTING 377 DESTINATION
CREATE DATA 211 CALL FUNCTION 967
DATA 134 CALL FUNCTION IN BACKGROUND
DESCRIBE FIELD 503 TASK 973
PARAMETERS 612 CALL FUNCTION STARTING NEW TASK
TYPES 123 968
WRITE 660 print parameter, obsolete 1071
DEFAULT DETAIL, statement, obsolete 1069
CALL FUNCTION STARTING NEW TASK DIRECTORY ENTRY
969 INSERT REPORT 952
CLASS-EVENTS 191 SYNTAX-CHECK 945
EVENTS 189 DISCONNECT, EXEC SQL 813
FIELD-SYMBOLS 151 DISPLAY
METHODS 171 GET CURSOR – list 715
OPEN DATASET 851 SET CURSOR – dynpro 568
PARAMETERS 620 SET CURSOR – list 719, 720
SELECTION-SCREEN TAB 597 DISPLAY LIKE, MESSAGE 736

Index 1201
DISPLAY-MODE ENDEXEC, statement 805
EDITOR-CALL FOR REPORT 957 ENDFORM, statement 65
EDITOR-CALL, obsolete 1086 ENDFUNCTION, statement 64
DISTINCT ENDIAN
SELECT 748 IMPORT 836
SELECT – aggregate 749 OPEN DATASET 852
DIV, arithmetic operator 395 ENDIF, statement 332
DIVIDE, statement 403 ENDING AT
DIVIDE-CORRESPONDING, statement, CALL SCREEN 557
obsolete 1041 CALL SELECTION-SCREEN 639
DO, statement 334 SEARCH 414
DUMMY, AUTHORITY-CHECK 890 SEARCH – internal table 482
DURING LINE-SELECTION, TOP-OF-PAGE WINDOW 721
82 ENDINTERFACE, statement 167
DYNAMIC SELECTIONS, SELECTION- END-LINES, DESCRIBE LIST 712
SCREEN 608 ENDLOOP
ABAP statement 564
E dynpro statement 550
EDIT MASK extract 494
DESCRIBE FIELD 505 internal table 447
WRITE 664 ENDMETHOD, statement 62
EDITOR-CALL FOR REPORT, statement 956 ENDMODULE, statement 70
EDITOR-CALL, statement, obsolete 1086 END-OF-DEFINITION, statement 90
ELSE, statement 332 END-OF-PAGE, statement 83
ELSEIF, statement 332 END-OF-SELECTION, statement 75
ENCODING, OPEN DATASET 850 ENDON, statement, obsolete 1032
END OF ENDPROVIDE, statement 484
AT – extract 496 ENDSELECT, statement 745
AT – internal table 451 ENDTRY, statement 350
AT SELECTION-SCREEN 79 ENDWHILE, statement 337
CLASS-DATA 141 EQ
CONSTANTS 142 relational operator 312
DATA 137 WHERE 767
DATA, obsolete 1022 error_message, CALL FUNCTION 277
SELECTION-SCREEN 584 ERRORMESSAGE, FIELD, obsolete 1062
STATICS 144 ESCAPE, WHERE 768
TYPES 126 EVENT
END OF FILE, SET DATASET 873 CLASS-METHODS 188
END OF TASK, CALL FUNCTION STARTING METHODS 180
NEW TASK 970 EVENTS, statement 189
ENDAT EXCEPTIONS
extract 496 CALL FUNCTION 277
internal table 451 CALL FUNCTION DESTINATION 967
ENDCASE, statement 333 CALL METHOD 266
ENDCATCH, statement 355 CLASS-METHODS 185
ENDCHAIN, dynpro statement 548 CREATE OBJECT 222
ENDCLASS, statement 154 METHODS 173
ENDDO, statement 335 RECEIVE RESULTS 972

1202 Index
EXCEPTION-TABLE GET CURSOR – dynpro 569
CALL FUNCTION 280 GET CURSOR – list 714
CALL METHOD 272 GET PARAMETER 898
CREATE OBJECT 222 GET RUN TIME 931
EXCLUDE, SELECTION-SCREEN 606 GET TIME 917
EXCLUDING GET TIME STAMP 918
GET PF-STATUS 560 SET CURSOR – dynpro 568
SET PF-STATUS 559 SET CURSOR – list 718
EXEC SQL, statement 805 SET PARAMETER 897
EXECUTE PROCEDURE, EXEC SQL 810 FIELD FORMAT, MODIFY LINE 706
EXISTS, subquery 774 FIELD MODULE, dynpro statement 541
EXIT FIELD SELECTION, SELECTION-SCREEN
loop 306 607
processing block 302 FIELD VALUE
EXIT FROM SQL, statement 815 MODIFY LINE 706
EXIT FROM STEP-LOOP, statement 576 READ LINE 704
EXIT-COMMAND FIELD-GROUPS, statement 152
AT SELECTION-SCREEN 82 FIELDS
MODULE 538 ASSERT 928
exp, predefined function 110 GET node 74
EXPONENT, WRITE 658 PROVIDE 484
EXPORT, statement 817 statement, obsolete 1025
EXPORTING FIELD-SYMBOLS, statement 150
CALL DIALOG 1030 FILTER, OPEN DATASET 856
CALL FUNCTION 276 FINAL
CALL FUNCTION DESTINATION 967 CLASS 158
CALL METHOD 265 METHODS 175
CALL METHOD OF – OLE 1007 FINAL METHODS, INTERFACES 192
CLASS-EVENTS 191 FIND, statement 409
CLASS-METHODS 185 FIRST
CREATE OBJECT 222 AT – extract 496
EVENTS 189 AT – internal table 451
METHODS 170 FIRST OCCURRENCE, REPLACE 418
RAISE EVENT 290 FIRST PAGE, SCROLL LIST 709
RAISE EXCEPTION 349 FIRST-LINE, DESCRIBE LIST 712
EXPORTING LIST TO MEMORY, SUBMIT FIXED-POINT ARITHMETIC, INSERT
242 REPORT 951
EXTRACT, statement 491 floor, predefined function 109
FLTP, data type 99
F FONT, PRINT-CONTROL 700
f, data type 93 FOR ALL ENTRIES, WHERE 776
FETCH FOR ALL INSTANCES, SET HANDLER 292
EXEC SQL 808 FOR EVENT
statement 783 CLASS-METHODS 188
FIELD METHODS 180
AUTHORITY-CHECK 890 FOR FIELD, SELECTION-SCREEN
dynpro statement 541 COMMENT 590
dynpro statement, obsolete 1060 FOR SELECT, OPEN CURSOR 782

Index 1203
FOR, SELECT-OPTIONS 629 GET LOCALE, statement 910
FORM, statement 65 GET node, statement 74
FORMAT, statement 674 GET PARAMETER, statement 898
FORWARD, SCROLL LIST 709 GET PF-STATUS, statement 560
frac, predefined function 109 GET PROPERTY, OLE, statement 1010
FRAME, SELECTION-SCREEN 596 GET REFERENCE, statement 384
FRAMES GET RUN TIME, statement 931
FORMAT 679 GET TIME STAMP, statement 918
WRITE 667 GET TIME, statement 917
FREE MEMORY, statement 842 GIVING, ADD, obsolete 1036
FREE OBJECT, OLE, statement 1012 GLOBAL FRIENDS, CLASS 161
FREE SELECTIONS, SUBMIT 240 GROUP, CALL FUNCTION STARTING NEW
FREE, statement 390 TASK 969
FRIENDS, CLASS 161 GT
FROM relational operator 312
DELETE – database table 801 WHERE 767
DELETE – internal table 471
INSERT 788 H
LOOP AT 449 HANDLE
MODIFY – database table 798 ASSIGN CASTING 377
MODIFY – internal table 466 CREATE DATA 217
READ TABLE 437 HASHED TABLE
SELECT 754 CREATE DATA 216
UPDATE 795 DATA 138
FROM TABLE hashed table, generic data type 97
DELETE 802 HASHED TABLE, TYPES 128
INSERT 789 HAVING, SELECT 778
MODIFY 799 header
REFRESH 1076 EXTRACT – field group 491
UPDATE 796 FIELD-GROUPS 152
FUNCTION INSERT – field group 489
PRINT-CONTROL 700 HEADER LINE, DATA 139
statement 63 HEAD-LINES, DESCRIBE LIST 712
FUNCTION KEY, SELECTION-SCREEN 600 HELP-ID, DESCRIBE FIELD 504
FUNCTION-POOL, statement 58 HELP-REQUEST
AT SELECTION-SCREEN 81
G PARAMETERS 624
GE PROCESS 536
relational operator 312 SELECT-OPTIONS 637
WHERE 767 HIDE, statement 697
GENERATE SUBROUTINE POOL, statement HIGH, SET RUN TIME CLOCK RESO-
937 LUTION 933
GET BIT, statement 433 HOLD
GET CONNECTION, EXEC SQL 812 COMMUNICATION 1083
GET CURSOR OPEN CURSOR 782
dynpro 569 HOTSPOT
list 714 FORMAT 677
GET DATASET, statement 869 WRITE 667

1204 Index
I subquery 774
i, data type 93 WHERE – selection table 770
ICON, WRITE 669 WHERE – value list 769
ID INCLUDE
ASSERT 928 GENERATE SUBROUTINE POOL 940
AUTHORITY-CHECK 890 SELECTION-SCREEN 602
BREAK-POINT 930 statement 89
COMMUNICATION 1079 SYNTAX-CHECK 946
DELETE 841 INCLUDE STRUCTURE, statement 145
EXPORT 819 INCLUDE TYPE, statement 145
FREE MEMORY 842 INCLUDING GAPS, PROVIDE 484
GET PARAMETER 898 INCLUDING, CALL SUBSCREEN 554
IMPORT 827 INCREMENT, ASSIGN 375
IMPORT DIRECTORY 839 INDEX
MESSAGE 733 DELETE 473
SELECTION-SCREEN 609 DESCRIBE LIST 711
SET PARAMETER 897 INSERT 458
IDS, SELECTION-SCREEN EXCLUDE 606 MODIFY 467
IF FOUND MODIFY LINE 706
INCLUDE 89 READ LINE 703
PERFORM 285 READ TABLE 440
IF, statement 332 SCROLL LIST 708
IGNORING CASE WRITE TO, obsolete 1052
FIND 411 index table, generic data type 97
REPLACE 419 INDEX TABLE, TYPES 128
IGNORING CONVERSION ERRORS INDEX-LINE, PRINT-CONTROL 701
IMPORT 835 INFOTYPES, statement, obsolete 1023
OPEN DATASET 858 INHERITING FROM, CLASS 157
IGNORING STRUCTURE BOUNDARIES, INIT DESTINATION, COMMUNICATION
IMPORT 834 1080
IMMEDIATELY INITIAL
print parameter, obsolete 1071 ASSIGN LOCAL COPY 1026
SET PF-STATUS 716 logical expression 322
IMPORT DIRECTORY, statement 839 INITIAL LINE
IMPORT, statement 825 APPEND 462
IMPORTING INSERT 456
CALL DIALOG 1030 INITIAL SIZE
CALL FUNCTION 276 CREATE DATA 216
CALL FUNCTION DESTINATION 967 DATA 138
CALL METHOD 265 TYPES 130
CLASS-METHODS 185 INITIALIZATION, statement 72
METHODS 170 INNER JOIN, SELECT 755
RECEIVE RESULTS 972 INOUT, EXEC SQL 810
IN INPUT
EXEC SQL 810 FIELD 543
logical expression 325 FORMAT 677
REPLACE 418 MODULE 70

Index 1205
OPEN DATASET 849 K
statement, obsolete 1069 KEEP IN SPOOL, print parameter, obsolete
WRITE 667 1071
INSERT KEEPING DIRECTORY ENTRY, INSERT
database table 786 REPORT 950
database table, obsolete 1077 KEEPING TASK, RECEIVE RESULTS 971
field group 489 KEY
internal table 455 READ TABLE – database table, obsolete
INSERT REPORT, statement 948 1072
INSERT TEXTPOOL, statement 954 READ TABLE – internal table 439
INT1, data type 99 READ TABLE – internal table, obsolete
INT2, data type 99 1049
INT4, data type 99 KIND, DESCRIBE TABLE 506
INTENSIFIED
FORMAT 676 L
WRITE 667 LANG, data type 99
INTERFACE, statement 166 LANGUAGE
INTERFACE-POOL, statement 59 GET LOCALE 910
INTERFACES, statement 192 INSERT TEXTPOOL 954
INTERNAL TABLE READ TEXTPOOL 953
EXPORT 820 SET LOCALE 905
IMPORT 828 LAST
INTO AT – extract 496
FETCH 783 AT – internal table 451
INSERT 489 LAST PAGE, SCROLL LIST 709
LOOP AT 448 LATE, GET node 75
MESSAGE 738 LAYOUT, print parameter, obsolete 1071
READ TABLE 442 LCHR, data type 99
SELECT 760 LE
INVERSE relational operator 312
FORMAT 676 WHERE 767
WRITE 667 LEAVE LIST-PROCESSING, statement 724
INVERTED-DATE, CONVERT, obsolete LEAVE PROGRAM, statement 299
1048 LEAVE SCREEN, statement 578
IS INITIAL LEAVE TO LIST-PROCESSING, statement
CLASS-DATA 141 723
CONSTANTS 142 LEAVE TO SCREEN, statement 579
DATA 133 LEAVE TO TRANSACTION, statement 255
STATICS 143 LEAVE, statement, obsolete 1030
IS, logical expression 321 LEFT
MOVE PERCENTAGE 1033
J SCROLL LIST 709
JOB, SUBMIT 246 SHIFT 423
JOIN, SELECT 755 LEFT MARGIN, PRINT-CONTROL 701
LEFT OUTER JOIN, SELECT 755
LEFT-JUSTIFIED, WRITE 656

1206 Index
LEGACY BINARY MODE, OPEN DATASET CREATE DATA 213
852 DATA 135
LEGACY TEXT MODE, OPEN DATASET 853 TYPES 124
LENGTH typing 199
COMMUNICATION 1083 LINE VALUE
CREATE DATA 211 MODIFY LINE 706
DATA 134 READ LINE 704
DESCRIBE FIELD 502 LINE-COUNT
FIND 410 DESCRIBE LIST 712
GET CURSOR – dynpro 570 NEW-PAGE 690
GET CURSOR – list 715 print parameter, obsolete 1071
PARAMETERS 610 REPORT 56
READ DATASET 868 SUBMIT 242
REPLACE 417, 1046 LINES
TRANSFER 862 DESCRIBE LIST 712
TYPES 123 DESCRIBE TABLE 507
LEVEL, PERFORM ON 289 LINES OF
LIKE APPEND 463
ASSIGN CASTING 377 INSERT 456
CLASS-DATA 141 lines, predefined function 112
CONSTANTS 142 LINES, RESERVE 696
CREATE DATA 210 LINE-SIZE
DATA 132 DESCRIBE LIST 712
PARAMETERS 612 NEW-PAGE 691
STATICS 143 print parameter, obsolete 1071
TYPES 122 REPORT 56
typing 199 SUBMIT 242
WHERE 768 LIST AUTHORITY, print parameter, obsolete
LINE 1071
DESCRIBE LIST 712 LIST DATASET, print parameter, obsolete
GENERATE SUBROUTINE POOL 940 1071
GET CURSOR – dynpro 569 LIST NAME, print parameter, obsolete 1071
GET CURSOR – list 714 LISTBOX, PARAMETERS 618
GET CURSOR FIELD – list 715 LITTLE ENDIAN, OPEN DATASET 852
MODIFY LINE 706 LOAD
PRINT-CONTROL 700 CLASS 165
READ LINE 703 INTERFACE 168
SCROLL LIST 709 LOAD-OF-PROGRAM, statement 71
SELECTION-SCREEN 594 LOCAL FRIENDS, CLASS 163
SET CURSOR – dynpro 568 LOCAL, statement, obsolete 1035
SET CURSOR – list 718 log, predefined function 110
SET CURSOR FIELD – list 719 log10, predefined function 110
SKIP 683 LOOP
SYNTAX-CHECK 945 dynpro statement, obsolete 1064
WRITE 671 extract 494
LINE FORMAT, MODIFY LINE 706 LOOP AT
LINE OF database table, obsolete 1074
ASSIGN LOCAL COPY 1026 internal table 446

Index 1207
LOOP AT SCREEN, statement 564 statement 731
LOOP WITH CONTROL, dynpro statement SYNTAX-CHECK 945
550 MESSAGE-ID
LOW, SET RUN TIME CLOCK RESOLUTION GENERATE SUBROUTINE POOL 941
933 REPORT 57
LOWER CASE SYNTAX-CHECK 946
PARAMETERS 621 MESSAGES INTO
SELECT-OPTIONS 635 CALL TRANSACTION 254
TRANSLATE 430 DEMAND 1059
LPI, PRINT-CONTROL 700 METHOD, statement 62
LRAW, data type 99 METHODS, statement 169
LT MIN, SELECT 750
relational operator 312 MINIMUM, statement, obsolete 1041
WHERE 767 MINOR-ID, IMPORT, obsolete 830
MMDDYY, WRITE 666
M MOD, arithmetic operator 395
M, relational operator 320 MODE
MAJOR-ID, IMPORT, obsolete 830 CALL DIALOG 1029
MARK CALL TRANSACTION 252
SEARCH 415 INFOTYPES 1023
SEARCH – internal table 483 MODIF ID
MATCHCODE OBJECT PARAMETERS 619
PARAMETERS 621 SELECTION-SCREEN COMMENT 590
SELECT-OPTIONS 636 SELECTION-SCREEN PUSHBUTTON 592
MAX, SELECT 750 SELECTION-SCREEN ULINE 589
MAXIMUM LENGTH, READ DATASET 866 SELECT-OPTIONS 634
MAXIMUM WIDTH MODIFIER
INSERT REPORT 948 GET LOCALE 910
READ REPORT 943 SET LOCALE 905
MAXIMUM, statement, obsolete 1042 MODIFY
me, self-reference 102 database table 797
MEMORY database table, obsolete 1077
DELETE 841 internal table 465
EXPORT 820 MODIFY LINE, statement 705
GET CURSOR 715 MODIFY SCREEN, statement 566
IMPORT 828 MODULE
SET CURSOR 719, 720 ABAP statement 70
MEMORY ID dynpro statement 537
PARAMETERS 622 FIELD 543
SELECT-OPTIONS 636 MOVE
MESSAGE statement 362
CALL FUNCTION DESTINATION 967 statement, obsolete 1033
CALL FUNCTION STARTING NEW TASK MOVE-CORRESPONDING, statement 364
969 MULTIPLY, statement 402
GENERATE SUBROUTINE POOL 939 MULTIPLY-CORRESPONDING, statement,
OPEN DATASET 858 obsolete 1040
RECEIVE RESULTS 972

1208 Index
N NO-DISPLAY
n PARAMETERS 615
data type 93 SELECT-OPTIONS 632
generic data type 97 NO-EXTENSION, SELECT-OPTIONS 633
NA, comparison operator 317 NO-GAP
NAME ULINE 673
GENERATE SUBROUTINE POOL 938 WRITE 657
INFOTYPES 1023 NO-GAPS, CONDENSE 426
NE NO-GROUPING, WRITE 658
relational operator 312 NO-HEADING, NEW-PAGE 689
WHERE 767 NON-UNICODE, OPEN DATASET 851
NESTING LEVEL, SELECTION-SCREEN 585 NON-UNIQUE KEY
NEW CREATE DATA 216
AT – extract 496 DATA 138
AT – internal table 451 TYPES 129
NEW LIST IDENTIFICATION, print para- NO-SCROLLING, NEW-LINE 684
meter, obsolete 1071 NO-SIGN, WRITE 659
NEW-LINE, statement 684 NOT
NEW-PAGE Boolean operator 328
statement 688 WHERE 772
statement, obsolete 1070 NO-TITLE, NEW-PAGE 689
NEW-SECTION NO-TOPOFPAGE, NEW-PAGE 692
NEW-PAGE 693 NO-ZERO, WRITE 659
statement, obsolete 1071 NP, comparison operator 317
NO DATABASE SELECTION, SELECT- NS, comparison operator 317
OPTIONS 638 NULL
NO DIALOG, NEW-PAGE 694 CLEAR 389
NO END OF LINE, TRANSFER 863 WHERE 770
NO FIELDS, READ TABLE 442 NUMBER FORMAT, TRANSLATE, obsolete
NO FLUSH 1045
CALL METHOD OF – OLE 1007 NUMBER OF PAGES, DESCRIBE LIST 712
CREATE OBJECT – OLE 1006 NUMBER, MESSAGE 733
FREE OBJECT – OLE 1012 NUMC, data type 99
GET PROPERTY OF – OLE 1010 numeric, generic data type 97
SET PROPERTY OF – OLE 1011 numofchar, predefined function 111
NO INTERVALS
SELECTION-SCREEN BEGIN OF BLOCK O
596 O, relational operator 320
SELECTION-SCREEN BEGIN OF SCREEN object, generic data type 97
585 OBJECTS, CALL TRANSFORMATION 991
SELECT-OPTIONS 633 OBLIGATORY
NO STANDARD PAGE HEADING, REPORT PARAMETERS 615
55 SELECT-OPTIONS 632
NODE OCCURS
PARAMETERS 624 DATA BEGIN OF, obsolete 1022
SELECTION-SCREEN 609 DATA, obsolete 1022
NODES, statement 147 DESCRIBE TABLE 507
INFOTYPES 1023

Index 1209
RANGES 1024 MODULE 70
TYPES, obsolete 1021 OPEN DATASET 849
OF, PERFORM 285 OUTPUT-LENGTH, DESCRIBE FIELD 503
OFFSET OVERLAY, statement 429
FIND 410
GENERATE SUBROUTINE POOL 941 P
GET CURSOR – dynpro 570 p
GET CURSOR – list 715 data type 94
REPLACE 417 generic data type 98
SET CURSOR – dynpro 568 PACK, statement, obsolete 1034
SET CURSOR – list 719, 720 PACKAGE SIZE, SELECT 763
SYNTAX-CHECK 946 PAGE
ON MODIFY LINE 706
AT SELECTION-SCREEN 78 READ LINE 703
FIELD 543 SCROLL 709
MODULE 540 SCROLL LIST 709
SELECT 755 PARAMETERS
ON CHANGE OF, statement, obsolete 1031 CALL TRANSFORMATION 991
ON COMMIT, PERFORM 289 NEW-PAGE 694
ON ROLLBACK, PERFORM 289 SELECTION-SCREEN EXCLUDE 606
ONLY, OVERLAY 429 SELECTION-SCREEN INCLUDE 602
OPEN CURSOR, statement 782 statement 610
OPEN DATASET, statement 847 PARAMETER-TABLE
OPEN, EXEC SQL 808 CALL FUNCTION 279
OPTION, SELECT-OPTIONS 634 CALL METHOD 271
OPTIONAL CREATE OBJECT 222
CLASS-EVENTS 191 PERCENTAGE, MOVE, obsolete 1033
EVENTS 189 PERFORM, statement 284
METHODS 171 PERFORMING
OPTIONS FROM, CALL TRANSACTION 253 CALL FUNCTION STARTING NEW TASK
OPTIONS, CALL TRANSFORMATION 991 970
OR EXEC SQL 814
Boolean operator 328 PERSON TABLE, INFOTYPES 1023
WHEN 333 PLACES
WHERE 772 SCROLL LIST 709
ORDER BY, SELECT 779 SHIFT 421
OTHERS POSITION
CALL FUNCTION 277 GET DATASET 869
CALL FUNCTION DESTINATION 967 OPEN DATASET 854
CALL FUNCTION STARTING NEW TASK PRINT-CONTROL 700
969 SELECTION-SCREEN 594
CALL METHOD 266 SET DATASET 873
CATCH SYSTEM-EXCEPTIONS 355 statement 686
RECEIVE RESULTS 972 TRUNCATE DATASET 877
WHEN 333 PREC, data type 99
OUT, EXEC SQL 810 PREFERRED PARAMETER
OUTPUT CLASS-METHODS 185
AT SELECTION-SCREEN 78 METHODS 171

1210 Index
PRIMARY KEY, SELECT 780 FORM 68
PRINT OFF, NEW-PAGE 694 MESSAGE 737
PRINT ON METHODS 172
NEW-PAGE 693 RANGE
NEW-PAGE, obsolete 1070 ADD, obsolete 1036
PRINT-CONTROL, statement 699 ASSIGN 382
PRIVATE SECTION, statement 155 DO 335
PROCESS, dynpro statement 536 WHILE 338
PROGRAM RANGE OF
PERFORM 285 DATA 140
SET PF-STATUS 559 TYPES 131
SET TITLEBAR 561 RANGES, statement, obsolete 1024
statement 57 RAW, data type 99
SYNTAX-CHECK 945 RAWSTRING, data type 99
PROGRAM TYPE, INSERT REPORT 950 READ DATASET, statement 864
PROTECTED SECTION, statement 155 READ LINE, statement 703
PROVIDE READ REPORT, statement 943
statement 483 READ TABLE
statement, obsolete 1054 database table, obsolete 1072
PUBLIC internal table 436
CLASS 157 internal table, obsolete 1049
CLASS DEFERRED 165 READ TEXTPOOL, statement 953
INTERFACE 167 READ-ONLY
PUBLIC SECTION, statement 155 CLASS-DATA 141
PUSHBUTTON DATA 134
SELECTION-SCREEN 592 RECEIVE BUFFER, COMMUNICATION
SELECTION-SCREEN INCLUDE 604 1081
PUT, statement 295 RECEIVE RESULTS, statement 971
RECEIVED, COMMUNICATION 1083
Q RECEIVER, print parameter, obsolete 1071
QUAN, data type 99 RECEIVING, CALL METHOD 265
QUEUE-ONLY REDEFINITION, METHODS 181
CALL METHOD OF – OLE 1007 REF TO
CREATE OBJECT – OLE 1006 CREATE DATA 215
GET PROPERTY OF – OLE 1010 DATA 136
QUICKINFO, WRITE 672 TYPES 124
typing 199
R REFERENCE INTO
RADIOBUTTON GROUP APPEND 465
AT SELECTION-SCREEN 79 COLLECT 461
PARAMETERS 617 INSERT 459
RADIOBUTTON GROUPS, SELECTION- LOOP AT 448
SCREEN EXCLUDE 606 MODIFY 469
RAISE EVENT, statement 290 READ TABLE 445
RAISE EXCEPTION, statement 349 REFERENCE, METHODS 171
RAISE, statement 357 REFRESH
RAISING statement 389
CLASS-METHODS 185 statement, obsolete 1075

Index 1211
REFRESH CONTROL, statement 576 SUBMIT, obsolete 1070
REJECT, statement 304 SCREEN
RENAMING REFRESH CONTROL 576
INCLUDE STRUCTURE 145 SELECTION-SCREEN 584
INCLUDE TYPE 145 screen
REPLACE LOOP AT SCREEN 564
statement 416 MODIFY SCREEN 566
statement, obsolete 1046 screen, structure 108
REPLACEMENT CHARACTER SCROLL LIST, statement 708
IMPORT 835 SCROLLING, NEW-LINE 684
OPEN DATASET 859 SEARCH
REPLACEMENT COUNT, REPLACE 419 byte and character strings 412
REPLACEMENT LENGTH, REPLACE 419 internal table 481
REPLACEMENT OFFSET, REPLACE 419 READ TABLE, obsolete 1072
REPORT, statement 54 SEARCH PATTERN, PARAMETERS 625
REQUEST, FIELD 544 SECONDS
REQUESTED, logical expression 323 WAIT UNTIL 972
RESERVE, statement 696 WAIT UP TO 338
RESET SECTION OF
FORMAT 680 FIND 410
WRITE 667 REPLACE 417
RESPECTING CASE SELECT
FIND 411 FIELD, obsolete 1062
REPLACE 419 statement 745
RESULT, CALL TRANSFORMATION 991 statement, obsolete 1077
RETURN subquery 773
statement 301 SELECTION-SCREEN
SUBMIT 230 statement 582
RETURN TO SCREEN, LEAVE TO LIST- SUBMIT 233
PROCESSING 723 SELECTION-SET
RETURNCODE, COMMUNICATION 1082 CALL SELECTION-SCREEN 639
RETURNING SUBMIT 235
CLASS-METHODS 185 SELECTION-SETS, SUBMIT 235
METHODS 176 SELECTION-TABLE, SUBMIT 236
RIGHT SELECT-OPTIONS
MOVE PERCENTAGE 1033 CHECK 303
SCROLL LIST 709 SELECTION-SCREEN EXCLUDE 606
SHIFT 423 SELECTION-SCREEN INCLUDE 603
RIGHT-JUSTIFIED, WRITE 656 statement 626
ROLLBACK WORK, statement 886 SEND BUFFER, COMMUNICATION 1081
ROUND, WRITE 661 sender
CLASS-METHODS 188
S event parameter 190
s, data type 94 METHODS 180
SAP COVER PAGE, print parameter, SEPARATE UNIT, CALL FUNCTION IN
obsolete 1071 BACKGROUND TASK 973
SAP-SPOOL SEPARATED BY, CONCATENATE 408
SUBMIT 244 SET BIT, statement 432

1212 Index
SET BLANK LINES, statement 681 SIZE, PRINT-CONTROL 701
SET CONNECTION, EXEC SQL 812 SKIP
SET COUNTRY, statement 911 SELECTION-SCREEN 588
SET CURSOR statement 682
dynpro 567 SKIP FIRST SCREEN
list 718 CALL DIALOG 1029
SET DATASET, statement 872 CALL TRANSACTION 250
SET EXTENDED CHECK, statement 935 LEAVE TO TRANSACTION 256
SET HANDLER, statement 291 SOME, subquery 775
SET HOLD DATA, statement 577 SORT
SET LANGUAGE, statement 904 extract 492
SET LEFT SCROLL-BOUNDARY, statement internal table 476
687 SORTABLE CODE, CONVERT TEXT 427
SET LOCALE, statement 905 SORTED BY, APPEND 463
SET MARGIN, statement 698 SORTED TABLE
SET PARAMETER, statement 896 CREATE DATA 216
SET PF-STATUS DATA 138
dynpro 558 sorted table, generic data type 98
list 716 SORTED TABLE, TYPES 128
SET PROPERTY, OLE, statement 1011 SOURCE, CALL TRANSFORMATION 991
SET RUN TIME ANALYZER, statement 934 space, constant 102
SET RUN TIME CLOCK RESOLUTION, SPLIT, statement 424
statement 933 SPOOL DYNPRO, SUBMIT 244
SET SCREEN, statement 578 SPOOL PARAMETERS, SUBMIT 244
SET TITLEBAR sqrt, predefined function 110
dynpro 561 SSTRING, data type 99
list 718 STABLE
SET UPDATE TASK LOCAL, statement 887 SORT – extract 492
SET USER-COMMAND, statement 297 SORT – internal table 476
SET, UPDATE 792 STANDARD TABLE
SHARED BUFFER CREATE DATA 216
DELETE 841 DATA 138
EXPORT 823 standard table, generic data type 98
IMPORT 830 STANDARD TABLE, TYPES 128
SHARED MEMORY STARTING AT
DELETE 841 CALL SCREEN 557
EXPORT 823 CALL SELECTION-SCREEN 639
IMPORT 830 SEARCH 414
SHARED MEMORY ENABLED, CLASS 160 SEARCH – internal table 482
SHIFT, statement 420 WINDOW 721
SHORTDUMP-ID, GENERATE STARTING NEW TASK, CALL FUNCTION
SUBROUTINE POOL 942 968
sign, predefined function 109 START-OF-SELECTION, statement 73
SIGN, SELECT-OPTIONS 634 STATICS, statement 143
simple, generic data type 98 STATUSINFO, COMMUNICATION 1081
sin, predefined function 110 STOP, statement 305
SINGLE, SELECT 748 STRING, data type 99
sinh, predefined function 110 string, data type 94

Index 1213
strlen, predefined function 111 READ TABLE 437
STRUCTURE TABLE OF
ASSIGN COMPONENT OF 375 CREATE DATA 216
FIELD-SYMBOLS 151 DATA 138
FORM 67 TYPES 127
INCLUDE 145 TABLE, DELETE 471
SUBKEY, ASSERT 928 table, generic data type 98
SUBMIT table_line
statement 230 pseudo component 480
statement, obsolete 1070 table key 129
SUBSCREEN TABLES
CALL 554 CALL FUNCTION 276
SELECTION-SCREEN 585 CALL FUNCTION DESTINATION 967
SUBSTRING, REPLACE 418 FORM 69
SUBTRACT, statement 402 PERFORM 287
SUBTRACT-CORRESPONDING, statement, RECEIVE RESULTS 972
obsolete 1039 statement 146
SUM TABLES *, statement, obsolete 1020
SELECT 750 TABLEVIEW, CONTROLS 571
statement 453 TABSTRIP, CONTROLS 571
sum, AT 497 tan, predefined function 110
SUMMARY, statement, obsolete 1069 tanh, predefined function 110
SUMMING, statement, obsolete 1042 TESTING
super-> CLASS 161
METHODS constructor 178 METHODS 183
METHODS REDEFINITION 182 TEXT
SUPPLIED, logical expression 324 SORT – extract 492
SUPPLY, statement, obsolete 1058 SORT – internal table 476
SUPPRESS DIALOG, statement 563 SORT BY – extract 493
sy, system fields 102 SORT BY – internal table 478
SYMBOL, WRITE 670 TEXT MODE, OPEN DATASET 850
SYNTAX-CHECK, statement 944 TEXTPOOL
SYST, system fields 102 INSERT 954
READ 953
T THEN, ADD, obsolete 1036
t, data type 94 TIME
TAB, SELECTION-SCREEN 597 CONVERT TIME STAMP 919
TABBED BLOCK, SELECTION-SCREEN 597 GET 917
TABLE TIME STAMP
INSERT 457 CONVERT 919
MODIFY 467 CONVERT DATE 921
PARAMETERS 624 GET 918
SELECT INTO 763 TIME ZONE
SELECTION-SCREEN 609 CONVERT DATE 921
SPLIT 424 CONVERT TIME STAMP 919
TABLE FIELD, ASSIGN 372 WRITE 663
TABLE KEY TIMES, DO 335
DELETE 472 TIMS, data type 99

1214 Index
TITLE U
EDITOR-CALL, obsolete 1086 ULINE
SELECTION-SCREEN BEGIN OF BLOCK SELECTION-SCREEN 589
596 statement 673
SELECTION-SCREEN BEGIN OF SCREEN UNASSIGN, statement 383
584 UNDER, WRITE 657
TITLE-LINES, DESCRIBE LIST 712 UNICODE ENABLING, INSERT REPORT
TO, LOOP AT 449 951
TOP-LINES, DESCRIBE LIST 712 UNIQUE KEY
TOP-OF-PAGE, statement 82 CREATE DATA 216
TRANSFER, statement 860 DATA 138
TRANSLATE TYPES 129
statement 430 UNIT
statement, obsolete 1044 data type 99
TRANSPORTING WRITE 662
MODIFY 468 UNPACK, statement 367
READ TABLE 442 UNTIL, ADD, obsolete 1036
TRANSPORTING NO FIELDS UP TO
LOOP AT 448 SELECT 759
READ TABLE 446 SHIFT 422
trunc, predefined function 109 WAIT UNTIL 972
TRUNCATE DATASET, statement 877 UPDATE
TRY, statement 350 CALL TRANSACTION 252
TYPE database table 790
ASSIGN CASTING 377 database table, obsolete 1077
ASSIGN, obsolete 379 OPEN DATASET 849
CLASS-DATA 141 SELECT 748
CONSTANTS 142 UPDATE TASK, CALL FUNCTION 283
CONTROLS 571 UPPER CASE, TRANSLATE 430
CREATE DATA 210 USER, SUBMIT 246
CREATE OBJECT 219 USER-COMMAND
DATA 132 PARAMETERS AS CHECKBOX 616
DESCRIBE FIELD 500 PARAMETERS AS LISTBOX 618
INCLUDE 145 PARAMETERS RADIOBUTTON GROUP
MESSAGE 731 617
MESSAGE – text 735 SELECTION-SCREEN PUSHBUTTON 592
NODES 147 SELECTION-SCREEN TAB 597
OPEN DATASET 856 USING
PARAMETERS 612 CALL DIALOG 1029
RAISE EXCEPTION 349 CALL SELECTION-SCREEN 639
STATICS 143 CALL TRANSACTION 250
TYPES 122 FORM 66
typing 199 PERFORM 288
TYPE-POOL, statement 59 TRANSLATE 431
TYPE-POOLS, statement 121 WRITE 664
TYPES, statement 122 USING SCREEN, CONTROLS 571
UTF-8, OPEN DATASET 851

Index 1215
V DELETE – database table 800
VALID BETWEEN, DATA, obsolete 1022 DELETE – internal table 474
VALID FROM TO, INFOTYPES 1023 LOOP AT 449
VALUE MODIFY – internal table 469
CLASS-DATA 141 PROVIDE 484
CLASS-EVENTS 191 SELECT 765
CONSTANTS 142 UPDATE 792
DATA 133 WHILE, statement 337
EVENTS 189 WINDOW
FORM 66 SELECTION-SCREEN BEGIN OF 584
GET CURSOR – dynpro 570 statement 721
GET CURSOR – list 715 WITH
METHODS 171 AT 496
STATICS 143 CLEAR 388
VALUE CHECK, PARAMETERS 623 FIELD 547
VALUE-REQUEST MESSAGE 739
AT SELECTION-SCREEN 81 SET TITLEBAR 561
PARAMETERS 625 SUBMIT 234
PROCESS 536 WITH-HEADING, NEW-PAGE 689
SELECT-OPTIONS 637 WITH-TITLE, NEW-PAGE 689
VALUES WORD
FIELD, obsolete 1061 GENERATE SUBROUTINE POOL 940
INSERT 788 SYNTAX-CHECK 945
VARY, WHILE 338 WRITE /, statement 684
VARYING, DO 335 WRITE TO
VERSION internal table, obsolete 1052
DELETE, obsolete 1077 statement 366
LOOP, obsolete 1074 WRITE, statement 647
MODIFY, obsolete 1077
READ TABLE, obsolete 1072 X
SELECTION-SCREEN 606 x
VISIBLE LENGTH data type 94
PARAMETERS 616 generic data type 98
PARAMETERS AS LISTBOX 618 XML
SELECTION-SCREEN COMMENT 590 CALL TRANSFORMATION RESULT 994
SELECTION-SCREEN PUSHBUTTON 592 CALL TRANSFORMATION SOURCE 992
SELECT-OPTIONS 633 xsequence, generic data type 98
xstring, data type 94
W xstrlen, predefined function 111
WAIT UNTIL, statement 972
WAIT UP TO, statement 338 Y
WAIT, COMMIT WORK 885 YYMMDD, WRITE 666
WARNING, FIELD, obsolete 1062
WHEN, statement 333 Z
WHENEVER FOUND, FIELD, obsolete 1062 Z, relational operator 320
WHERE

1216 Index

You might also like