How to convert a local class into a global class?

Hello everyone... Its been quite sometime that I have not added some posts here. I just arrive from a vacation and I dont have any access on the net so its only now again I will add some tutorials. Anyway, what I will discuss today is all about converting your local class into a global class. What I mean is, a class declared directly into your program (SE38) and convert it into a global class found in SE24. Any class declared in SE24 are considered global class. 

So this technique is simple to process just follow the steps below. By the way, I will not discussing here how to create a class. It will be discuss in another post.

Steps:
1. Make it sure that you have a local class defined (in SE38) just like this one below. If none, please create a simple one to proceed with this tutorial. So in my sample below, I created a class which I called "Computer". Then I added a method which I named it as "get_brand". This method, once our tutorial is finished, must appear on the global class.


2. Once you created your local class, go to tcode SE24. On its main screen, click on the main menu, Object Type-->Import-->Local classes in program.


3. This screen below appears. Enter the name of your class. It can be different to the name of your local class. No worries on it. Just follow the naming conventions that you have.


Afterwhich, click this Import button below the screen.


4. Lastly, open now your new global class. The method I mentioned above, "get_brand" is now copied into this new global class. This class is now visible then to other programs that you will do in the future.


Enjoy. Keep on visiting my blog. :)

No comments:

Post a Comment