cancel
Showing results for 
Search instead for 
Did you mean: 

Pass parameters dynamically to url iview from web dynpro abap

Former Member
0 Kudos
541

Hi,

I am trying to pass 3 key-value pairs via absolute navigation to a URL iview.

The url expected is : http://www.sap.com?field1=value1&field2=value2&field3=value3

For this, I have done the following:

1) Created a url iview with the 3 parameters in get.

2) Used the pcd location of the url iview and referred it in the navigate_absolute method.

Following is the call:

CALL METHOD lr_port_manager->navigate_absolute

EXPORTING

navigation_target = wa_navigation-target

navigation_mode = wa_navigation-mode

use_sap_launcher = abap_false

business_parameters = l_bus_parameter_tab.

The l_bus_parameter_tab has the key-value pairs populated and I can see them populated.

However, when the url is being called the parameters are not getting passed. Am I missing anything to be passed?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182598
Active Contributor
0 Kudos

Hi you need to make below changes

1. use launcher_parameters in place of business_parameters to pass the key value pair table

2. In iView property set Parameters to Pass from Page Request (for URL Isolation) as *

2. Create a page in portal, attach your iView to the page and set the isolation method of the page as URL.

3. In your navigate_absolute method give path of the page.

Thanks

Prashant

Former Member
0 Kudos

Hi Kumar,

The url I am calling is a dotnet asp page, I was under the impression that launcher parameters are only to be used for SAP applications. I will try your suggestion and get back asap.

Thanks for your help so far.

Regards.

Former Member
0 Kudos

Hi Kumar,

I have followed your reccomendation and updated the code and iview properties.

The code now looks like:

l_parameter-key = 'userid'.

l_parameter-value = sy-uname.

INSERT l_parameter INTO TABLE l_bus_parameter_tab.

l_parameter-key = 'portal'.

l_parameter-value = 'test'.

INSERT l_parameter INTO TABLE l_bus_parameter_tab.

l_parameter-key = 'mode'.

l_parameter-value = 'I'.

INSERT l_parameter INTO TABLE l_bus_parameter_tab.

*End of business parameters population

CALL METHOD lr_port_manager->navigate_absolute

EXPORTING

navigation_target = wa_navigation-target

navigation_mode = wa_navigation-mode

use_sap_launcher = abap_true

  • business_parameters = l_bus_parameter_tab.

launcher_parameters = l_bus_parameter_tab.

However, when the method is called, it does nothing and the url does not get called.

When I manually add parameters to the url iview and preview it, it does the job.

For some reason, these parameters are not getting passed to the url iview or page.

Is there a limitation that parameters cant be passed to url iviews?

former_member182598
Active Contributor
0 Kudos

Hi Dale,

I forgot to mention one more thing,

In your URL iView Create the three URL parameters userid, portal and mode of type string and personalize as read/write.

I hope you have already marked the isolation as URL and parameters to pass as *.

Thanks

Prashant

Former Member
0 Kudos

Hi Prashant,

I had the parameters, have now made them read/write. Still the URL is not getting called. I am clueless mate.

Regards.

former_member182598
Active Contributor
0 Kudos

Lets run a small test to figure out where the problem is

1. Create an iView based on standard WD ABAP application wdr_test_portal_nav_page

2. Preview this iView

3. in Target Page give the path for the page on which you have attached the iview.

In my case it's

ROLES://portal_content/Prashant/googlepage

In App Integrator parameter table fill in your parameters.

Click on Start Navigation.

Let me know what happens, whether your parameters get passed?

Thanks

Prashant

Former Member
0 Kudos

Hi Prashant,

You are a star! I was able to resolve it, the issue was while I wastrying to unit test it from R3 instead of portal.

I can now see the parameters being passed through, however a ',' is appearing before the parameters.

Is it coming because I have not populated any default parameters in the URL iview, you come across this before?

Thanks and Regards

former_member182598
Active Contributor
0 Kudos

Hi Dale,

I am glad that it worked for you. Not sure why that ',' was coming for you.

I hope you are not loosing your sleep on ',' :-). Are you..?

Thanks

Prashant

Former Member
0 Kudos

I will let the dotnet application handle it Thanks very much, you have been of great help. Rewarded you with loads

Former Member
0 Kudos

I got a trace from dotnet, apparently the parameters are getting passed twice:

GET /TestEIC/EIC.aspx userid=&portal=&mode=&mode=I&portal=test&userid=2013STNG

The first is a space and the second set is the one from my abap web dynpro.

Former Member
0 Kudos

I was able to solve that. We actually dont need fields to be added in the url iview, they come dynamically from absolute navigation.

I was able to spot where the duplicates were coming from by changing the order of fields.

Thanks again Prashant, you are a star!!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Normally i would do the same way as you did to navigate to the WebDynpro views(java/Abap) and it works.

I am not sure about the type of View behind this URL iView. if it is SAP based then it will work as already suggested here.

In the Business Parameter case you have to get the Business_parameter parameter from the URL and parse it yourself.

Shortyly : if it is WebDynpro based then use the Business_parameter

otherwise use Launcher_parameter.

[https://cw.sdn.sap.com/cw/docs/DOC-112069|https://cw.sdn.sap.com/cw/docs/DOC-112069]

Former Member
0 Kudos

Hi Baskaran,

As always, thanks for your prompt response.

This is what I am trying to achieve:

When user logs in through the login.jsp page, I am calling an abap web dynpro to authenticate him further.

If it is successfull user gets access to the portal else he is directed to a dotnet page.

This dotnet page requires 2 parameters to be passed to identify the user.

I have 2 unknowns at this point of time:

1) If I call the dotnet url iview embedded in a page, will the user be able to see the roles assigned to them? This is something which I dont want to happen.

2) Also when I am calling the abap web dynpro url from the jsp page, will the user be able to see the roles assigned to them?

Is there a way to call a url iview and set the navigation levels up, so the roles are not visible? the same question is while calling an abap web dynpro iview, can I call it from portal and ensure the roles are not visible while the user is on the web dynpro.

Regards,

Sumeet