cancel
Showing results for 
Search instead for 
Did you mean: 

Pass parameter to WD abap iview via Portal link

Former Member
0 Kudos

Hello all,

I have created one WD ABAP application and I am accessing the same with the help of URL parameters. I am retrieving these URL parameters in 'HANDLEDEFAULT' event handler of the application window.

Now client wants to access the same with the help of NavigationParameter so I created relevant iView in portal and I am accessing application using link which is composed of portal link and NavigationTarget parameter.

My question, If I want to pass application parameters via URL, How do I access the same in my window. Do I need some sort of separate mechanism to take the URL parameters to my application window when application is running on portal?

Please share your thoughts on this.

(Same problem explained in link /thread/672163 [original link is broken])

Thanks in Advance,

Prashant Jagdale

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi.,

You can get URL parameter from cl_wd_runtime_services=>get_url_parameter( ).

or get_data method of wdevent..

check these threads:

hope this helps u.,

Thanks & Regards,

Kiran

Former Member
0 Kudos

Hi Kiran Kumar,

Thanks for your help. I gone through your link and they are very useful I will try to implement the same in my component and let you know about the result.

Before that, One quick questions, I am accessing my portal iView using link like

http://<server>:<Port>/irj/portal?NavigationTarget=ROLES://portal_content//myFolder/myRole/myWS/myPa...;

Is it possible to get the values of parameters inside BusinessParameter using wdevent->get_data inside 'HANDLEDEFAULT'?

Thanks,

Prashant

Edited by: Prashant Jagdale (Genius) on Jun 30, 2011 2:43 PM

former_member184578
Active Contributor
0 Kudos

Hi.,

You can get Parameter value fro ivew to Web dynpro abap application in HANDLEDEFAULT Method.,

check my article: [How to Integrate WDA in Portal|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/008fc414-997f-2e10-3899-fd895ec8eb5e]

hope this helps u.,

Thanks & Regards,

Kiran

Former Member
0 Kudos

Hi Kiran Kumar,

Thanks for your document but still my problem is not solved. I will try to explain my problem in detail.

I have developed one WD application and I was accessing the same using link suppose

http://newdomain.abc.com:8000/sap/bc/webdynpro/sap/zwda_url_parameters?pernr=12345&name=test1&sap-cl...

I was retrieving the values of of pernr and name in 'HANDLEDEFAULT' event handler by adding two parameters as PERNER and NAME. and it is working fine.

Now this application is running on portal. and I am accessing the same using URL

http://<server>:<Port>/irj/portal?NavigationTarget=ROLES://portal_content//myFolder/myRole/myWS/myPa...

but as i want to pass above mentioned parameter (pernr and name) via link, After an investigation, I am thinking to use of Dynamic parameter. So my link will become like

http://<server>:<Port>/irj/portal?NavigationTarget=ROLES://portal_content//myFolder/myRole/myWS/myPa...;

So, my question is , how I can access these values specified in DynamicParameter in my WD abap iView. Whether they are available in 'HANDLEDEFAULT' event handler using method wdevent->get_data?

I don't want to pass my parameters using iView property "Application Parameter."

Please give some inputs on this. Also Please guide me whether I can use some other way to achieve this. but the thing is, i must want to pass the values via URL only.

Thanks in Advance,

Prashant Jagdale

former_member184578
Active Contributor
0 Kudos

Hi.,

Yes It is possible to get using wdevent->get_data( ).,

try like this.,

data: l_url_parameters type tihttpnvp.

data: wa_l_url like LINE OF l_url_parameters.

wdevent->get_data(

exporting

name = if_wd_application=>all_url_parameters

importing

value = l_url_parameters ).

READ TABLE l_url_parameters INTO wa_l_url index 2. " here as per your parameter read the index value.,

hope this helps u.,

Thanks & Regards,

Kiran

Former Member
0 Kudos

Hello Kiran Kumar,

Thakns for your reply. Due to some admin issue, I was not able to create an iView in portal but finally, I created it. After a testing, I can able to retrieve only one key value pair from my DynamicParameter. Is there any specific format of using DynamicParameter.

I am using below link to access the iView in portal.

http://<server>:<Port>/irj/portal?NavigationTarget=ROLES://portal_content//myFolder/myRole/myWS/myPa...;

l_url_parameters is containing only id=12345, but not name. Am I using correct format? please guide. or Is there an iView property that I need to set while taking multiple values from DynamicParameter?

Thanks in Advance,

Prashant Jagdale

Former Member
0 Kudos

Hi Prasanth,

EVT_NAME type STRING.
EVT_NAME = WDEVENT->GET_STRING( NAME = 'PORTAL_EVENT_NAME' ).

Try this link..

Cheers,

Kris.

former_member184578
Active Contributor
0 Kudos

Hi.,

Add Importing Parameter WI_ID to window default plug..

hope this helps u.,

Thanks & Regards,

Kiran

Former Member
0 Kudos

Hello Kiran Kumar,

I have already added ID parameter to window default plug. But it was not working.

Finally I can able to retrieve both the key-values pairs inside my code. Solution is as follows :

1. I am accessing the iView using below link. Add DynamicParameter as shown below.

http://<server>:<Port>/irj/portal?NavigationTarget=ROLES://portal_content//myFolder/myRole/myWS/myPa...

2. Set iView properties as

a. Isolation Method - URL

b. Parameter to pass from page request (For URL Isolation) - Enter an asterisk (*).

3. write code in 'HANDLEDEFAULT' event handler of the window


data: l_url_parameters type tihttpnvp.
data: wa_l_url like LINE OF l_url_parameters.

wdevent->get_data(
   exporting
       name =  '_ALL_URL_PARAMETERS'  "if_wd_application=>all_url_parameters
   importing
       value = l_url_parameters ).

Many thanks to Kiran Kumar for your valuable help. Thanks to Kris as well.

Thanks & Regards,

Prashant Jagdale

Former Member
0 Kudos

Hello,

More links for your reference :

1. Passing Dynamic Parameters to Applications via the Application Integrator

/people/rory.murphy/blog/2010/07/19/passing-dynamic-parameters-to-applications-via-the-application-integrator

2. Passing parameters to quick link

/thread/1929134 [original link is broken]

Thanks,

Prashant

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Give your iview quiclink. And add parameters to quicklink url, enter your paraemter names to iview.