cancel
Showing results for 
Search instead for 
Did you mean: 

How to design this kind application in WDA??

Former Member
0 Kudos

Dear all,

We are working on a wda application.

One tree-control in view1, one alv-control in view2, one button in view3, and these 3 views are included in one window.

The requirement is to make this button enabled only after both the tree-control and alv-control are selected(clicked), how to design this app in WDA?? could you please help me regarding this problem. Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Have a main view with 3 viewcontainer ui elements. Have 3 more views, with each control in the view. Have 3 attributes defined in a node of the component controller, one each for the tree selection, ALV selection and button enabling. All these attributes will be of type char01. Map the component controller node to all your view nodes.

In the click event of the tree, set the first attribute. In the click event of the ALV, set the second attribute. In the wddoinit of the 3rd view, do a get_attribute to see if both the previous attributes are 'X'. Then do a set_attribute of the 3rd one. Bind the 3rd attribute to the 'Enabled' property of the button. By default it will be greyed out.

But why do you need each control in a separate view? You could very well place them in transparent containers or some other element inside the same view right? From your description, I dont really see a need for separate views.

Hope this helps.

Regards,

Nithya

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks all, based on your advice, this problem is solved, we just make little changes of the click event, instead of the wddoinit of the 3rd view.

Former Member
0 Kudos

hi,

if you have these three views in one component,

make a node for your layout parameters, in there you can have an attribute

visible for the three views, bind the visibility and enabled attributes of your

viewuielement to these attributes in the context (of the component controller)

create context mapping for this layout node between the

views en comp controller

and write some logic that checks whether the attributes of the first two views are

on abap-true (enabled) and set the third view enabled when this occurs.

for this you need to have three viewuielements with the views embedded in one

main view.

grtz,

Koen