You are on page 1of 11

IBM Global Business Services

ABAP Objects Advanced-Global


Classes & Interfaces
IBM Corporation 2013

IBM Global Business Services

ABAP Objects Advanced : Global classes and interfaces


Concept
Demonstrating How to create Global class.

ABAP Objects - Advanced

Jan-2007

IBM Corporation 2013

IBM Global Business Services

Global classes and interfaces : Concept


Global classes and interfaces are created and stored in class pool and interface
pool like function pool (function group).
Global classes and interfaces are managed centrally and available to every
program.
Custom Global classes and interfaces must begin with Y* or Z*.
Global and local classes and interfaces have the same components, and there is
no difference in how they are used within programs.

ABAP Objects - Advanced

Jan-2007

IBM Corporation 2013

IBM Global Business Services

Global classes and interfaces : Concept (Contd.)


Global classes and interfaces are
maintained via transaction SE24 or
through transaction SE80.
Use Class Browser to view global
classes and interfaces in the
repository.

ABAP Objects - Advanced

Jan-2007

IBM Corporation 2013

IBM Global Business Services

Global classes and interfaces : Concept (Contd.)


Set Class Browser filters to select by
object type, by relation ship etc.
Results are displayed in a hierarchy
tree.

ABAP Objects - Advanced

Jan-2007

IBM Corporation 2013

IBM Global Business Services

Global classes and interfaces : Creating Global class


1. Go to transaction SE80 and choose
Class/Interface and enter the name
of your custom class or interface
(name must start with Z* or Y*) and
press enter.

2. In the Popup window choose yes.


3. Choose the Object type. Here Class
is selected as object type.

2
3

ABAP Objects - Advanced

Jan-2007

IBM Corporation 2013

IBM Global Business Services

Global classes and interfaces : Creating Global class (Contd.)


4. In the next popup enter description

and press SAVE button. Also check


Usual ABAP class radio button is set
4

and Final check box is checked.


5. In the next popup enter package

name and press save button. In our


example $TMP is selected as a
package.
5

ABAP Objects - Advanced

Jan-2007

IBM Corporation 2013

IBM Global Business Services

Global classes and interfaces : Creating Global class (Contd.)


6. Now double click on the class, it
will then display the class builder,
define attributes and methods for
the class.
7. Double click on the method name
to implement the method. It will
invoke the code editor where you
have to enter code for the method.

6
7

ABAP Objects - Advanced

Jan-2007

IBM Corporation 2013

IBM Global Business Services

Global classes and interfaces : Creating Global class (Contd.)


8. Activate the class.
9. Test the class.

10. Class components can include local


classes, methods, internal types,
macros which are not visible out
side the class pool.

9
10

Macros

Local class
Types

ABAP Objects - Advanced

Jan-2007

IBM Corporation 2013

IBM Global Business Services

Demonstration
Creating a Global Class using transaction SE24

10

ABAP Objects - Advanced

Jan-2007

IBM Corporation 2013

IBM Global Business Services

Practice
Creating a Global Class using transaction SE24

11

ABAP Objects - Advanced

Jan-2007

IBM Corporation 2013

You might also like