cancel
Showing results for 
Search instead for 
Did you mean: 

How to create attirbutes in web dynpro under component controller

Former Member
0 Kudos

Hi all,

I'm the beginner to Webdynpro. I'm going through elearning in SDN.SAP.COM.

I'm stuck in creating of Attirbutes under Component Controller.

Under component controller after enter the attribute, how can I create or enter the Associate type.

Please help me in the use of why we should create associae type, when we should use and how can we create it.

i.e., HOW , WHEN and WHY we need Assocaite Type for attirubte.

Thanks in advance.

Prasad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prasad,

You can create a node or an attribute by right clicking on the Context which is present under the Context tab of the webdynpro component.

For every attirbute the TYPE is mandatory, whereas for node it is not.

If you want to get the attributes from a strucutre, create a node by right clicking on the context and mention the strucutre name in the TYPE.

You will be hvaing the facility to select the atrributes and you can create it.

Why Nodes in component controller?

It is like a TOP in the Module pool program, where all the data is visible to every include, here it is every controller, viz.., View controller, Interface controllers, etc.

I hope i have answered your question.

Happy Learning!

Good day,

Regards,

Shashikanth. D

Answers (1)

Answers (1)

uday_gubbala2
Active Contributor
0 Kudos

Hi Prasad,

Welcome to Web Dynpro! The Web Dynpro source code is located in the Web Dynpro controllers. The

hierarchical storage for the global variables of controllers is called the context. Any variables that you define in a view are only local to that view and are not visible in other views. (Its like the concept of defining variables within a procedure.) So you define all your global variables (variables that you would like to be visible across different views of your component) at component controller level. This you can do in 2 ways:

1) At the context level under the "Context" tab

2) Under the "Attributes" tab

So how can you decide as to which category you should go ahead with? The context allows only ABAP data dictionary types types whereas in the attributes you can even specify class types. So if you want to define a global attribute of reference data type then you can only define it under the "Attributes" tab.

Each controller is a separate ABAP program, having not only predefined and user-defined methods, but also attributes, which are at least visible for each method of the controller.On the Attributes tab, additional attributes can be defined for the related controller. If the Public flag is set, these attributes are also visible for other controllers of the same Web Dynpro component. Attributes can not be exposed to the components interface.

Try go through this [excellent link|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60730016-dbba-2a10-8f96-9754a865b814] for learning how you can work with the context & its attributes.

Regards,

Uday

Former Member
0 Kudos

Hi Uday,

Thanks, its fine. My question is how to create an Associated Type for attributes.

Example : IF_COMPONENTCONTROLLER is predefined assoicated type.

Please help me how to create an associated type.

One more question .

I'm getting an error when I'm activating, but under syntax check.

1) Property "dataSource" of element "JOINING_DETAILS" must be bound, where JOINING_DETAILS is a view.

I'm the very begin to Webdynpro. Please explain me how can I add bound and why and with what should I bound the views.

Please explain, your previous answer was quite helpful in all the ways.

Thanks in advance,

Prasad