on 07-10-2007 12:33 PM
Dear Developers,
Is there a programmatic way to determine whether a component implements a specific interface?
How can I retreive the list of interfaces a component implements ?
Any idea?
Sincerely,
Olivier MATT
Hi Olivier,
After some debugging, found that you can get the implemented interfaces by using this code in the component controller. It should work from a view as well.
data: lr_comp type ref to if_wd_component,
lr_del_comp type ref to cl_wdr_delegating_component,
lr_comp_info type ref to if_wd_rr_component,
lt_interfaces type table of string.
lr_comp = wd_this->wd_get_api( ).
lr_del_comp ?= lr_comp->get_component( ).
CALL METHOD LR_DEL_COMP->IF_WD_COMPONENT~GET_COMPONENT_INFO
RECEIVING
COMPONENT_INFO = lr_comp_info.
CALL METHOD LR_COMP_INFO->GET_IMPLEMENTED_INTERFACES
RECEIVING
RESULT = lt_interfaces.
lt_interfaces is a string table that has the list of interfaces.
There seems to be a much simpler way with the method IF_WD_RR_COMPONENT=>GET_IMPL_INTERFACES_FOR_CMP by just passing the component name as a string. But I could not find an implementation for this.
Regards,
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.