cancel
Showing results for 
Search instead for 
Did you mean: 

Default values for standard WebDynpro application

nol_hendrikx
Active Contributor
0 Kudos

Hi all,

We are using standard WebDynpro applications (as an example Leave Request as part of ESS).

Are there any functionalities in a standard WebDynpro to set a specific field initially (default value for a dropdown list for example) via the url?

To be more concrete:

On a specific portal page I would like to call the Leave Request application with the Leave Type set to the parameter I passed via this url (e.g. http://mywasserver:50000/webdynpro/dispatcher/sap.com/ess~lea/leaveRequest&leavetype=Exceptional%20L...

Any thoughts are welcome.

Regards,

Noel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

In WebDynPro

we have wdWebContextAdapter to read the URL Parameter

WDWebContextAdapter web = null;

String upid = web.getWebContextAdapter().getRequestParameter("LeaveType");

so u can read that paramter Value and set it as selected in your dropDown

by saying

wdContext.currentContextElement.set<ValueAttributeName>>(<<Value u retrived>>);

Wishes

Krishna kanth

Answers (1)

Answers (1)

Former Member
0 Kudos

Regards, Anilkumar

nol_hendrikx
Active Contributor
0 Kudos

Thanks for the input.

But I don't want to adjust the standard SAP application.

Can it be done with a standard out of the box SAP WebDynpro without changing it?

cheers,

Noel

Former Member
0 Kudos

At the default inplug of your interface view create a parameter that you need to access for e.g LeaveType in this case.

The variable will recieve the value automatically from the url.

Set the value in the context variable of the component controller and then access it from the view.

Hope this link would be helpful

Message was edited by: Noufal Kareem

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

This feature (passing URL-parameter-values to startup plug event handlers in component interface view controllers) is described in a special sample application:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tu... on inter-application navigation.htm

The Portal Scenario is described here: /people/jochen.guertler/blog/2004/11/23/web-dynpro-best-practices-how-to-navigate-between-different-web-dynpro-applications

Regards, Bertram