Skip to Content
0
Former Member
Dec 05, 2008 at 09:27 AM

How to access a proctected method of a class

25 Views

Hi All,

I have the below code where in the idents_get is a protected method of the class.so when i activate it is throwing an error, method is unkown or protected or private.

data: gv_class TYPE REF TO /tdag/cpcl_decl_sub_view_ctrl.

create object gv_class.

CALL METHOD gv_class->idents_get

EXPORTING

i_estcat = gc_estcat6

i_pos_wanted = 1

IMPORTING

et_idents = lt_idents

changing

xt_recns = li_recn

EXCEPTIONS

read_failed = 1

others = 2.

i know protected methods can be accessed in derived class.

I'm new to ABAP oops concepts please give me some pointers to access a protected method.

or any sample code to access protected method.

Thanks in advance,

Srilakshmi.