Saturday, December 18, 2010

Dynamically selecting the view from the browser through Web Dynpro application parameter

In this scenario we are selecting the view at run time .The user can give the input via URL

1. Create a new webdynpro interface and give the window name and view name

2. Create another view

3. In view V_One create a Text view to display some text to identify the view

Click on property and give the text for TextView element

4. Create a inbound plug for this view as ‘ip_v_one’

5. Repeat the steps 3 & 4 for second view also.

6. Now create a webdynpro application to run this application

7. In the parameter tab, create a parameter ‘target_view’ and set the value ‘one’

8. Now create two outbound plugs named ‘op_to_v_one’ and ‘op_to_v_two’ in the window ‘w_default’.



9. In order to Fire the outbound plug from our input; write the coding under the method ‘HandleDefault’.

10. Create the navigate link between outbound plug to inbound plug of first view

11. Do same for outbound plug two ‘op_to_v_two’.

After creation the screen look like this…

12. Activate the component and test it.

13. The application calls the Browser and by default the first view is being called.

14. In order to call the second view u gave to pass the parameter thru the browser using the & - operator. ‘Target_view=two’

15. To call the first view again u have to pass the parameter thru the browser using the & - operator. ‘Target_view=one’




No comments:

Tutorials on SAP-ABAP

Adobe Interactive Forms Tutorials

Business Server Pages (BSP)

Userexits/BADIs

Web Dynpro for ABAP (Step by step procedure for web dynpro,Tutorials on Web Dynpro,)

ALV Tutorials

Blog Archive

goodsites