ABAP OO Functional Method
We can use functional method like variables, and functional method can save us from declaring new data. Here I try to write very simple code for usage.
Definition of functional method is like any other method, but you can't use exporting or changing parameters and returning parameter must be fully specified.
From now on I will continue with local class.
1) we can use with WRITE, IF, DO and LOOP statement.
Definition part :
Implemantation part :
Report code :
2) we can use with new statement like REDUCE, FOR, | { } |
3) singleton class and get_instance
4) I wish, I like
We can declare table with TYPE TABLE OF REF TO <class> But we can't use functional method for LOOP AT...WHERE condition or READ TABLE...WITH KEY. I wish at new release of ABAP we can write code *** table field;
If m_count declared as public, we can write read or loop
Regards