2012 Oct 31 9:01 PM
I'm struggling with a subclass defined in the abstract class CL_BROWSER. An added method is Public, but the compiler reports the method is unknown or protected or private. Looked through the Netweaver document on Abstract classes, but did not find that subclasses can not be extended.
Did I miss something?
2012 Oct 31 9:41 PM
I found it. For abstract class subclasses, methods must be called via dynamic algorithm.
I'm struggling with a subclass defined in the abstract class CL_BROWSER. An added method is Public, but the compiler reports the method is unknown or protected or private. Looked through the Netweaver document on Abstract classes, but did not find that subclasses can not be extended.
Did I miss something?
2012 Oct 31 9:41 PM
I found it. For abstract class subclasses, methods must be called via dynamic algorithm.
2012 Nov 01 3:58 AM
Hi,
Can you please elaborate on -
methods must be called via dynamic algorithmWhat exactly is the "dynamic algorithm" you're talking about?
BR,
Suhas
2012 Nov 01 1:36 PM
In the SAP 7.0 Netweaver documentation, find "Declaring and Calling Methods" and search for Dynamic Method Call.
One will find:
Using the standard ABAP
parenthesis semantics you can call methods dynamically.
CALL METHOD ref->(f)
Basically, the name of the method being called is placed in variable f. In my case, there is also a parameter in the method I defined, so I had to create an itab of type ABAP_PARMBIND_TAB and pass it in the call using the addition PARAMETER-TABLE.
CALL METHOD ref->(f) PARAMETER-TABLE itab
This compiles clean.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |