Friday, 27 June 2014

Uses of ME Keyword in OOABAP



Step1. Create a proram in Tx- SE38.

















Step2. Execute the program and we find the below output.












Step3. Now declare a local variable within the method with the same name as the class variable & execute it.


















Step4. So if the class and method contains the variable with the same name then priority is given to the local one.













Step5. To access the class variable in the method which already contains a local variable with the same name ME keyword is used which always points to the Current calling Object of the class. Execute the program.




















Step6. The O/P is as follows:















---------------------------------------------------------xxxxx--------------------------------------------------------------

No comments:

Comments system

Disqus Shortname