cancel
Showing results for 
Search instead for 
Did you mean: 

Can we call Component controller methods in Assistance class?

vimal
Active Participant
0 Kudos

Hi All,

I have created a method in Component controller and want to access it in Assistance class.

Can we do this? if yes pls explain.

Thanks,

Vimal

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Vimal,

-------------------------------------------------------

I don't think, we get the scenario of calling component controller's method inside assistance class.

If you could elaborate, your requirement in detail, I can suggest some work around/other way of achieving your requirement.

-------------------------------------------------------


I have created a method in Component controller and want to access it in Assistance class.

Can we do this? if yes pls explain.

Only dynamic method call is possible if we have the reference of WD_COMP_CONTROLLER i.e.

before calling a method in component controller, we should pass the wd_comp_controller reference to assistance class and make a dynamic call to the method as below

Let us say we have reference of wd_comp_controller as GO_COMP_CONTROLLER, & we have method to "set_data"

then, method call will be....


data lv_method type string.

lv_method = 'SET_DATA'.

CALL METHOD go_comp_controller->(lv_method).

Please refer my answer in the below discussion

Hope this helps you.

Regards,

Rama

Answers (1)

Answers (1)

former_member222068
Active Participant
0 Kudos

Hi Vimal,

In general, we cannot call the methods of the component controller or components in the assistance class.

Hope the following document will help you

http://scn.sap.com/docs/DOC-50851

Thanks & Regards,

Sankar Gelivi