Skip to Content
author's profile photo Former Member
Former Member

How to declare global variable in web dynpro

Hi,

How to declare global variable in web dynpro?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jan 26, 2008 at 01:48 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 04:00 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 04:58 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.