Skip to Content

How to create CMPCTRL attribute of the type internal table (as global list)

Hi,

I want to create global internal table to be able to access it across all my webdynpro views.

Ideally I will create this global internal table in CMPCTRL and will add different values from diffent methods of one view and use in another view as table of values. So I am thinking to use CMPCTRL Attribute declaration to my make internal table as global internal table. How do I achieve this ? Please help

Thanks

Praveen

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Sep 20, 2010 at 08:16 AM

    Hi ,

    Create a table type and use it in the attributes of component controller.

    This will create a global table.

    Thanks,

    Aditya.

    Add comment
    10|10000 characters needed characters exceeded

    • As I said you are mixing two different techniques - but actually either will work. You can go to the attributes tab of the Component Controller and declare your internal table. This will be like creating global data and stays alive throughout the lifetime of the component. It can be accessed at any time by any view with WD_COMP_CONTROLLER->ATTRIBUTE_NAME (where ATTRIBUTE_NAME is the name you gave the attribute). This is a good way to share data in a WD Component if you don't need to display or edit this data in the UI.

      The other approach is to model the internal table as a context node/attributes in the component controller context. You can then map this context to any/all of the views. You can then use the normal context APIs to access the data.

  • avatar image
    Former Member
    Sep 20, 2010 at 08:31 AM

    Create a attribute and check it as public in component controler's attributes.I will be accessible from all other controller's

    Madhu

    Add comment
    10|10000 characters needed characters exceeded