ABAP Persistence
Access to the R/3 System database is made using OPEN SQL statements in the PUT_
subroutines. Data is passed to the executable program using interface work areas defined using the TABLES statement. Once the data has been read in the logical database program, the executable program (report) can process the data in the GET event blocks. This technique separates data reading and data processing.
ABAP programmers do not need to open and close database connections since every ABAP program automatically receives an open connection to the central database in the system.
ABAP Objects contain Open SQL, SAP's platform-independent SQL dialect as a direct component of the language.
Accesses to data in the database are synchronized by the runtime system's lock mechanism which prevents two parallel transactions from being able to change the same data in the database.
The logic in SAP's Update System avoids database rollback.
 To avoid keeping the database waiting, SAP maintains its own LUW (logical units of work) that spans several screens and several database LUW.
- Update Management (transaction SM13)
- Monitoring Updates
- Analyzing and correcting update errors

 |
eCATT
eCATT (extended Computer Aided Test Tool - BC-TWB-TST-ECA) was available since release 6.20 and superceded CATT as of Web Application Server Release 6.40.
SAP supplies it free as part of the R/3 system to document manual user dialog steps and to record, edit, and execute automated functional test cases without user dialog.
eCATT can be used with the Test Workbench.
Transactions executed through eCATT require the same authorizations as manual operation by a live person, so eCATT can be used to verify user profiles.
In principle, the entire ABAP instruction set is available for use within inline ABAP code (CREATE, CALL, DATA, SUBMIT, etc.).
eCATT stores its data in R/3 databases and can be controlled by Test Workbench, the Object Navigator (SE80), or externally through the BC-eCATT interface.
Test modules can refer to spreadsheets providing various data that are updated in CATT Maintenance mode.
Logs are created while test modules run.
However, eCATT is less suited for testing lists and display results, menu paths, online help (F1, F4), free-form editor functions, and transactions that contain the statement LEAVE TO TRANSACTION.
| |
|

 |
ABAP Trace
ABAP trace measures the run times of various ABAP commands:
- To avoid tracing the buffer load process, execute the functional sequence before beginning trace.
- Command ST12 or System > Utilities > Runtime analysis > Execute,
at the ABAP Runtime Analysis: Initial Screen, Turn ABAP trace switch on for an R/3 transaction code, ABAP program name, or R/3 function module. Filtered
- Perform functional actions while SAP captures measurements into a file it creates.
- Analyze measurement results:
Overview shows the gross and net execution times of a program call in microseconds.
gross time is the total time required for the call, which includes times of all modularization units and ABAP statements
net time is the gross time minus the time required for the called modularization units and for separately specified ABAP statements
For statements such as APPEND, the gross time equals the net time
If the gross time differs from the net times for such statements, the call contains other calls or modularization units
hit list displays the individual components of each call. Hit list displays the execution time in microseconds for each statement executed by the program or transaction, sorted in decreasing order of the gross times.
Tables hit list lists database tables accessed by the transaction or program.
Group hit list displays ABAP trace results grouped by modularization unit.
Call hierarchy displays statements in chronological order of execution.
| |
|

 |
Efficient ABAP Coding Strategies
- After each BAPI call, check the message that came back to see whether the BAPI call was successful. All BAPIs are supposed to use a RETURN parameter instead of throwing ABAP exceptions. However, different BAPIs use different structures with different field names for the RETURN parameter.
- Be smart about the amount of data retrieved from the database.
Specify SQL to retrieve the least amount of data from the database, such as requesting only enough data to fit on a page presented to the user. This reduces memory and network bandwidth consumption.
However, it may be more efficient to make one call is the user's task is make a decision (not just to refine the search).
One important technique is to save the values each user provided for previous searches (such as the user's own department number, etc.) and present them to the user automatically.
|

 |
RFMs and BAPIs
ABAP Function Modules can only be called from an external client if they are marked as RFC-enabled.
BAPIs are RFMs that follow additional rules (as defined in the SAP BAPI Programming Guide) and are defined as object type methods in SAP's Business Object Repository (BOR).
RFMs are also used to define ABAP exceptions -- a string such as "NOT_FOUND" with an associated language-dependent message text.
Transaction codes BAPI and SE37 provide metadata for the several thousand SAP R/3 BAPIs and other RFMs (RFC-enabled Function Modules) in its Interface Repository. Some of them are in "unreleased" (unsupported) state. SAP only guarantees released BAPIs to be upward-compatible When SAP wants to change a BAPI in a way that would be incompatible with the existing version, they create a new BAPI and mark the old name obsolete.
Find suitable BAPIs using the BAPI Explorer (transaction BAPI), then review the metadata of the RFM in the Function Builder (transaction code SE37).
RFMs have three types of parameters:
- import (the client sends these to the RFM),
- export (RFM sends these back to the client), and
- tables (bi-directional).
Import and export parameters can be simple (scalar) fields or structures (an ordered set of fields) based on Data Dictionary (DD) definitions.
Tables have one or more columns (fields) in zero or more rows.
Import and table parameters can have mandatory or optional attributes, export parameters are always optional.
However, a easier request/response programming model is used when BAPIs are made object-oriented as methods within proxy classes representing business object types in the BOR.
|

 |
IDocs
IDoc (intermediate document) provide a standard data container structure for SAP to exchange data between processes, such as asynchronous EDI (electronic data interchange) between application programs written for SAP or between an SAP application and an external program.
IDocs is the vehicle for data transfer in SAP's Application Link Enabling (ALE) layer.
Different types of IDoc are used for purchase orders or invoices.
In other words, an IDoc encapsulates data so that it can be exchanged between different systems without conversion from one format to another. Each IDoc generated exists as a self-contained text file that can then be transmitted to a receiver (requesting workstation) without connecting to the central database.
There are several types of IDoc records: a single Control Record, one or many Data Records, and one or many Status record. Segments and attributes of segments (maximum number, hierarchical sequence, segment status, etc.) are used for interpretating the SDATA field in the data record. Each IDoc consists of several segments and a unique number assigned each iDoc for tracking and future reference. Each segment contain several fields.
IDoc data is then converted by SAP's EDI subsystem to a universal EDI standard such as UN/EDIFACT (Electronic Data Interchange for Administration, Commerce, and Trade) or ANSI/X12.
Business Application Programming Interface (BAPI) is used for synchronous communication method sRFC because data usually is returned to the sending system.
BAPI methods are stored as RFC-capable function modules in the ABAP Workbench Function Builder accessing the SAP Business Object Repository (BOR).
|

 |
ABAP Exam - Programming Curriculum for Technical Consultant Certification
Here are my comments on the topic area class SAP offers to prepare people for the their "SAP NetWeaver 2004 - Development Consultant � Application Development Focus ABAP"
The curriculum on the right column is my design for students taking a more task-based, exploratory approach to learning, in a context of a team jointly developing complex systems. The result is that learners can become quickly productive in a complex environment. For example, rather than starting with a simple "Hello World", learners work with real code because one of the skills required of professionals is the ability to ignore the clutter and work under ambiguity.
|

 |
- SAP Technologies (+)
- SAP systems (mySAP Business Suite and SAP NetWeaver)
- Technical structure of an SAP Web Application Server
- ABAP Workbench Basics (++)
- Data types and data objects
- Internal tables
- Data retrieval (authorization check)
- Subroutines
- ABAP runtime system
- Function groups and function modules
- Advanced ABAP (++)
- Open SQL
- Dynamic programming
- Program calls and memory management
- ABAP Objects (++)
- Classes and objects
- Inheritance
- Polymorphism (casting)
- Interfaces
- Events
- Global classes and interfaces
- Exception handling
- ABAP Dictionary (++)
- Database tables
- Performance for table accesses
- Consistency by means of input check (foreign key dependency)
- Dependency for ABAP Dictionary objects
- Views
- Search helps
- List Creation Techniques (++)
- Data output in lists
- Selection screen
- Logical database
- Interactive lists
- List creation with the ALV grid control:
- Simple lists
- Field catalog
- Layout
- Event handling
- Dialog Programming (++)
- Screen (basics)
- Program interface (GUI title, GUI status)
- Screen elements for output (text fields, status icons, and group boxes)
- Screen elements for input/output
- Subscreen and tabstrip control
- Table control
- Context menu
- Lists in dialog programming
- Database Changes (+)
- Database updates with open SQL
- LUWs and client/server architecture
- SAP locking concept
- Organize database changes
- Complex LUW processing
- Number assignment
- Change document creation
- Enhancements and Modifications (+)
- Changes to the standard SAP system
- Personalization
- Enhancements to ABAP Dictionary elements
- Enhancements via customer exits
- Business Transaction Events
- Business Add-Ins
- Modifications
| | |
- Demonstration of how users get work done
- Invoke the application, login, open, close, logout using mouse, menu, keyboard shortcuts
- Business transactions: view, list, select, search, add, change, delete
- Common error messages and taking remediation action
- Batch job schedule (data management)
- Installation, Environment, and Samples
- Download Installer & patches (zip/tgz files)
- Installation Troubleshooting (Space, Network setup, etc.)
- Exploration of a standard installation and what needs configuration
- Tutorials, Glossary, Forums, other online support
- Folders, Files (Sample Project, Source files)
- Server services
- Add-ins
- Debug an almost working sample program using the Workbench
- Code checkout from source repository
- Invocation options from command line (such as log verbosity)
- Use test harness to define positive and negative code verification tests
- Stepping through (tracing) code execution and naming conventions
- Defining & allocating variables and Memory Management
- External references
- Chain of suboutine & external calls
- Differences among events and class inheritance
- Data type conversions, casting, polymorphism, and data transformations
- List creation, looping, sorting
- Multi-Threading and other coding for Scalability
- Code modularization and code execution profiling
- Update/delete enqueues, connections to databases
- Data queries with SQL procs, SQL code
- Accessing flat files
- Compile/Build options and debugging
- Text Editor navigation to find and change a text string
- Text in localized resource bundles
- Code walkthroughs for readability, high performance, and defect avoidance
- GUI dialog form, list, and report formatting
- Input data editing
- Lookups, Loops, sorting
- Accessing dictionary elements
- Messaging (JMS, etc.)
- Subroutines and code modularity
- Stubs and drivers during Integration testing with other modules
- Searching for functions to use from the framework/code library
- Review: describe menu options in the Workbench
- Import/Export
- Production run (minimal logging)
|
|
No comments:
Post a Comment