‎2008 Aug 21 2:55 PM
Hi,
What is The Diff Between Build Class Code in program (se 80 like below )
and build Class in Se24 like the same.
What is Recommended ?
----
CLASS lcl_airplane IMPLEMENTATION *
----
CLASS lcl_airplane IMPLEMENTATION.
Method set_attributes
METHOD set_attributes.
name = im_name.
planetype = im_planetype.
n_o_airplanes = n_o_airplanes + 1.
ENDMETHOD.
Method display_attributes
METHOD display_attributes.
WRITE: / 'Name of the airplane: '(001), AT pos_1 name,
/ 'Plane type: '(002), AT pos_1 planetype.
ENDMETHOD.
Method display_n_o_airplanes
METHOD display_n_o_airplanes.
WRITE: /, / 'Total number of airplanes: '(ca1),
AT pos_1 n_o_airplanes LEFT-JUSTIFIED, /.
ENDMETHOD.
ENDCLASS.
‎2008 Aug 21 3:02 PM
Local Class (inside the program) can only be referred in that Program. If you want to refer that in the other program you will not able to do it.
Whereas Global class (created in SE24) can be referred in more than one program.
I would suggest to create class in SE24, as it has good features for entering method's signature and it would make the navigation easy.
Think like, in your application you have 10 local class and all those local class has 100 methods and they have Super Class relations and so on. So, it would be hard to navigate if you have implemented all class locally (inside the program).
Regards,
Naimesh Patel
‎2008 Aug 21 3:02 PM
Local Class (inside the program) can only be referred in that Program. If you want to refer that in the other program you will not able to do it.
Whereas Global class (created in SE24) can be referred in more than one program.
I would suggest to create class in SE24, as it has good features for entering method's signature and it would make the navigation easy.
Think like, in your application you have 10 local class and all those local class has 100 methods and they have Super Class relations and so on. So, it would be hard to navigate if you have implemented all class locally (inside the program).
Regards,
Naimesh Patel
‎2008 Aug 21 3:03 PM
‎2008 Aug 21 3:03 PM
Technically there is no difference ...
You can use any thing ..
I personally will prefer to use SE24 because everything is easy there ...
Another difference is... when you create a class in SE24.. it is global.. means others can also use it .. it will exist in that system just like a DDIC object..
When you create a class in your program.. its scope is limited till the program continues.. no one else can make use of that class..
Cheers.
Varun.
‎2008 Aug 21 3:04 PM
Hi,
If your question is the difference between global class( SE24) and Local class ( In our Programs ).
The Global class is used to define the class for Multiple Use and the Local Class for Particular program. In most of the cases we will prefer to develop classes in SE24
There is One more option in SE80 ( Class/ Interface ) which will create class globally.
If i am not answered your question let me know
Regards
Pavan