cancel
Showing results for 
Search instead for 
Did you mean: 

HowTo show view programmatically?

Former Member
0 Kudos

Hi Experts

I am searching for the possibillity to open a specific view programmatically from within a controller. Say my Application displays a Window with a view (one of 20 views which are linked together with plugs) and when i generate a Server action i want to open a specific view (which has no direct plug connection to my currently shown view).

The Background is that i want to implement a function that shows always the first view of a workflow and i do not want to draw connections from every view to the first view of my window.

Regards

Michael

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Michael,

If u want to decide on runtime,which view has to be shown,u have to use webdynpro component interface.

Check this link,its has same thing,what u want to implement

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0409d83-5ed5-2910-ef91-e41da6d5b8b4">Article</a>

Regards

Sumit

Former Member
0 Kudos

Michael,

Complex task.

The one option is to create navigation plugs / view usages dynamically, but the adventure is very long to fit forum format. Some time ago I posted parts of solution on this forum.

I'd like to suggest you something different:

1. Create WD Component Interface with one Window declared.

2. Create "main" component that embeds Component Usage of Component Interface created at [ 1 ]

3. In "main" component window embed InterfaceViewController of Component usage

4. Write 20 implementations of Component Interface, so your 20 views becomes 20 Windows of implementations

5. Now in main component create component usage somewhere in code passing concrete component implementation name. You should see one "view". Then destroy usage and create it again using different implementation name. You will get another "view".

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi,

Michael navigating to a view can be done only through plugs.

Go through the below tutorial in which you can navigate to different view with help of plugs which are not directly linked to the main view.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a137c339-0b01-0010-a688-a87b88706845">Naviagting to the views</a>