cancel
Showing results for 
Search instead for 
Did you mean: 

Pass parameters dynamically to url iview from web dynpro abap

Former Member
0 Kudos
555

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.

View Entire Topic
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!!