cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a window in Webdynpro Abap

Former Member
0 Kudos

Hi Experts,

I am creating a webdynpro application where i have 2 views and 2 windows.

First view is embedded into first window and second view is embedded into the second window.

Please guide me in calling the windows in wddoinit method of component controller.For example if user is 'A' then need to call first window only,

else the second window only.

Please help me to proceed.

Regards,

Arun.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Arun,

in component controoler init( ) method ..write code like below.

Befor that u have to create inbound and outbound plugs for 2 views.

then in component controller  init( ) method..write the logic like

case sy-uname.

when 'User1'.

fire plug for view1.

when 'User2'.

fire plug for view2.

endcase.

->Like above code will help u to give solution..Simply...

U know how to create plugs concept.........

If u have any doubt post here...

Regards,

Venkat

Former Member
0 Kudos

Hi,

Above posted message concept is wrong.. Dont fallow it.

Regards,

Venkat

chengalarayulu
Active Contributor
0 Kudos

Arun,

As per your scenario, just look on the below snippet.

let there are view1, view2, view3 and window1 you have created.

1. Create two ViewContainer UI elements (VCO1, VCO2) on view1.

2. Goto window1 -> embed view1, then embed view2 into VCO1 & view3 into VCO2.

3. Create a node under component controller ND_VISIBLE with two attributes VIS_VCO1, VIS_VCO2.

4. map that node to View1. and maintain binding for VCO1 with VIS_VCO1 and VCO2 with VIS_VCO2.

5. in method WDDOINIT, just compare your user type, and

          if is 'A' then set VIS_VCO1 = visible and VIS_VCO2 = hidden.

          else set VIS_VCO1 = hidden and VIS_VCO2 = visible.

6. test your application.

RicardoRomero_1
Active Contributor
0 Kudos

Hi,

For do that you don't need two windows, you can embed both views in the main window. Create an inbound plugs in both views and two outbound plugs in your window. Create the navigation links and you can fire the plug you want from the method HANDLEDEFAULT of your window depending on the conditions you want...

Regards,