You can attach an append structure with the required additional fields to most transparent table. With that you can implement additional columns in the database table of SAP applications without modifications.
Source texts areas commented out by SAP
Some SAP programs contain source code areas that have been commented out. If recommended by SAP, you can remove the comments to obtain addtional functionality. Technically, however, this is a modification.
This lesson talks about the different SAP User Exitsthat you can implement to modify
and adapt your software to meet the client's requirements without modifying SAP Core.
User Exits
User exits (Function module exists) are exits developed by SAP.
The exit is implemented as a call to a function module.
The code for the function module is written by the developer.
You are not writing the code directly in the function module, but in the include that is implemented in the function module.
The naming standard of function modules for function module exits is:
EXIT_<program name><3 digit suffix>
The call to a function module exit is implemented as:
Video Lesson 11.1: Adjusting The Sap Standard Software
This lesson provides an overview of the options for adjusting the SAP standard
software to fit your client's requirements.
Basic Terms and Options of SAP Software Adjustment
In the system in which it was developed, a Repository object is called original. In another system, in which the object arrives by means of transport, it only exists as a copy.
Usually, changes are only to be made to the original. These changes are then transposted to subsequent systems to change the corresponding copies. This ensures that Repository objects are consistent in all systems
Corrections and Repairs
Changing an original is called a correction. Corrections are made in development/correction type tasks.
In contrast, changes to a copy are called repair. Repairs are made in repair type tasks.
Repairing an SAP object in a customer system is also called modification.
This lesson will teach you about the ALV Grid Control. This is the most common control used to display reports on the screen. ALV Grid controls can summarize, show totals and subtotals and print your report or export it to Excel.
Application Example: ALV Grid Control
ALV Grid Control, also called SAP List Viewer (ALV) is used for displaying an internal table on a screen. It has numerous user functions.
On the screen, the user can vary the width of the columns, or the width can be automatically adjusted to the current data. The display position of the columns can also be changed by means of drag-and-drop.
The standard pushbuttons of the control can be used to execute, among others, the following functions:
The detailed display shows the fields which were previously selected.
The sorting function provides the user with the option of specifying complex sorting criteria
You can use the search function for searching for a character string.
You can form totals for one or each of several numerical columns.
You can also Print and Download with the corresponding pushbuttons.
The user can save his or her settings in the Grid Control as a display variant and reuse them at a later time.
Many new functions are delivered with the SAP standard version as classes or methods. This lesson will provide you with a short introduction into
object-oriented programming and then show you how you can find existing
classes and methods in the SAP System and how you can use them from within
your program.
To be able to use the classes and methods that exist in the SAP System, we must first understand some basic terms used in object-oriented programming.
Classes and Objects
A class is a formal description of objects (instances).
At runtime, you can create several instances of a class, all of which have their own attributes and methods.
You can access corresponding attributes of an instance by calling an instance method.
Classes can be defined either locally within a program or globally in the class library.
SAP has shipped - with the standard version - many global classes with methods that encapsulate the required functions for reusability. Hence, these classes and methods also belong to the reuse components.
Hint: Global classes can be found using the standard search tools SAP Application Hierarchy and Repository Info System. ->
In this lesson, you will learn how to create and use function modules. As an example, you will call a function module for the encapsulation of a SELECT in your program.
Working with Function Modules
A function module is a subroutine with the corresponding function that is centrally stored in the Function Library of the SAP system. Each function module has an interface for importing or exporting parameters. The main purpose of function modules is their reusability. Hence, they belong to the so called reuse components.
Function group
Function modules are organized into function groups. Each function group is a collection of function modules that have similar functions and/or process the same data.
A function group can contain the same components as an executable program. These include:
The interface of a function module can contain the following elements:
Import parameters: They can receive the values or variables of the calling program when the function module is called.
Export parameters: The calling program accepts the output of the function module through the assignment of a “receiving variable”.
Changing parameters: It is possible to pass the variables of the calling program that are changed by the function module to the changing parameters.
Exceptions: They can be triggered by the function module in certain error situations and provide information on the respective processing error in the function module.
In this lesson, you will assign a title to your list and your screen. Furthermore, you will create a status for the list (with standard list functions) as well as a status for the screen that refers to the components of the list status.
The user interface of a screen consists of the following elements:
The title bar contains the title of the current screen (GUI title).
The menu bar contains expandable menus, which have corresponding program functions as menu entries and/or submenus (cascading menus). (GUI status)
On every screen in the SAP system, the standard toolbar always contains the same standard pushbuttons for functions that are used frequently.
In the application toolbar, frequently used functions of the screen are made available.
Together, menu bar, standard toolbar, function key assignment, and application toolbar make up the GUI status.
To use the GUI title or GUI status on a screen, these must be assigned to the screen. This happens by means of the ABAP statementsSET TITLEBAR and SET PF-STATUS.
Implementing the GUI Title
There are two options for implementing a GUI title for your screen:
You first create the GUI title via the context menu on the object list for your program and then assign it to the appropriate screen using the SET TITLEBAR statement.
You create the GUI title by means of forward navigation from the respective SET TITLEBAR statement of your program.
In this lesson you will learn how to create and work with buttons in your screen.
Pushbuttons
Implement Pushbuttons
Different pushbuttons and the program are to be implemented in such a way that the appropriate processing for the user action is executed:
If the user chooses the Back pushbutton, he or she returns to the basic list without writing any changes to the database table. The message “You left the screen without saving” is displayed in the status bar of the basic list.
If the Save button is chosen, the changes are executed in the database and the user returns to the basic list with a corresponding message in the status bar.
If the Enter button is chosen, the screen is displayed again.
Flow for Choosing a Pushbutton
If the user chooses a pushbutton, the runtime system copies the assigned function code to a special screen field (of the OK type). This screen field is typically called the ok_code.