Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

local or global class ?

Former Member
0 Kudos

Hi,

when to use local class and when to use a global class ? In other words: what are the reasons to switch to global class ?

thanks,

Rolf

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Refer to the below related thread....

Regards,

Santosh

4 REPLIES 4

Former Member
0 Kudos

Edited by: Craig Cmehil on Jun 25, 2008 11:58 AM

Former Member
0 Kudos

Hi,

Refer to the below related thread....

Regards,

Santosh

former_member230674
Contributor
0 Kudos

Hi Rolf Schorpion ,

There is clear distinction between global and local classes.

Local class

Local classes can be used in the program where it is defined.

Its scope is limited to the program where it is defined.This can be created in any program where you want.

Global class

Global classes are created by using SE24. These classes can be used in any program.you provides all the required attributes,methods,events,exceptions,friend classes.

You can use it in any program.

If it useful, reward points.

By

Prasad G.V.K

Former Member
0 Kudos

Hi,

The classes are divided into local and global based on their reusability.

If we want to use the same classs (in specifc the same structure) in more than one program,

we need to define this SE24 as GLOBAL class. here the scope of the class is more. the same structure can be reused many times across programs. In specific, if we want to design a class with a fucntionality that is used in all other classes or programs then we can define it as global class.

Local class - the life of this is specifi to that program only. The class is said tobe local if it is defiend or declared in SE38 program (report or include). This class of one report cant be used in other class. If we want to use it we need to again declare the same class in other program also.

this local classes are designed to meet only specific functionality ie to acheive the specifc task pertaining to that program only. It is not generalised.

Depending on the business logic we can desgin these classes accordingly.

Reward points if helpful.

Regards

Chandralekha.