14.01.2020 Views

ABAP_to_the_Future

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Contents

2.2 Declaring and Creating Variables ................................................... 90

2.2.1 Omitting the Declaration of TYPE POOL Statements ........ 90

2.2.2 Omitting Data Type Declarations ...................................... 92

2.2.3 Creating Objects Using NEW ............................................ 92

2.2.4 Filling Structures and Internal Tables while

Creating Them Using VALUE ............................................ 93

2.2.5 Filling Internal Tables from Other Tables Using FOR ......... 94

2.2.6 Creating Short-Lived Variables Using LET ......................... 95

2.3 String Processing ........................................................................... 96

2.3.1 New String Features in Release 7.02 ................................. 96

2.3.2 New String Features in Release 7.4 ................................... 97

2.4 Calling Functions ........................................................................... 98

2.4.1 Method Chaining ............................................................. 98

2.4.2 Avoiding Type Mismatch Dumps when

Calling Functions .............................................................. 99

2.4.3 Using Constructor Operators to Convert Strings ............... 100

2.4.4 Functions That Expect TYPE REF TO DATA ....................... 101

2.5 Conditional Logic .......................................................................... 102

2.5.1 Using Functional Methods in Logical Expressions ............. 103

2.5.2 Omitting ABAP_TRUE ...................................................... 103

2.5.3 Using XSDBOOL as a Workaround for BOOLC .................. 105

2.5.4 The SWITCH Statement as a Replacement for CASE .......... 106

2.5.5 The COND Statement as a Replacement for IF/ELSE ......... 108

2.6 Internal Tables ............................................................................... 109

2.6.1 Using Secondary Keys to Access the Same Internal

Table in Different Ways .................................................... 109

2.6.2 Table Work Areas ............................................................. 112

2.6.3 Reading from a Table ....................................................... 114

2.6.4 CORRESPONDING for Normal Internal Tables .................. 115

2.6.5 MOVE-CORRESPONDING for Internal Tables

with Deep Structures ........................................................ 116

2.6.6 New Functions for Common Internal Table Tasks ............. 120

2.6.7 Internal Table Queries with REDUCE ................................ 122

2.6.8 Grouping Internal Tables .................................................. 122

2.6.9 Extracting One Table from Another .................................. 124

2.7 Object-Oriented Programming ...................................................... 126

2.7.1 Upcasting/Downcasting with CAST ................................... 126

2.7.2 CHANGING and EXPORTING Parameters ......................... 127

2.7.3 Changes to Interfaces ....................................................... 128

2.8 Search Helps .................................................................................. 129

2.8.1 Predictive Search Helps .................................................... 129

2.8.2 Search Help in SE80 ......................................................... 130

10

www.allitebooks.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!