Global abstract class with example using parameters.
* A class which contain at least one or more than one abstract method then it's called as Abstract class.
* Abstract method is the method which has only definition but not be any implementation.
* We cannot create object for abstract class.
* We can create objects for sub class of abstract class.
Steps to create abstract class in SE24.
1. Goto T-code SE24.
2. Give name and click on create, select class and press enter
3. Give description and select generation abstract and uncheck the final. Press enter.
4. Give method name, level, visibility, description.
5. Click on parameters and give parameters.
6. Save and activate and go back.
7. Click on 'go to properties', Select abstract, select ok and click on change.
8. Save and activate the class.
9. Create a sub class.
* Goto T-code SE24.
* Give name, Press enter, select class and press enter.
* Give description and press enter.
* Goto properties and click on super class and give super class name.
* Check and activate.
* An error will come. click on redefine method and write logic.
METHOD display.
SELECT SINGLE erzeterdat
vbtyp
ernam
FROM vbak
INTO ( perzet,perdat, pvbtyp, pernam )
WHERE vbeln EQ pvbeln.
ENDMETHOD.
erdat
vbtyp
ernam
FROM likp
INTO ( perzet,perdat, pvbtyp, pernam )
WHERE vbeln EQ pvbeln.
ENDMETHOD.
Comments
Post a Comment