SAP' ABAP Handbook Kogent Learning Solutions, Inc. JONESAND BARTLETTPUBLISHERS Sudbury,Massachusetts BOSTON TORONTO LONDON SINUAPORI: Table of Contents Introduction xxi AboutThis Book xxi HowtoUseThis Book xxii Conventions xxii OtherResources xxiv Chapter 1 AGatewaytoSAPSystems 1 Explainingthe ConceptofanERPSystem 2 History ofSAPSystems 4 NeedforABAP 6 ExploringtheArchitecture ofSAP R/3 8 The LogicalView 9 The Software-OrientedView 10 The User-OrientedView 13 Explainingthe Architectureofthe Application Server 14 DispatchingDialogSteps 22 DescribingtheUser ContextandRollArea in the SAPSystem 24 The Client-DependencyFeature 26 Summary 26 Chapter 2 TheLogonProcess ofthe SAPSystem 27 StartingtheSAPSystem 28 Maintainingthe SAPLogonScreen 31 Adding a New Entry 31 ModifyingtheEntry 35 Deleting the Entry 36 Creating andUsing SAPShortcuts 37 Creating SAPShortcuts 37 ConfiguringtheSAPLogon 47 ix x Table ofContents ChangingthePassword 50 Logging OffoftheSAP System 52 Summary 53 Chapter3 SAPEasyAccess 55 Explainingthe SAPEasyAccess Screen 56 Exploringthe GUIofthe SAP System 60 The Screen Header 60 The Screen Body 67 Customizing the SAPGUI 70 Managing Favorites 72 Addingan Item 75 Inserting Folders 76 MovingFavorites andFolders 78 RenamingFavorites andFolders 80 Deleting Favorites andFolders 82 AddingaWeb Address 82 Handling SAPSessions 84 Creating a New Session 84 DisplayingaListofAll Sessions 86 Endinga Session 87 Summary 88 Chapter4 Understanding ABAPWorkbench 89 Overview ofABAP Workbench 90 Exploring theABAP WorkbenchTools 91 ABAP Dictionary 92 ABAP Editor 94 Front-End Editor (New) 95 Front-End Editor (Old) 96 Back-EndEditor 98 Class Builder 99 Function Builder 101 Screen Painter 102 Menu Painter 103 TableofContents xi Object Navigator 105 Message Maintenance 109 ABAPText Elements 110 Maintain Transaction 111 DescribingPackage Builder 112 TypesofPackages 113 TestingTools inABAPWorkbench 114 ABAP Debugger 114 ABAP Runtime Analysis 115 Performance Analysis 116 DescribingWeb Services 117 WebApplication Builderfor ITS 118 WebApplication Builderfor BSP 119 Describing XSLT Editor 120 Summary 121 Chapter5 ABAP Dictionary 123 OverviewofABAP Dictionary 124 ExploringDomains 125 Describing FixedValues for Domains 126 Exploring Conversion Routines for Domains 127 Creating a Domain 128 Modifying the ExistingDomain 133 Deleting aDomain 138 Exploring DataTypes 138 DataElements 138 Structures 144 Table Types 144 ExploringTypeGroups 145 Exploring DatabaseTables 146 TypesofTables 148 TypesofTable Fields 152 Technical Settings ofa Table 154 Creating Tables 158 RelatingTables byUsingForeign Keys 174 xii TableofContents ExploringViews 180 RelatingDatabase TablesUsing Relational Operators 181 Creating Different Types ofViews 184 DeletingViews 211 ExploringSearch Helps 212 Elementary SearchHelp 212 CollectiveSearchHelp 213 Append SearchHelp 214 ExploringLockObjects 215 DescribingLockArguments 217 Exploringthe LockMode andtheLockTable 218 Describingthe Lock Mechanism 220 Creating LockObjects 222 Summary 226 Chapter 6 ABAP Programming inABAPEditor 227 Structureofan ABAP Program 228 Introductory Program Part 229 Declaration Partfor Global Data, Class Definitions, andSelection Screens 229 ProcessingBlocks 230 ABAP Editor 231 Types ofABAP Programs 236 ABAPSyntax 238 Inserting CommentsintoABAP Programs 239 ExploringTypes and Objects 241 DataTypes 242 ObjectTypes 245 ObjectsinABAP 246 Variables inABAP 248 The DATA Statement 248 The PARAMETERS Statement 252 ConstantsinABAP 256 The TABLES Statement 258 AssignmentStatements 259 The MOVEStatement 259 The MOVE- CORRESPONDING Statement 263 TableofContents xiii TheWRITE TOStatement 265 The CLEARStatement 266 FormattingOptions 268 TheWRITEStatement 268 TheFORMAT Statement 271 Exploring SystemVariables 278 DynamicAssignment 278 Describing FlowControl Statements 279 The IF. ENDIFControlStatement 280 . . Looping 289 TerminatingLoops 294 Summary 297 Chapter7 Internal Tables 299 OverviewofInternal Tables 300 DataTypesofan InternalTable 303 Types ofInternalTables 303 Standard Tables 304 SortedTables 304 Hashed Tables 305 Creating InternalTables 305 Creating InternalTables as DataTypes 306 Creating InternalTables as DataObjects 313 PerformingOperations onan Entire Internal Table 316 Moving andAssigning Internal Tables 316 InitializingInternalTables 319 RefreshingInternalTables 320 Releasingthe Memory ofInternal Tables 320 Comparing InternalTables 322 Performingthe SortOperationinInternal Tables 325 DeterminingtheAttributes ofInternalTables 333 Operations onIndividualLines 335 Inserting Lines inInternal Tables 337 InsertingSummarizedLines inInternal Tables 346 AppendingLines to Internal Tables 348 Readingthe Lines ofInternalTables 356 Modifyingthe Lines ofInternal Tables 364 xiv TableofContents Deleting Lines 373 SearchingTable Entries 386 Maintaining InternalTables 390 Control Break Processing 392 The AT FIRST andAT LAST Statements 392 The AT NEW and AT END OF Statements 395 The SUM Statement 401 The ON CHANGE OF Statement 403 Summary 410 Chapter8 AccessingDatainthe SAP System 411 Accessing Database Tables 412 Open SQL 413 Reading DataUsing the SELECT Statement 416 The SELECT Clause 417 The INTO Clause 428 The FROMClause 437 The WHERE Clause 446 The GROUP BYClause 459 The HAVING Clause 462 The ORDER BYClause 463 Subqueries 465 Examples ofSubqueries 467 InsertingDataintoaDatabaseTable 471 Examples ofDataInsertion 472 Updating DatainaDatabase Table 477 Examples ofUpdating DatainTables 479 Deleting the Data froma Database Table 483 Examples ofDeleting Data 485 ModifyingtheLinesofDatabaseTables 488 UsingCursorsto ReadData 490 Opening andClosingCursors 491 RetrievingData 491 CommittingDatabase Changes 494 Summary 495 Ta8leofContents xv Chapter 9 ModularizationTechniques 497 Workingwith Subroutines 498 Workingwith FormalandActual Parameters 503 Handling Datain Subroutines 505 UsingLocal Field Symbols 510 Making Internaland External Calls 513 Passing Parametersto Subroutines 518 TerminatingSubroutines byUsingEXIT and CHECK Statements 524 Function Modules 526 Creating Function Modules 528 Calling Function Modules fromABAPPrograms 540 Source Code Modules 543 Macros 544 IncludePrograms 545 Summary 548 Chapter 10 ABAP UserDialogs 549 IntroducingDialog Programming 550 Screen Painter 552 Learning About Attributes 555 FlowLogic 559 Learning About theLayout Editor 561 TheTabstrip Control in Graphical Layout Editor 568 Creating aTable Control by Using Graphical Layout Editor 590 Menu Painter 599 Workingwith Menu Painter 600 Workingwith SelectionScreens 620 Defining a Selection Screen 620 Calling a Selection Screen 638 Processing Selection Screens 643 Summary 643 xvi TableofContents Chapter 11 TheBDC and LSMWTools 645 The DataTransferTechniques 646 The Batch InputTechnique 646 The DirectInputTechnique 649 The BAPITechnique 649 DataTransfer Methods 649 The Direct Input Method 650 TheCallTransaction Method 650 TheBatch Inputwith SessionMethod 651 DataTransfer byUsingthe BDCDATAStructure 652 The BDCTool 653 Creating aBDC Program byUsingtheCall Transaction Method 653 Transferring DatabyUsingthe BatchInput with Session Method ofBDC 675 The LSMWTool 697 Updating Records byUsingtheBatch Input Recording Method 698 Summary 733 Chapter12 Forms in mySAP ERP: SAPscriptandSAP SmartForms 735 Exploringthe SAPscriptTool 736 Components ofthe SAPscript Tool 738 Structure ofan SAPscript Form 739 ManagingTools 743 Accessing the FormPainterTool 747 Form Subobjects 751 The SAPscriptRuntimeEnvironment 762 Print Program 763 SAPscriptFunction Modules 771 Controlling the SAPscript Forms 787 SAPscriptControlCommands 789 SAPscriptSymbols 791 TheSAPSmartForms Tool 793 OverviewoftheSAPSmartFormsTool 794 SAP Smart Form Components 795 TableofContents xvii Explainingthe Smart Form Process 798 Advantages ofSmart Forms 800 Important Objectsfor Form Development 800 Creating and Maintaining Smart Forms 801 StyleBuilder 806 Comparing SAPscript and SmartForms 808 MigratingSAPscript Formsto SmartForms 810 IndividualMigration 811 MassMigration 812 Convertinga Style 814 Summary 816 Chapter 13 Reports 817 Workingwith Classical Reports 818 Creating a Classical Report 820 Interactive Reports 827 Creating an Interactive Report 829 Comparing Classical and Interactive Reports 839 ALV Reports 839 Creating an ALVReport 840 Summary 846 Chapter 14 BusinessAdd-Ins (BADIs) 847 Concept ofBADIs 848 Enhancement Framework 849 OverviewofEnhancement 851 The EnhancementBuilderTool 854 EnhancementTechniquesinEnhancement Framework 854 StructureofaBADI 856 DefinitionofBADIs 858 Defining aBADI 860 Displaying, Changing, orDeleting aBADI Definition 869 ImplementationofBADIs 870 Calling BADIs 875 Differences Between Classicand NewBADIs 875 Filter-Dependent BADIs 876
Description: