cancel
Showing results for 
Search instead for 
Did you mean: 

Referenz on interface controller needed

Former Member
0 Kudos

Hello,

my COMPONENTCONTROLLER has an interface method which needs to be called outside the web dynpro component. To be more specific: this method needs to be called in an ABAP OO class, not in a using component.

Therefore I want to transfer a referenz on the interface controller (IWCI_<component>) to the ABAP OO class. But I don't know how to create a referenz on the interface controller (in the component of the interface controller!).

Best regards, Hergen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Hergen,

Below code snippet may help you to acess the interface method of the webdynpro component in an ABAP class.

lo_interface_controller TYPE REF TO abap_interface_controller.

( to get ABAP interface name go to webdynpro component interface -> go to interface controller -> properties-> ABAP Class name, is the interface which need to be used in the programming )

lo_interface_controller ?= wd_this.

( reference to Component controller of your webdynpro component in which above interface method is being used )

lo_interface_controller->interface_method( ).

now you can use this interface controller's reference to acess the method of that interface.

I hope this will help you.

Thanks,

Prashanth

Former Member
0 Kudos

Hi Prashanth,

thanks, that seems to be the solution.

Best regards, Hergen

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Hergen.

In which stage do you want to pass the reference? You could just pass wd_this as reference, if you are in the component controller.

Cheers,

Sascha

S-H
Active Participant
0 Kudos

Hi Hergen,

Do you want call a WD components method outside WD component (within the lifetime of the component) in a class.

One of the possibilities is to use the Assistance class for the WebDynpro Component. Have a attribute in assistance class. In the assistance class, we can have attributes referencing to IF_WD_CONTEXT_NODE, message manager. We can access the context and we can process the context from the assistance class.

Best regards,

Suresh

Former Member
0 Kudos

Should you just define this method in your interface controller?

Former Member
0 Kudos

Hello,

I don't understand your answer. Can you be more specific, please?

Best regards, Hergen