cancel
Showing results for 
Search instead for 
Did you mean: 

Define attributes in Comp. Controller

Former Member
0 Kudos

dear all,

How i can define any variable in Attribute tab in component controller,so that be accessible to other views?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

THANKS ALL

Former Member
0 Kudos

Hi Ali,

Once you create the attribute in component controller, you can access this attribute from any view:


  data lo_componentcontroller type ref to ig_componentcontroller .
  lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
  

*eg. Access comp.controller attribute and assign some value.


  lo_componentcontroller->w_status = 'X'.

In the above code 'w_status' attribute is defined under attribute tab of the comp. controller.

Regards,

Ravi

Former Member
0 Kudos

In addition to above reply do remember to mark your attribute as Public..

Former Member
0 Kudos

where the variable is referenced to the context in component controller