With a strong focus on the RFC Library, this book introduces beginners to basic SAP concepts, and highlights key tools in the ABAP Workbench. Actual programming examples help to illustrate client-server architecture, and show you how to assess the appropriate tools for error diagnosis, troubleshooting, and more. Experienced SAP developers can dive right into comprehensive chapters on programming the RFC interface, and advanced techniques such as tRFC, qRFC, and parallel processing. Extensive coverage of BAPIs, ActiveX, JCo, and highly detailed programming examples serve to round out this exceptional resource.
Highlights Include:
ABAP Workbench tools
Developing client/server applications
In-depth guidance on the RFC Library
tRFC, qRFC, and parallel processing
RFC Troubleshooting
Business Objects, BAPIs, and ActiveX
Java Connector (JCo)
About the Author(s):
Johannes Meiners works for itelligence AG as a Software and Interface Developer. Dr. Wilhelm Nüßer is a Professor at the University of Applied Sciences and Economics in Paderborn, Germany, and holds the chair of the Heinz-Nixdorf Foundation Professorship. He lectures on Linux-related subjects and previously worked for the SAP LinuxLab.
Table of Contents:
Introduction
1. The Basics of R/3 System Architecture
The Application Server
The Dialog Process
The Update Task
The Enqueue Process
The Gateway Server
Distributed Load Systems and the Message Server
The RFC Interface Within the R/3 System
2. The Basics of the ABAP Programming Language
The ABAP Development Environment
Creating Database Tables
The Data Dictionary
Relationships Between Domains, Data Elements, and Tables
Create a Domain
Create a Data Element
Create a Transparent Table
Maintaining Data Records Using the Data Browser
A Simple Program
ABAP Data Types and Variable Declaration
Elementary Programming Statements in ABAP
Value Assignments
Branches
Loops
Access to Internal Tables
Access to Database Tables
Configuration of Selection Screens
Creating Function Modules
Coding Conventions in This Book
3. Introduction to Programming with the RFC API
The Task for the First Example
Programming the SAP Function Modules
Programming the Client
The Configuration of the main() Function
Open a Connection to the R/3 System
Calling Up Function Modules in the R/3 System
Frequent Errors on the Client Side
Overview of the Functions and Structures Used
From an RFC Function Call to the Function Module
Programming the External Server
Configuring the main() Function for an External Server
Open a Connection with the R/3 System
Implementing the Message Loop
Implementing the Server Services
Setting Up the Connection to the R/3 System
Programming the ABAP Client
Frequent Errors on the Server Side
Functions Used
4. The Basics of RFC Programming
Type Mapping and Data Aggregates
Generic Data Types
The Character Data Types
Numeric Strings
The Case of Packed Numbers
Final Overview of Type Mapping
Working with Structures
Working with Internal Tables
Creating an Internal Table in an External Program
Administration of Data Records in an Internal Table
Reading and Writing Data Records in an Internal Table
Overview of the Functions for Internal Tables
The Message Loop
Alternatives for Logging on to an R/3 System
Working With a Configuration File
Working with Load Balancing
Working with the RfcOpen Function
5. Troubleshooting
The ABAP Debugger
The BREAK Statement
The Gateway Monitor
The RFC Trace
Structure of the Trace File for an External Client
Structure of the Trace File for an External Server
Traces Using Transaction ST05
The RFC Generator
Structure of the Client Program Generated
Structure of the Server Program Generated
Macros for Setting and Reading Values
SAP Test Programs
6. Advanced Techniques
Return Calls from the Server
Automatic Creation of a Structure Description
Transactional Remote Function Calls
The R/3 System as tRFC Client
Programming a Transactional RFC Server
Transactional RFC Client
Queue RFCs
Administration of qRFCs in the R/3 System
Developing a qRFC Client in the R/3 System
Developing an External qRFC Client
tRFC and qRFC Calls-Conclusion
Error Messages from an External Server
Error Messages from a Synchronous Server
Error Messages from the tRFC and qRFC Servers
Parallel Processing
Multitasking and Multithreading
Creating and Exiting Threads
The Basics of Synchronization
Synchronization Objects
Advantages of Parallel Processing in RFC Programming
Implementing Parallel Processing in External Servers
7. The Business Object
Business Object-Close to the Object
Structure of the Business Object
The Structure of the Business Object Builder
Creating the Object Key
Methods of the Business Object
Instance-Dependent Methods
Implementation of Methods Using ABAP Program Forms
Creating a Method
Object Release and the Business Object Repository
Guidelines for Developing API Methods
Possibilities for Activation
8. Calling BAPIs from Clients
What Are COM and ActiveX?
"What Is Your Name?" or an Introduction to the Use of ActiveX Controls
The SAP BAPI Control
Opening a Connection with the R/3 System
Calling the Business Object Method
What Is a BAPI Proxy Object Anyway?
Naming Conventions During Programming
Wrapping the BAPI Proxy Object
A Better Method for Setting Up a Connection to the R/3 System
Integrating the Logon Control into the Client
Events of the SAPLogonControl Class
Recognizing a Disconnection
Concepts for Creating Data Aggregates
The SAP TableFactory Control in Detail
Administering Structures with the SAP TableFactory Control
Accessing Data in Structures
Note When Working with Structures!
Working with Tables
The Class Hierarchy for Working with Tables
Important Attributes of the Table Class
Structure of the Example Programs
Reading Data Records in a Table
Changing Data Records
Alternatives for Creating the Field Description
Visualization of the Table Contents
Hierarchy of the Classes of the TableView Control
Specifying the Layout of the Data Grid
Accessing the Cells in a Data Grid
Specifying the Data Source for the Data Grid
Concepts for Inserting and Deleting Rows and Columns
Working with the Clipboard
9. SAP and Java
The SAP Java Connector
Basics of the JCo
Ways of Using the JCo
The JCo Package
JCo Releases
Using the JCo
Basic Structure of a JCo Application
Connection Setup
Running the RFC Modules
Access to Data and Tables
Complete Example Program
Troubleshooting and Tracing
Closing Remarks
The Future of the SAP Java Interface
Appendix A. Sources and Further Reading
Appendix B. About the Authors
Index