cancel
Showing results for 
Search instead for 
Did you mean: 

regarding the creation of dynamic view by clicking on a tree.

Former Member
0 Kudos

Hi all:

There are two parts on the window. the left part is a tree with three tree nodes, by clicking on tree nodes, the other is an area to show the business content.

for example, three tree nodes are respectively "input customer infor", "change customer infor", "view customer infor".

the initial view is input customer infor, I know how to create the view initially in method init or wddomodifyview, but when I click tree node like "change customer infor", how create the view , or how to refresh the view , that is to say, to delete old elements in the view of " input customer infor".

can you please give me a hint?

Thank you very much !

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Creating views dynamically is not the solution of this problem and it is not recommended also.

What you can do is probably craete 3 view containers in Main View and embed 3 different view - Create, Change, Display in these view containers and based on link clicked you can make these view containers visible, invisible.

There are other options also available like FPM configuration, Usage of Navigation Plugs etc.

Hope these clue helps.

Regards

Manas Dua

ChrisPaine
Active Contributor
0 Kudos

Hello,

be wary of always creating the view and then just assigning the visbility of the given view container. Although this is quite simple, it means that the WD events are still called for the view - especially where tree might be built, the associated logic could be quite intensive. It is better to only call this logic when needed.

Embedding the views in a single view container - and dynamically switching the assignment would ensure only the selected view would be called.

I would strongly advocate the FPM to do some of this - but unfortunately it doesn't (yet) have a layout that would easily support your two pane view (if you really need this). However it does have a guided activity floorplane (GAF) which is the standard for this sort of select, edit, save, confirm sort of work - if you want your users to have a similar experience to the rest of SAP's delivered apps, it would certainly be worth considering.

good luck,

Chris

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sony..

The Solution is..As u already created a Tree in the Main View..place a VIEW CONTAINER in that MAIN View..In this VIew Container embed all views u want to display..

In the context node,create three attributes for setting View's Visible or Invisble property and respectively bind them to Views Visible property..

On Action of every node property..call the OutBound Plug of the View and set Invisble property to l other two views and same for rest of the views.

Former Member
0 Kudos

hi :

I tried to creatd three viewcontainers, their property of visibility has been bound with

to a node, the default view should be the view of creating.

what method should I use for initialisation to make visible.

WDDOINIT or WDDOMODIFYVIEW?

Edited by: jingying Sony on Apr 12, 2010 6:17 AM

gopi_narendra
Active Contributor
0 Kudos

Hi

You can write the code in WDDOINIT of the View which has the 3 containers.

Just pass the visibilty = ABAP_TRUE to the container for CREATION and disable the visibility of the other two containers

Regards

Gopi