| Home • Tips • Tutorials • Forums • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Document Categories:
What's New?
Contribute?Sample SpecsWhat's Hot? |
Creating a global class from a local classBy Supriya In this tutorial, we would look into the procedure of
creating a global class using a local class defined in a program. Consider the following Z program, which contains a local
class: REPORT zclass_test. *---------------------------------------------------------* * CLASS zcl_test DEFINITION *---------------------------------------------------------* * *---------------------------------------------------------* CLASS zcl_test DEFINITION. PUBLIC SECTION. METHODS: display. ENDCLASS. "zcl_test DEFINITION *--------------------------------------------------------* * CLASS zcl_test IMPLEMENTATION *--------------------------------------------------------* * *--------------------------------------------------------* CLASS zcl_test IMPLEMENTATION. METHOD display.
WRITE: 'SAPTechnical.com'.
ENDMETHOD. "display
ENDCLASS. "zcl_test IMPLEMENTATION
Now let us create a global class SE24 using the above
local class: Go to transaction SE24.
Now select Object type à import à Local classes in program (As shown below):
Following pop-up appears:
Enter your Z program in which the local class is defined and
press ENTER.
The class name defined in our program is ZCL_TEST and the
proposed global class name is CL_ZCL_TEST. Now you can rename the global class
name as per your requirement. If the local class is defined inside an include, we need to
check the checkbox “Explode INCLUDEs’.
Now click on import. Following message would appear:
Now check the global class ZCL_TEST.
|
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||