cancel
Showing results for 
Search instead for 
Did you mean: 

Any other ways to get parameters of a URL in a window method ?

Former Member
0 Kudos

Hi,

In SDN, i find the below two ways to extract the URL parameters, when i pass them while opening a new window. But, unfortunately they dont work for me. so, would like to know, if any other ways are existing to extract the URL parameters.

1)

HANDLEDEFAULT method of the window:

DATA: lt_url_parameters TYPE tihttpnvp.

wdevent->get_data(

EXPORTING

name = if_wd_application=>all_url_parameters

IMPORTING

value = lt_url_parameters ).

2) In HANDLEDEFAULT method, have the URL parameter names as importing parameters and use them normally.

If there is no other ways, can some one help me in pointing the issue that i face ?

Note: I have wdevent (CL_WD_CUSTOM_EVENT) importing parameter in place.

Thanks in advance,

Gaurav.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Is that application contains the window, where your writing the logic for getting URL parameters. keep the break-point in that window and execute the URL and check whether it is going to that window or not.

Former Member
0 Kudos

Hi,

The code is present in the default handle method of the window, which opens for a new application. Also, i see the parameters in the window URL. During breakpoint, i see the code getting executed, but doesnot extract the parameters.

Is there a way to make the code to extract the parameters for sure ?

Thanks,

Gaurav.

Former Member
0 Kudos

Hi, Goto your application parameters and declare your URL parameter over there( same name as in ur URL ), then declare the same parameter in HANDLEDEFAULT method of the window. Now in your code that parameter is directly accessible. Try it out! Regards, Radhika.

former_member182598
Active Contributor
0 Kudos

Hi,

How you are trying to pass your parameters ? I believe you are using some SAP provided template (like for XSS) and relying on passing of some standard parameters. These parameters may be absorbed by the standard component and may not be passed to your WebDynpro Component. You can try passing them as application parameters.

Thanks

Prashant