cancel
Showing results for 
Search instead for 
Did you mean: 

How to declare a variable globally

Former Member
0 Kudos

Hi,

How do you create a variable of some type such as datum globally within a certain level? I want to be able to use the variable with some current data within different methods

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Victoria,

You can declare variables (internal tables also) in the 'Attributes' tab of the component controller for global use and you can use it's value throughout the component.

Can refer the screen shot for example.

Happy Coding,

Keshav.

Answers (1)

Answers (1)

former_member184578
Active Contributor
0 Kudos

Hi,

Declare it in the Attributes tab, So that you can access in all the methods of View. You can declare in Attributes tab of Component Controller too to access in all the methods of all views using wd_comp_controller-><attr_name>.

Hope this helps u.,

Regards,

Kiran