Object Oriented ABAP
Object Oriented ABAP
Object Oriented ABAP
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Creating a global class from a local class<br />
In this tutorial, we would look into the procedure of creating a global class using a local<br />
class defined in a program.<br />
Consider the following Z program, which contains a local class:<br />
REPORT zclass_test.<br />
*---------------------------------------------------------*<br />
* CLASS zcl_test DEFINITION<br />
*---------------------------------------------------------*<br />
*<br />
*---------------------------------------------------------*<br />
CLASS zcl_test DEFINITION.<br />
PUBLIC SECTION.<br />
METHODS: display.<br />
ENDCLASS. "zcl_test DEFINITION<br />
*--------------------------------------------------------*<br />
* CLASS zcl_test IMPLEMENTATION<br />
*--------------------------------------------------------*<br />
*<br />
*--------------------------------------------------------*<br />
CLASS zcl_test IMPLEMENTATION.<br />
METHOD display.<br />
WRITE: 'SAPTechnical.com'.<br />
ENDMETHOD. "display<br />
ENDCLASS. "zcl_test IMPLEMENTATION<br />
Now let us create a global class SE24 using the above local class:<br />
Go to transaction SE24.