cancel
Showing results for 
Search instead for 
Did you mean: 

How to declare global variable in web dynpro

Former Member
0 Kudos

Hi,

How to declare global variable in web dynpro?

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member182190
Active Participant

Hi,

You can create a Public attribute in the Component Controller of your Webdynpro component.

You can access it wherever you want using wd_comp_controller->lv_variable

where lv_variable is the name of your global variable.

Hope this solves your problem.

Regards.

Ismail.

Former Member
0 Kudos

Hi,

Think of Component controller as ur global data storage. Use the wizard to initially read from the context nodes into variables. Once ur familiar with how to read data from these context nodes, you can do it without the wizards.

Use the methods get_attribute and set_attribute to read and write data into context nodes.

Regards,

Lloyd

Former Member
0 Kudos

hi udaya kumar.....

in you component controller.....

goto to the context tab.....

there you can create nodes and inside the nodes, you can create attributes...

now its a global variable.....

so go tou your view context.....

just drag these nodes from the component controller to the view context.

it can be done to any number of views.

just check this link:

[link|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a282c952-0801-0010-1eb5-87953e036712 ]

---regards,

alex b justin