ABAP Workbench Tools
 
Published: 21 Feb 2007
Abstract
This article examines the various tools used for ABAP workbench.
by Arindam Ghosh
Feedback
Average Rating: 
Views (Total / Last 10 Days): 36554/ 58

Introduction

For editing Repository Object one may need different kinds of tools; ABAP Workbench contains the tools that are required for editing Repository objects. The tools can be used throughout the entire development phase. These tools are not separated form the Workbench, rather they are integrated. For example, Object created by the other tools can be recognized by other tools in the Workbench. An example of one such tool is the ABAP Editor

The following sections introduce you to the ABAP Workbench and the concepts you need to know before you start to use the Workbench.

·         Tool Integration and Working Methods

·         Development Objects and Development Classes

·         Team Development

Tool Integration and Working Methods

The tools in the Workbench are integrated. For example, when you are working on a program, the ABAP Editor will also recognize objects created using other tools. This integration also means if you double-click an object to select it, the Workbench automatically launches the tool that was used to create the object.

SAP has developed the Object Navigator to help you to organize your application development in this integrated environment. It provides a context that makes it easier for you to trace the relationships between objects in a program. Rather than working with tools and recalling development objects, you work with objects and allow the Workbench to launch the appropriate tool for an object.

Development Objects and Development Classes

When you work with the Workbench, you work with development objects and development classes. Development objects are the individual parts of an ABAP application. Some examples of development objects are programs like reports, transactions, and function modules. Program components such as events, screens, menus, and function modules are also development objects. Finally, objects that programs can share are development objects. These shareable objects include database fields, field definitions, and program messages. A development class is a container for objects that logically belong together; for example, all of the objects in an application. A development class is also a type of development object. An example of a development class might be General Ledger Accounting. When you create a new object or change an existing object, the system asks you to assign the object to a development class.

Storage of Development Objects

The SAP system stores development objects in the R/3 Repository, which is a part of the database. When you complete work on a development object like a program, screen, or menu, you generate a runtime version of the object. This runtime version is stored, along with the object, in the Repository. An application consists of several runtime objects that are processed by the work processes in the R/3 System. In a standard SAP installation, development and live operation take place in separate systems. New applications are created in the development system and transported to the production system. Daily work takes place in the production system which uses run-time versions created in the development system. The division between production and development systems is recommended because changes to an existing ABAP application take immediate effect. To prevent disturbances in daily work flow in the production system, all developments are carried out in development systems designed especially for this purpose.

The Workbench Organizer

You use the Workbench Organizer and the transportation system to move applications from the development system to the production system. The Workbench Organizer also provides version control and tracking. When you work with the Workbench, you will encounter safeguards provided by the Workbench Organizer.

Development in a Team Environment

ABAP allows you to divide work on large projects among several programmers. Consider an accounting application project with an accounts payable module and an accounts receivable module. The ABAP environment helps you create a work area in the system for the project. You can then assign tasks to each programmer and follow his or her work as it progresses.

The tool you use for tracking development projects is called the Workbench Organizer. The Organizer tracks changes to existing SAP development objects and the creation of new objects. If you create a new object, the Organizer asks you for a development class when you try to save the object.

The Organizer uses the development class to determine whether a change request is required. A change request records the changes made to one or more development objects. The $TMP development class contains local objects. Local objects are not transported and so the Organizer does not monitor them.

If you specify a non-local development class, the system prompts you to enter a change request. The system also queries you for a change request the first time you attempt to change an existing non-local object.

When you associate a change with a request, the system creates a task for you under that change request. The organizer creates a task for each programmer making a change under a change request. You can think of a change request as a container of change tasks. Once you associate an object with a change request, the system views the objects as under development. The object is locked and cannot be changed by other users. When you have finished creating or changing an object, you release your task. To transport your changes to a production system, you release the change request that held your task.

You can change the development class and change request associated with an object. For more information about changing the development class of an object, the Workbench Organizer and the transport system, see the Workbench Organizer documentation.

ABAP Editor

You use the ABAP Editor to create and edit your programs and their components. If you want to use the ABAP Editor together with the Modification Assistant, read the Modifications in programs documentation.

·         ABAP Editor Overview

·         Creating a Program

·         Editing Source Code

·         Saving and Activating a Program

Introduction to the ABAP Editor

The ABAP Editor is a tool that you use to write ABAP programs, class methods, function modules, screen flow logic, type groups, and logical databases.

Editor Modes

The ABAP Editor has two different modes:

·         Front end editor

·         Table control mode

The front end editor uses the SAP Text edit Control from the SAP Control Framework. It loads your source code onto the front end and allows you to perform many tasks without any communication with the application server.

The command mode is no longer supported in the new version of the ABAP Workbench and is no longer available in Release 4.6B.

Integration

Table control mode and front end editor are fully compatible and interchangeable source codes that you have created using one mode are properly reproduced by the system in the other without you having to do anything yourself. In particular, the line lengths are the same. If you exceed the maximum length, the system automatically inserts a line break. Both editor modes offer the same source code layout. The contents of the editor are displayed exactly as they are stored in the database. There is no automatic conversion (for example, into uppercase) in either mode.

Differences

There are differences between the two modes in respect to how they are used, the system requirements, and (to a small extent) the functions that they contain. Other sections of this documentation explain the differences in more detail.

The Front-end Editor

In the front end editor, the ABAP source code is loaded onto the front end and edited locally. The advantage of this is that all editing functions that do not require communication with the backend can be performed very quickly. However, the communication channel between the front end and backend can be overloaded when you use the front end editor. If you have a large program, this can be a problem even in a LAN environment, but in a WAN, it can become critical. You can edit the following development objects in the front end editor:

·         ABAP programs

·         Method implementations (Class Builder)

·         Function module implementations (Function Builder)

·         Screen flow logic (Screen Painter)

·         Type groups (ABAP Dictionary)

Edit control mode has the same range of features in each situation in which you can use it.

 

Edit control mode is not yet supported in the split screen editor, the BOR editor, or the logical database editor.

Editing an ABAP program in edit control menu using the context menu:

Features

The front end editor of the ABAP Editor contains the following features:

·         Local scrolling (only available in this mode)

·         Cut, copy, and paste for selected text areas (only available in this mode)

·         Drag and drop (only available in this mode)

·         Context menu (right-click) for accessing editor functions (only available in this mode)

·         Local find and replace function

·         Navigation to a selected line (using the context menu)

·         Access to the buffer and block operations (using the context menu)

·         Commenting out text blocks

·         Working with blocks and clipboards

·         Navigation functions (forward navigation)

·         Syntax check, displaying error messages and warnings in a separate window

·         Colored highlighting for comment lines

·         Automatic line feed when the maximum line width is reached (only available in this mode)

·         Insert statement function.

·         Multiple-step undo and redo functions (only available in this mode)

·         Displays current cursor position

·         Pretty Printer for standardizing the layout

·         Import and export for local files

Table Control Mode

The backend editor allows you to use the traditional backend editor for editing your ABAP coding. The editor is line-based and to use normal editor functions such as cut, copy, and paste, you must first select a block of lines. It is often useful to use the clipboards in this mode.

If you have a very long program (and especially if you are working in a WAN environment), the backend editor can produce better performance than the front end editor. Furthermore, backend editor allows you to edit any development object that is based on the ABAP Editor. The split screen editor, the BOR Editor, and the Logical Database Editor are only available in the backend editor.

Features

The backend editor of the ABAP Editor provides the following functions:

·         Compression logic (only available in this mode)

·         Line numbering (only available in this mode)

·         Find and replace functions

·         Colored highlighting for comment lines

·         Insert statement function

·         Include expansion (only available in this mode)

·         Single-step undo function

·         Conversion of a text block to comment lines

·         Pretty printer for standardizing program layout

·         Syntax check

·         Upload and download of local files

Changing the Editor Mode

When you start the ABAP Editor, the system displays the source code in the editor mode saved in your user-specific settings.

To change the Editor mode from anywhere in the ABAP Workbench:

Choose Utilities  à Settings

The User-Specific Settings dialog box appears.

Choose ABAP Editor.

Set the new editor mode.

If you are going to use Table control mode, you can choose whether to switch the Line numbering and Compression logic on or off.

Choose to leave the dialog box.

The changed settings are saved and will be retained even after you log off from the SAP System.

Creating a Program

The description assumes that you are creating your new ABAP program in the Object Navigator. It is also based on the most general case and you can use it even if there is not yet a Programs node in your object list.

You can also use the Create function from the context menu of the object node.

Choose (Other object).

In the Object Selection dialog box, chose Program.

Enter the name of the new program.

Remember that all programs in the customer namespace must begin with Y or Z.

Choose.

The Create Program dialog box appears.

If you want your program to be an executable program, deselect the With TOP include option. If, on the other hand, you want to create a module pool, select the option.

Choose to confirm your entries.

If you created a program with a TOP include, a dialog box appears in which you have to enter the name of the include.

Choose to confirm your entries.

Another dialog box appears in which you must set other program attributes.

For details of what each attribute means, enter the program attributes and choose save.

The Create Object Catalog Entry dialog box appears.

Assign a development class to the program.

Choose to confirm your entries.

The program is added to the object list of the relevant development class and displayed under the Programs object node. The system starts the ABAP Editor and opens the program in change mode.

Editing the Source Code

The precise procedure for navigation and editing source code varies according to the editor

Mode that you are using

Navigating in the Source Code

Editing Source Code (Front end Editor)

Editing Source Code (Backend Editor)

Using the Clipboards

Find and Replace (Front end Editor)

Find and Replace (Backend Editor)

Inserting Statement Patterns

Inserting Patterns Using Drag and Drop

Expanding Includes

Improving the Layout

Saving and Activating Programs

Saving a Program

When you choose Save, the system saves an inactive version of the current program and adds it to the user’s list of inactive objects.

The system saves your program in the database. There is no syntax check when you save.

To save the contents of the ABAP Editor, choose from the standard toolbar.

Restoring a Program after a System Crash

If the system crashes while you are working on a program, the system tries to save the program in temporary storage. The next time you try to edit the program, the system asks you which version you want to use – the version from the database or the temporary version.

 

If necessary, you can use the Compare function to compare the two versions before deciding which version to restore.

Activating a Program

When you activate a program, the system generates an active version from the inactive version. The activation process checks for syntax errors in your program and then generates the active version. Finally, it generates a load version and deletes the corresponding entry from your list of inactive objects.

To activate a program, choose Program à Activate.

When you activate the program, the activation does not apply to all of the program components. Screens and GUI statuses are independent transport objects and have to be activated separately.

Generating a Program

When you generate a program, the system creates a new load version from the active version. Unlike activation, this operation only generates a new load version.

To generate the program, choose Program à Generate.

Conclusion

Here, I have tried to give a brief idea about the ABAP Workbench Tools. Before starting with this topic one should have an idea of Tool Integration and Working Methods, Development Objects and Development Classes, and Team Development. I have explained the tool of ABAP Workbench, the ABAP Editor in detail and how to Create a Program, Edit Source Code, and Save and Activate a Program.

 

 

 



User Comments

Title: eXCELLENT AGAIN!!!   
Name: NIHAR RANJAN
Date: 2007-03-15 5:52:12 AM
Comment:
very well explained.plz write on module pool,dialog programming,PAI,PBO ,that are confusing and critical topics. thnx....

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-19 1:22:40 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search