cancel
Showing results for 
Search instead for 
Did you mean: 

Access context of Component Controller from Views

Murali_Shanmu
Active Contributor
0 Kudos

Hi,

In WD Java, I used to set attributes value for Context present in Component controller from the view. I used to write a piece of code at the view level for this.

How do i do this in WD ABAP. I believ I have to get instance of Component controller like this:

lr_compcontroller type REF TO ig_componentcontroller.

lr_compcontroller = wd_this->get_componentcontroller_ctr( ).

Regards,

Murali.

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_szcs
Active Contributor
0 Kudos

Hi Murali,

You could map the context node from the component controller to the view and change it locally within the view.

Best regards,

Thomas

Murali_Shanmu
Active Contributor
0 Kudos

Thanks Thomas. I am aware of mapping, but still I am just trying to find out if there is any option out her.

Murali.

Former Member
0 Kudos

Hi Murali,

yes you can access the comp_controller in the same sort of way in WDA.

You declared component usages on the property tab.

The wizard (ctrl-F7)has various options, check it out.

One is calling methods on declared controller usages.

the result is for example such generated code:

DATA: l_ref_ANOTHER_CONTROLLER TYPE REF TO IG_ANOTHER_CONTROLLER .
      l_ref_ANOTHER_CONTROLLER =   wd_This->Get_Another_Controller_Ctr( ).
data:
      l_Api_Another_Controller type ref to IF_WD_CONTROLLER.

See also local interface code in CTRL-SHIFT F1.

You work directly with this info. Indeed constants from the interfaces should be used this way.

Work with the wizard. And declare all usages in the properties tab.

Moving outside of the framework is possible but not recommended

regards

Phil